cancel
Showing results for 
Search instead for 
Did you mean: 

Are GPIOs changed by boot loader?

ECost
Associate II

Device is STM3F030C. Boot loader is going to be called from application code.

The idea is that the application code initializes some GPIOs and put peripheral devices into a known state required for the system to work and then, if it detects a command to run the BL for IAP, then it performs the sequence prescribed in AN2606 section 4.1 and jumps to the BL.

USART1 is being used for IAP.

There are a couple of GPIOs that need to be set as active high outputs to control parts of the circtuit that need to be left alone by the BL during IAP. Topics on data sheets and manuals state the BL configures GPIOs; however it is not clear to me if it changes the GPIOs of the peripherals used (USARTx, I2C1) or all the GPIOs.

Thanks in advance for any help.

2 REPLIES 2

>>however it is not clear to me if it changes the GPIOs..

So step into it and observe.

My expectation is that it writes to several of the GPIO bank registers somewhat indiscriminately to effect the usage/scanning of potential input sources to the loader.

You might be able to determine an alternate entry point beyond where the peripheral and pins are configured, you should perhaps disassemble the ROM, doing some static analysis, and review your options.

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

Hello, Clive.

I had hopes of this to be specified somewhere in the fine print or someone from ST chiming in and stating it is safe using it the way I need.

Even if it works with the current release of the BL, I would not trust it to hold for future iteractions.

I will have to consider alternatives, hw and sw.

Thanks anyway.