2015-09-01 05:24 AM
I have an STM32F4 Discovery board and I'm trying to talk to the boot loader. I have brought it up and I have successfully executed the 'Get', and 'Get Version and Read Protection Status' commands. When I try the 'Read' command, I get a NAK on the length byte. I am sending 11 EE 10 00 00 00 10 0F F0 (checksum bytes in bold)- trying to read 16 bytes at 0x10000000. I get ACK's after the command and address but a NAK after the length byte checksum.
The Get Version and Read Protection Status command returns the following:BL Version: 3.1 Option 1: 0x00 Option 2: 0x00I am following the flow charts in AN3155 and have referenced 2606 and various other app notes. What am I missing? Any help is appreciated.Tom2015-09-01 09:26 AM
The STM32F4-DISCO USART1 (PA9/PA10) port is not viable, might be semi-functional at very low speeds.
Consider USART3, don't recall the pins Check the 0x08000000 256 Read command sequence in , waiting for the checksum at each stage. No sure 0x10000000 is supported, would need to check the code.2015-09-01 09:37 AM
Not sure 0x10000000 is supported, would need to check the code.
I don't think CCM is a supported region in the loader code, SRAM address should be above 0x20002000, or 0x20003000 depending on loader version. Addresses passed in are sanitized against a list of regions and sizes, so the processor won't Hard Fault on your request.2015-09-01 11:00 AM
Turns out it was the address. I guess I expected the address to get NAK'd in that case- but I should have tried another address to begin with I suppose. I am using PB10 and PB11 (USART 3)- I found that issue at some other point in time. Thanks for your help on that, it is working now.
Is there a way to 're-sync' with the bootloader. Once it is up and the baud rate handshake sync has completed, it does not respond to the 0x7f anymore. I have to reset the board to get it to respond to the sync character again. It's a little cumbersome because while I'm debugging, everytime I make a change to my app, I have to reset the board. I would like to be able to have the app come up and detect the boot loader. Is there a recommended way to do this?2015-09-01 11:57 AM
It technically doesn't listen for 0x7F, it's looking for the symbol/signal to measure the bit timing against the internal clock. It's a one-shot deal.
I think it should respond to 0x7F with an ACK or NACK in normal operation, you could probably EXEC against 0x1FFF0000 to reset the part.Provided you haven't changed baud rate you can probably send some sequences to see if it responds and resync that way.