cancel
Showing results for 
Search instead for 
Did you mean: 

PA6 GPIO gets on while STM32L452REY6 in internal boot mode

parth2
Associate II

Hi Team,

We are working on the locomotive-based custom product design where we are using the STM32L452REY6 microcontroller. We have one requirement to update the STM32L452REY6 firmware using the internal bootloader over the UART.

We have referred following documents to develop this feature.

https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

https://www.st.com/resource/en/application_note/an3155-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

The firmware update is working well. But When the Microcontroller goes into bootloader mode PA6 GPIO turns ON.

My query is,

Why PA6 GPIO getting ON While the microcontroller in boot mode?

Please let me know if you need more information for the same.

Thanks,

Parth

 

5 REPLIES 5
Uwe Bonnes
Principal III

Have again a look at AN2606. E.g. in Rev 46: Table 123

-SPI1_MISO pin

-Output

- PA6 pin: Slave data output line, used in push-
pull, pull-down mode

By "turn on" do you mean set to '1'? Then probably the SPI Bootloader got activated...

parth2
Associate II

Hi,

We have used this pin as GPIO output in the application code and externally we have pulled down with 100k. But we still get high in boot mode.

 

Thanks,

Parth

Probably NSS pin is ewxternal pulled low and so PA6 prepares to send 0xA5 and so PA6 is high.

parth2
Associate II

Hi @Uwe Bonnes,

This pin( SPI1_NSS(PA4)) is externally pulled up with 100k value.

Thanks,

Parth

https://community.st.com/t5/stm32-mcus-products/pristine-stm32l431-pa6-turned-to-hard-output/td-p/640129

I'm not sure NSS is involved at all.

I personally would recommend to avoid the internal bootloader, write your own.

JW