cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to talk to the STM32f401re device System Bootloader Memory through HOST(Pc). Receiving NACK byte

Nchun.1
Senior

Hi

I have enabled system Bootloader in my stm32f401re(Nucleo-Board) by triggering Boot_0 =1 ,Boot_1 = 0 which boots from system memory. I am able to flash my device through UART1 Interface and STM32 Cube programmer as Host.

Now when i tried to write a python script to communicate with system bootloader ,Receiving NACK command at first command itself as per application Note

Kindly help in solving this issue

Please find screenshots


_legacyfs_online_stmicro_images_0693W00000bjUwrQAE.png

3 REPLIES 3

No showing anything helpful here.

Needs to be 8-bit EVEN Parity, 1-Stop (8E1) would start at 9600 baud.

What specifically gets sent?

You can't just keep jamming bytes out.

You need to send the 0x7F test pattern and WAIT for a response.

It's not "receiving" the 0x7F it is using it to measure the baud rate.

It should do that and send a response. It's a ONE SHOT deal, if it gets the baud rate wrong you need to reset and start over.

If that gets an 0x79 you can THEN send the command

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

I have tried with 9600 Baud rate. but same issue persists

Please look into it


_legacyfs_online_stmicro_images_0693W00000bjV0FQAU.png

Hi @Community member​ 

Got Clarity about communication between STM32 board(Device) and my Python script (Host)

Firstly, I have verified the data with logic analyzer from HOST and DEVICE with STM32CubeProgrammer

Response from DEVICE for ACK is 0x79 at initial/first communication for baud rate setting after power up/reset as shown in below image


_legacyfs_online_stmicro_images_0693W00000bjWTrQAM.pngResponse from DEVICE for ACK is 0x1F after first communication sequence as shown in below image


_legacyfs_online_stmicro_images_0693W00000bjWUQQA2.png 

After observing the both RESPONSE packet ACK and NACK for "0x7F"Baud rate setting, Host is considering the acknowledge at only in initial communication.

Below packet analysis found HOST is ignoring NACK received from DEVICE after baud rate setting.Communication is Healthy


_legacyfs_online_stmicro_images_0693W00000bjWUVQA2.pngI am Clear now.

Thank you