Black pill startup glitch

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
arpruss
Posts: 44
Joined: Sat Sep 30, 2017 3:34 am

Black pill startup glitch

Post by arpruss » Sat Oct 07, 2017 1:28 pm

When my Black Pill is powered up, it glitches on at least PA7. As far as I can tell, instead of the pin starting high-Z, it is briefly is pulled towards ground. This happens before the user code starts running.
I haven't caught it on a scope, but when the pin is interfaced with my elliptical exercise machine's rotation detector and the stm32 is powered up, the elliptical beeps as if motion started. Any thoughts?

User avatar
mrburnette
Posts: 1827
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Black pill startup glitch

Post by mrburnette » Sat Oct 07, 2017 2:31 pm


User avatar
RogerClark
Posts: 7134
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Black pill startup glitch

Post by RogerClark » Sat Oct 07, 2017 9:43 pm

Thanks Ray?

Thats good to know...

Sounds like a bug in the silicon related to those pins being used for JTAG programming

zmemw16
Posts: 1447
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Black pill startup glitch

Post by zmemw16 » Sun Oct 08, 2017 1:02 am

one of my daft questions, would setting them as analogues and later on initialising as gpio solve the issue ?
in CubeMX you can tell to set all gpio(??) as analogues for power saving.
i'd be inclined to set all possible pins as analogue just before sleeping and re-initialise them on wake up.
srp

arpruss
Posts: 44
Joined: Sat Sep 30, 2017 3:34 am

Re: Black pill startup glitch

Post by arpruss » Sun Oct 08, 2017 2:51 am

1. The discussion on particle.io says to use analog pins. But PA7 is analog-enabled.

2. Is PA7 one of the JTAG pins? I can't find a list of the JTAG pins in the datasheet?

3. Online information suggests JTAG pins are pulled up. But what I seem to be finding is a weak downward pull.

User avatar
RogerClark
Posts: 7134
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Black pill startup glitch

Post by RogerClark » Sun Oct 08, 2017 3:34 am

I thought someone dug out some details about full JTAG and posted it on the forum, but in the F103C8 data sheet, I can't find anything that suggests PA7 is a JTAG pin, I can only find the SWD PINS


e.g.

PA13 JTMS/SWDIO

But nothing for PA7

zmemw16
Posts: 1447
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Black pill startup glitch

Post by zmemw16 » Sun Oct 08, 2017 5:12 am

i was actually thinking of making at least pa0-pa7 analogue. maybe also any others capable of being made analogue.

<edit> quick CubeMX play, 103c8 any debug is mainly pa13-pa15, also pb3.
pa0 is the wake-up pin. maybe needs handling differently ?
a 103v uses additional pins from pc & pe ports.
</edit>

i once had a unit to test with analogue inputs, they all had a cap across the inputs, one channel being driven gave the rest a 300mV leakage. all the various caps were effectively an ac potential divider.
that took a while to suss.

stephen

Post Reply