STM32F103C8 - the Boot0 pin

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.

formatting link

Reply to
Peabody
Loading thread data ...

Den mandag den 11. december 2017 kl. 21.40.12 UTC+1 skrev Peabody:

5.3.1 table 9. I/O input voltage boot0 0-5.5V
Reply to
Lasse Langwadt Christensen

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

Reply to
Peabody

The other pins have their input limits with a specification for Vdd, boot0 is separated out and doesn't so that is unlikely

Reply to
Lasse Langwadt Christensen

Add a high resistance in series with the Boot pin so you are long away from the maximum latchup current

Cheers

Klaus

Reply to
Klaus Kragelund

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
Reply to
rickman

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

Reply to
Klaus Kragelund

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

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)

Reply to
Rob

Xilinx FPGAs usually have something like Vdd+0.3 or

Reply to
Lasse Langwadt Christensen

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

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.

--

Rick C 

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

Peabody wrote on 12/11/2017 3:40 PM:

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.
--

Rick C 

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

Den torsdag den 14. december 2017 kl. 20.32.48 UTC+1 skrev rickman:

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

Reply to
Lasse Langwadt Christensen

Lasse Langwadt Christensen wrote on 12/14/2017 2:40 PM:

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.

--

Rick C 

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

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.

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.
Reply to
Peabody

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.

Reply to
Rob

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 think you can still upgrade the firmware, up through v.64.

Reply to
Peabody

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.

--

Rick C 

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

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:
formatting link
.. but the battery dangling from the case is inconvenient.
Reply to
Rob

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:

formatting link

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

formatting link

Reply to
Rob

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...

--

Rick C 

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

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.