cancel
Showing results for 
Search instead for 
Did you mean: 

Omitting empty check on STM32G071GB

kicur
Associate II

Hello,

It looks that empty check on STM32G071GB is causing some problems to my boards due to high, low signals on pins. I am trying to omit empty check procedure and program my MCU using st-link by SWD. Is there any procedure for such scenario? When connecting not powered st-link I can see that nRST is set to low which does not allow MCU to start but after connecting st-link to power it seems to reset MCU and it does empty check. The only "workaround" was to connect nRST directly to GND, connect st-link, click Connect and after ~0.5s disconnect nRST from GND.

Does anyone know how to omit this empty check and program fresh MCU using SWD? Thank you for any help.

5 REPLIES 5
KnarfB
Principal III

What ST-LINK pins are connected to your board? If NRST is connected, you could use "connect under reset" mode for programming the MCU.

hth

KnarfB

The System Loader is in "ROM", so unless you buy parts without it programmed, anticipate accommodating the pin usage expressed in AN2606. I'm not saying such parts are available, but the costs of conforming to your expectations may exceed just respinning the board to address the issues you've created for yourself. If you've got a history of buying $M of parts year over year, have a conversation with your sales/support rep.

Don't have noise sources on UART RX pins, from modems, or GPS, etc

Don't have critical dependencies on pin states created by the System Loader  

Many STM32 parts latch the Empty Flash Status, a Reset might not be sufficient to clear it, a Power Cycle might be required.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Have your Distributor preprogram a firmware/loader of your own prior to delivering parts to your PCBA house.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kicur
Associate II

@KnarfB 

I am using TC2050 connector and I have SWCLK, SWDIO and NRST pins connected. I know that CUR mode is okay for this purpose but I can't do it properly. I first plug unpowered st-link to PCB, which holds MCU under reset. Then I power PCB and it's still under reset of course but after plugging st-link to power it resets MCU and it does empty check before I can use "connect under reset" mode. My problem is that my power supply does not survive current peak at the start of the st bootloader and it causes damage to my PCB. I know that solution is to change power supply which I will do but I am just curious if there is any way to omit empty check before programming.

 

@Tesla DeLorean 

These are just prototypes, we are programming MCU's directly on the PCB. It's not a big problem for now, I am thinking more about future projects with G0 series and how to properly deal with this topic. Surely I prefer to redesign PCB, I am not big enough to talk about custom parts. Do you know if there is any short circuit protection in MCU when bootloader pin configuration is causing any? I guess there is and as I wrote earlier it causes current peak which my power supply unit does not survive. Otherwise in such small MCU there would be just few pins left floating before programming safe to use.

No, I don't think there's any specific short/current protection, it will just try to drive the pins against whatever signal you are presenting.

Now the UART RX are generally set as TIM inputs, and the UART TX not driven, until a pattern is seen/measured and the pair configured for UART operation.

What you probably need to do is create a list of potential usage per AN2606, and then show your PCB usage for these same pins. At that point people might be able to give specific opinions/suggestions.

This would at least flag to forum members and ST, what they need to consider when continually updating and expanding the scope of the system loader functionality. I'd prefer to see notation in the Data Sheet, and via CubeMX, as spreading important details and considerations across multiple files is just unhelpful and lead to these things being missed.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..