Skip to main content
Visitor II
December 1, 2021
Solved

SPI Bootloader Synchronization Issue

  • December 1, 2021
  • 11 replies
  • 3943 views

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.

    This topic has been closed for replies.
    Best answer by dscdsc

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

    0693W00000HnxrZQAR.png

    11 replies

    Super User
    December 1, 2021

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

    dscdscAuthor
    Visitor II
    December 1, 2021

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

    Super User
    December 1, 2021

    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.

    dscdscAuthor
    Visitor II
    December 2, 2021

    Here's the trace from reset.

    0693W00000GZj18QAD.png

    dscdscAuthor
    Visitor II
    December 1, 2021

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

    0693W00000GZinLQAT.png

    dscdscAuthor
    Visitor II
    December 2, 2021

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

    0693W00000GZj5tQAD.png

    dscdscAuthor
    Visitor II
    December 2, 2021

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

    dscdscAuthor
    Visitor II
    December 2, 2021

    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

    Super User
    December 3, 2021

    I appreciate you posting updates. I don't have any further ideas, looks like you're doing everything correctly as far as I can tell.

    I have several H7 boards so maybe I'll try it out as well.

    dscdscAuthorAnswer
    Visitor II
    December 8, 2021

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

    0693W00000HnxrZQAR.png