cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F401 USART Bootloader Issue

krazzak
Associate

Hi

I am having an issues trying to program an STM32F401 LQFP-64 chip over USART. Previously I have been able to do this on a STM32F103 with no issues.

Boot0 pin is connected to Vdd and Boot1 is connected to ground. I am using USART1(PA9/10). When I send the wake bootloader command from my PC using an FTDI serial adapter, I do not get an ACK response, however when using a STM32F103 with the boot pins and all other external hardware the same the bootloader responds as expected. I have tried scoping out the Tx and Rx lines and I can see 0x7F on Rx but no response on Tx. I have also tried adding pull up resistors on the Tx pin and I am still not getting any output. I can connect and program the chip on SWD and read back the full memory which implies the chip is working fine.

Looking at the STM32 microcontroller system memory boot mode - Application note p127 it says that USART1_TX pin is configured as "PA9 pin: USART1 in transmission mode. Used in input no pull mode." does this mean it is configured as open-drain ? If so what other external circuitry do I need ? It is worth noting that the F1 is configured as "PA9 pin: USART1 in transmission mode. Used in alternate push-pull, pull-up mode." and works just fine.

 

Many Thanks for your help

3 REPLIES 3

Noise / Chatter on ANY of the other pins the System Loader might be determining as "First Contact" ?

Say GPS/GNSS receiver, or other devices that squawk at startup.

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

Hi 

Many thanks for your response. I haven't looked at scoping the other pins the system loader might be using yet, but I have pulled them all (or at least all that I can think of) down to ground such that any noise from them floating doesn't cause the boot loader to startup on a different peripheral. I have grounded USB OTG, I2C1, I2C2, I2C3, SPI1, SPI2 and SPI3. It looks like this package doesn't have a USART2.

To show you what I am seeing I have attached two waveform from my scope. One shows what I am seeing when running user flash code which echos back any char sent on Rx back on Tx this is all working as expected.

boot-flash.jpg

When I enter boot loader mode (Boot0=1 Boot1=0) and attempt to wake up the boot loader on USART1 this is what I am seeing.

boot-systemmem.jpg

I am getting some kind of reflection back on Tx from the chip, but no actual valid ACK response.

Do you have any further suggestions ?

If it's not responsive, perhaps it's not entering the System Loader at all, or there's an issue with the HSE clock starting, and being at a measurable / acceptable frequency?

 

USART2, most of the IC have this via PA2/PA3

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