Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

STM32F103C8 - the Boot0 pin

401 views
Skip to first unread message

Peabody

unread,
Dec 11, 2017, 3:40:12 PM12/11/17
to

I have the DSO150 Shell kit scope, which uses the STM32F103C8 processor at
3.3V. JYE-Tech provides a way to update the firmware, but it requires
opening the case, connecting leads from an external USB-to-Serial module to
the GND, RX and TX through-holes, and solder-bridging Boot0 (to 3.3V) and
Boot1(to GND). Then after flashing you have to undo all of that. We're on
about the sixth update now, and this is getting old.

I would like to embed a CP2102 USB-to-Serial module in the existing circuit
so all I would need to do to flash firmware is connect a USB cable. The GND,
TX and RX connections are straightforward, and it appears that Boot1 can be
tied to ground and left that way during normal operation.

That leaves Boot0, which needs to be high on boot to enter the bootstrap
mode. I would like to tie Boot0 to the 3.3V output of the module. So I
could plug in the live USB cable, then power up the scope. But initially
that would mean that since Vdd is at ground when the scope power is off,
when I plug in USB I would be applying a low-impedance Vdd + 3.3V to the
Boot0 pin.

I have zero experience with these ST mcu's, and I can't tell from the
datasheet whether doing it this way would cause too much current to flow into
the pin - either through the protection diode or otherwise. Boot0 appears
to be a 5V tolerant pin, but I assume that's with Vdd at 3.3V. So I don't
know.

Does anyone know for sure if this would work? If not, how would I go about
finding out non-destructively?

I should say that another approach would be to use the module's 3.3V output
to power the ST, and leave the scope power switched off. Then everything
would come up at the same time. But I don't know if the module can power all
of the things powered from the 3.3V rail. Also, these modules don't behave
well when they are powered down (when USB isn't connected). They can sink a
good bit of current. Of course I could insert a diode or p-channel mosfet to
prevent that, but that just complicates things more. So the original plan
would be best if it won't damage anything.

http://www.st.com/resource/en/datasheet/stm32f103c8.pdf

Lasse Langwadt Christensen

unread,
Dec 11, 2017, 4:02:52 PM12/11/17
to
5.3.1 table 9. I/O input voltage boot0 0-5.5V


Peabody

unread,
Dec 11, 2017, 6:09:29 PM12/11/17
to
Lasse Langwadt Christensen says...

> 5.3.1 table 9. I/O input voltage boot0 0-5.5V

Yes, but I don't know if that assumes that Vdd is at 3.3V.

Lasse Langwadt Christensen

unread,
Dec 11, 2017, 6:44:44 PM12/11/17
to
The other pins have their input limits with a specification for Vdd,
boot0 is separated out and doesn't so that is unlikely

Klaus Kragelund

unread,
Dec 12, 2017, 2:01:38 PM12/12/17
to
Add a high resistance in series with the Boot pin so you are long away from the maximum latchup current

Cheers

Klaus

rickman

unread,
Dec 12, 2017, 6:30:02 PM12/12/17
to
If the max voltage on a pin depends on Vdd, they list the max spec as a
function of Vdd such as "Vdd+0.3V". If they list it as a specific voltage
it depends on nothing else. Sometimes the chip will at least need to be
powered up in which case they will usually use a foot note to indicate that.

They don't typically leave you hanging on MCU spec sheets.

--

Rick C

Viewed the eclipse at Wintercrest Farms,
on the centerline of totality since 1998

Klaus Kragelund

unread,
Dec 14, 2017, 7:27:18 AM12/14/17
to
On Wednesday, December 13, 2017 at 12:30:02 AM UTC+1, rickman wrote:
> Peabody wrote on 12/11/2017 6:09 PM:
> > Lasse Langwadt Christensen says...
> >
> > > 5.3.1 table 9. I/O input voltage boot0 0-5.5V
> >
> > Yes, but I don't know if that assumes that Vdd is at 3.3V.
>
> If the max voltage on a pin depends on Vdd, they list the max spec as a
> function of Vdd such as "Vdd+0.3V". If they list it as a specific voltage
> it depends on nothing else. Sometimes the chip will at least need to be
> powered up in which case they will usually use a foot note to indicate that.
>
> They don't typically leave you hanging on MCU spec sheets.
>
> --
>
Vdd+0.3V is not an absolute number. They write that to make sure you don't drive current into a pin to have the micro going into SCR latchup

So if you add a current limiting resistor, you can drive it with pretty much any voltage

Cheers

Klaus

Rob

unread,
Dec 14, 2017, 1:14:11 PM12/14/17
to
Peabody <waybackNO...@yahoo.com> wrote:
>
> I have the DSO150 Shell kit scope, which uses the STM32F103C8 processor at
> 3.3V. JYE-Tech provides a way to update the firmware, but it requires
> opening the case, connecting leads from an external USB-to-Serial module to
> the GND, RX and TX through-holes, and solder-bridging Boot0 (to 3.3V) and
> Boot1(to GND). Then after flashing you have to undo all of that. We're on
> about the sixth update now, and this is getting old.

Interesting, I have such a kit but wasn't aware of firmware updates.

> That leaves Boot0, which needs to be high on boot to enter the bootstrap
> mode. I would like to tie Boot0 to the 3.3V output of the module. So I
> could plug in the live USB cable, then power up the scope. But initially
> that would mean that since Vdd is at ground when the scope power is off,
> when I plug in USB I would be applying a low-impedance Vdd + 3.3V to the
> Boot0 pin.

Is there any reason why it would need to be low-impedance?
Why not just put some "safe" resistor value in series with the signal?

(low when compared to the input impedance, high when compared to currents
you would want to run into the pin. e.g. 10K)

Lasse Langwadt Christensen

unread,
Dec 14, 2017, 1:23:15 PM12/14/17
to
Xilinx FPGAs usually have something like Vdd+0.3 or <20mA in the datasheet



rickman

unread,
Dec 14, 2017, 2:12:35 PM12/14/17
to
Klaus Kragelund wrote on 12/14/2017 7:27 AM:
> On Wednesday, December 13, 2017 at 12:30:02 AM UTC+1, rickman wrote:
>> Peabody wrote on 12/11/2017 6:09 PM:
>>> Lasse Langwadt Christensen says...
>>>
>>> > 5.3.1 table 9. I/O input voltage boot0 0-5.5V
>>>
>>> Yes, but I don't know if that assumes that Vdd is at 3.3V.
>>
>> If the max voltage on a pin depends on Vdd, they list the max spec as a
>> function of Vdd such as "Vdd+0.3V". If they list it as a specific voltage
>> it depends on nothing else. Sometimes the chip will at least need to be
>> powered up in which case they will usually use a foot note to indicate that.
>>
>> They don't typically leave you hanging on MCU spec sheets.
>>
>> --
>>
> Vdd+0.3V is not an absolute number. They write that to make sure you don't drive current into a pin to have the micro going into SCR latchup

No, Vdd+0.3V is relative to Vdd. That's the point.


> So if you add a current limiting resistor, you can drive it with pretty much any voltage

You can drive the resistor with a wider range of voltage. But then you get
RC delays and slow edges at the I/O pin which may or may not be a problem,
but it should be recognized and understood. The I/O pin still has the same
voltage limit.

rickman

unread,
Dec 14, 2017, 2:32:48 PM12/14/17
to
The data sheet says BOOT0 is NOT 5 volt tolerant, so you can only apply VDD
+0.3 to the pin. So if the MCU has no power the voltage on the pin needs to
be kept low. They go on to say if you can't respect this voltage the
injected current (injected into the substrate through the I/O pin) must be
kept below 5 mA. Since you don't need to toggle the pin in this mode you
should be ok with a series resistor of 1kohm or higher tying the pin to Vdd
of the CP2102 module.

Lasse Langwadt Christensen

unread,
Dec 14, 2017, 2:40:46 PM12/14/17
to
where?

5.3.1 General operating conditions

Vin: I/O input voltage, BOOT0: 0-5.5V

with no other conditions, the other pins have conditions on Vdd





rickman

unread,
Dec 14, 2017, 2:51:58 PM12/14/17
to
The data sheet I have lists 5 volt tolerance in table 3.

"44 60 94 BOOT0 I BOOT0"

If it were 5 volt tolerant it would show "FT" between the I and BOOT0.

Maybe my data sheet is old. It covers the STM32F103x8 and is dated June
2007, there are newer versions.

The copy of the data sheet linked to above still does not include the BOOT0
pin as 5 volt tolerant in the I/O table, but I see it is listed separately
in the electrical tables. While the 5 volt tolerant pins seem to be
specified only under power that is not shown for the BOOT0 pin, so I assume
they figured out this might be a problem and made sure it would handle up to
5.5 volts even with no power applied to Vdd.

So it looks like no resistor is needed for the BOOT0 pin when the chip is
not powered, but don't try this with any other pin, 5 volt tolerant or not.

Peabody

unread,
Dec 15, 2017, 3:51:53 PM12/15/17
to
Rob says...

> Interesting, I have such a kit but wasn't aware of
> firmware updates.

Yes, just go to JYETech.com, find the DSO150, then
"Firmwares". I've been impressed with the support and
continued development JYE Tech offers on this. There's also
a forum, which has additional instructions on flashing.

I should add for those interested in getting one of these
that you need to buy it from Banggood or other JYE-approved
seller. There are lots of fakes around, and JYE has started
limiting support and firmware updates to genuine devices.

> Is there any reason why it would need to be
> low-impedance? Why not just put some "safe" resistor
> value in series with the signal?

I didn't say in the original post, but the existing circuit
has Boot0 tied to ground through a 1K resistor. And that
complicates things unless I want to be messing with the tiny
SMD parts. Well, I could just remove that 1K and tie Boot0
to the adapter's 3.3V through a higher value resistor.

But I've hit another snag that defeats what I was trying to
accomplish with an embedded USB adapter. In addition to the
UART connections, Boot0 needs to be high for flashing mode,
and Boot1 needs to be low. Based on the datasheet, I
assumed that Boot1 could just be tied low all the time since
its state matters only when Boot0 is high.

But I tried tying Boot1 low, and the scope will not boot
into normal operation. So in additon to what the datasheet
requires, there must be something in the bootstrap code that
actually checks the state of Boot1 even though it doesn't
really need to.

Anyway, in the end I've just taken over the SWD header
through-holes, and converted them to provide for jumpers for
Boot0 (to Vcc) and Boot1 (to GND), with pin headers for
everything, including the now-external USB adapter. So to
flash new firmware, I just slip individual jumpers on the
Boot headers, and connect the adapter to the UART header.
And all I really wanted to accomplish was to avoid having to
open up the danmed thing to flash firmware, and this
solution accomplishes that. When I've tested it, I'll post
pictures in the forum.

I should also say that the Tx and Rx UART pins of the STM32
*are* 5V tolerant, and in fact the data sheet says it's not
posssible to inject current into them. So I think those
pins would have no problem with applying 3.3V to them when
the STM32 is powered down. But I don't think that's typically
true for all microprocessors.

Rob

unread,
Dec 15, 2017, 4:37:57 PM12/15/17
to
Peabody <waybackNO...@yahoo.com> wrote:
> Rob says...
>
> > Interesting, I have such a kit but wasn't aware of
> > firmware updates.
>
> Yes, just go to JYETech.com, find the DSO150, then
> "Firmwares". I've been impressed with the support and
> continued development JYE Tech offers on this. There's also
> a forum, which has additional instructions on flashing.
>
> I should add for those interested in getting one of these
> that you need to buy it from Banggood or other JYE-approved
> seller. There are lots of fakes around, and JYE has started
> limiting support and firmware updates to genuine devices.

Yeah, in the meantime I searched and found the original site and
found that I have one of those fake kits. Well, it performs its
basic functions, maybe I'll get an official JYE kit later.
(the DSO150 or one of their other kits)

For me, it is more or less a toy but it already proved useful once
to quickly set a signal level. I would love to see a slightly
extended version, 2-channel or 1-channel with external trigger,
and maybe slightly more bandwidth (say, 10 MHz). Available as USB pod
to be connected to a laptop for sure, but this standalone device has
its appeal as well.

Peabody

unread,
Dec 15, 2017, 9:06:37 PM12/15/17
to
Rob says...

> For me, it is more or less a toy but it already proved
> useful once to quickly set a signal level. I would love
> to see a slightly extended version, 2-channel or
> 1-channel with external trigger, and maybe slightly more
> bandwidth (say, 10 MHz). Available as USB pod to be
> connected to a laptop for sure, but this standalone
> device has its appeal as well.

I have found mine to be surprisingly useful. I don't
have a "real" scope, so I've used the DSO to examine MSP430
BSL handshaking, servo controls, and similar slow stuff.
And it's portable, and floating. But I agree about two
channels, and I wish they would include a real probe with it
instead of the aligator clip probe. I doubt it would cost
that much more. And a power supply while they're at it.

> I searched and found the original site and found that I
> have one of those fake kits.

I think you can still upgrade the firmware, up through v.64.


rickman

unread,
Dec 15, 2017, 10:41:34 PM12/15/17
to
What if you could have two channels each sampling at 50 MHz, but with only
say 4 bits of resolution? The resolution at lower rates could be better
approaching 15 bits at audio rates.

Rob

unread,
Dec 16, 2017, 4:05:22 AM12/16/17
to
Peabody <waybackNO...@yahoo.com> wrote:
> Rob says...
>
> > For me, it is more or less a toy but it already proved
> > useful once to quickly set a signal level. I would love
> > to see a slightly extended version, 2-channel or
> > 1-channel with external trigger, and maybe slightly more
> > bandwidth (say, 10 MHz). Available as USB pod to be
> > connected to a laptop for sure, but this standalone
> > device has its appeal as well.
>
> I have found mine to be surprisingly useful. I don't
> have a "real" scope, so I've used the DSO to examine MSP430
> BSL handshaking, servo controls, and similar slow stuff.
> And it's portable, and floating. But I agree about two
> channels, and I wish they would include a real probe with it
> instead of the aligator clip probe. I doubt it would cost
> that much more. And a power supply while they're at it.

I have enough probles laying around that I can use with it, and
they of course are available from the wellknown stores.
It would have been convenient when the case included space for a
9V battery. I now use it with a cable like this:
https://www.jayconsystems.com/9v-battery-clip-with-5-5mm-2-1mm-barrel-jack.html
.. but the battery dangling from the case is inconvenient.

Rob

unread,
Dec 16, 2017, 4:12:50 AM12/16/17
to
rickman <gnu...@gmail.com> wrote:
> What if you could have two channels each sampling at 50 MHz, but with only
> say 4 bits of resolution? The resolution at lower rates could be better
> approaching 15 bits at audio rates.

50 MHz is a completely different ballpark. They use a microcontroller
with internal A/D converter and likely the samples are just read in
software. For those faster sampling rates you need a suitable converter
and some FPGA or similar to make a DMA controller to store the samples
in some memory, then read them from that memory into the controller.

Then you quickly get the complexity that the existing external USB
devices have, at corresponding cost:

https://www.aliexpress.com/item/ISDS205X-Virtual-PC-USB-oscilloscope-DDS-signal-and-logic-analyzer-2CH-20-MHz-bandwidth-48MSa-s/32656469310.html

handheld versions are available as well, of course getting more and more
expensive (but still cheap compared to what a scope used to cost):

https://www.aliexpress.com/item/All-sun-25MHz-100MSa-s-Digital-2in1-Handheld-Portable-Oscilloscope-Multimeter-Two-Dual-Channel-Waveform-USB/32773623426.html

rickman

unread,
Dec 16, 2017, 10:57:54 AM12/16/17
to
I guess I didn't realize I was in a group of experts!

I'm talking about something completely different from what you are familiar
with. It would be capable (like I said) of sampling at 50 MHz capturing
samples with about four bits of accuracy. Any lower rate would be produced
by filtering and decimating the data stream.

It does not require a dedicated ADC and does not use an FPGA. BTW, I'm
pretty sure the $100 unit you link to doesn't have those things either. I
have the Hantek version of that device and it uses an MCU, two actually, one
for the scope and one for the logic analyzer. Two totally separate
instruments in one package. It was a total disappointment not even counting
the fact that the software won't run on my PC. Dog crap! Good thing I got
it for free...

Rob

unread,
Dec 16, 2017, 2:03:11 PM12/16/17
to
rickman <gnu...@gmail.com> wrote:
> It does not require a dedicated ADC and does not use an FPGA. BTW, I'm
> pretty sure the $100 unit you link to doesn't have those things either. I
> have the Hantek version of that device and it uses an MCU, two actually, one
> for the scope and one for the logic analyzer. Two totally separate
> instruments in one package. It was a total disappointment not even counting
> the fact that the software won't run on my PC. Dog crap! Good thing I got
> it for free...

At 50 MHz it could still be possible... of course the benchtop scopes
have 1..2 Gs/s and do use the Fast ADC + FPGA + sample memory method.
(with a processor for the user interface)

rickman

unread,
Dec 16, 2017, 2:37:41 PM12/16/17
to
Yes, and the price tag isn't all that bad for lower end benchtop models.
But it seems if you take the entire user interface off the scope and use a
USB interface to a PC the price goes UP!

Rob

unread,
Dec 17, 2017, 7:05:55 AM12/17/17
to
That is probably due to comparison of devices from different generations.
At some time, fully digital scopes were very expensive and the devices
with USB interface to a PC were developed to remove the cost of the
user interface hardware and make them affordable to hobbyists.

But technology kept progressing and hardware kept getting cheaper (due
to volume production for other devices like mobile phones, tablets etc)
and now the standalone benchtop scopes can be produced for again less
money than those (small volume) USB devices. When new USB devices would
be developed, they probably again would be cheaper, but there is little
point to do so now, as the lowcost benchtop 300 MHz storage scopes now
cost less than a 2-channel 30 MHz analog scope with no storage cost
25 years ago, even without considering inflation.

rickman

unread,
Dec 17, 2017, 9:38:36 AM12/17/17
to
People don't buy attached scopes because they want to save money. They buy
them because they reduce the clutter on your work bench and are infinitely
more portable. At least that's why I want one. It just bugs me that the
price is so much more for a good quality attached unit.

I don't think your cost analysis holds water. Both types of scopes are
redesigned very few years. I don't see any reason why there would be a
"lag" in the reduced cost of attached scopes.
0 new messages