cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Bootloader Synchronization Issue

dscdsc
Senior

I'm following the bootloader ACK procedure outlined in AN4286, page 6.

0693W00000GZia2QAD.png 

The issue I'm having is that the bootloader never responds with 0x79 (ACK) or 0x1F (NACK) after the initial synchronization (Sent 0x5A, Received 0xA5).

0693W00000GZicNQAT.png 

Are there any issues with my understanding of the procedure? I'm assuming the dummy byte first sent by the bootloader is supposed to be used throughout the procedure?

I'm using STM32H750B-DK with erased flash memory, and proper PI0, PI1, PI2, PI3 pins for SPI2 as outlined in AN2606, page 263.

SCK is pulled down to GND with a 10k resistor, NSS is pulled down at the start of every transaction (tying it to GND as suggested in the docs seems to work worse).

Seems like a similar issue to post, but not the same Cannot get into the factory ST bootloader from AN2606 for programming over.

1 ACCEPTED SOLUTION

Accepted Solutions
dscdsc
Senior

Able to get to ACK by sending 0x00 instead of the initial dummy byte, but it takes 40 attempts.

0693W00000HnxrZQAR.png

View solution in original post

12 REPLIES 12
TDK
Guru

What's the time scale here? Are you waiting 8+us between the first and second byte as required per AN2606?

If you feel a post has answered your question, please click "Accept as Solution".
dscdsc
Senior

Yes, the interval between the transfers (on the right side of the image) is 1ms.

TDK
Guru

It would be nice to see the full scope trace from reset. You have stuff happening before the sync byte which makes me think it may already be in the bootloader. The sync frame is only done once to enter the SPI bootloader.

If you feel a post has answered your question, please click "Accept as Solution".
dscdsc
Senior

Here's the different but equally disappointing results when using SPI1 (PA4, 5, 6, 7).

0693W00000GZinLQAT.png

Here's the trace from reset.

0693W00000GZj18QAD.png

dscdsc
Senior

And the same result for SPI3 (PC12, 11, 10, PA15).

0693W00000GZj5tQAD.png

dscdsc
Senior

Seems like my understanding is correct as it matches the behavior in this SPI bootloader host implementation.

dscdsc
Senior

Getting essentially the same result when using an another STM32H7 as a bootloader host. Just running the example from the implementation in the previous post.

0693W00000GZrNgQAL.png