cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot communicate with STM32H7B3I SPI2 Bootloader

FrankNatoli
Associate III

Have twin STM32H7B3I EVAL systems, connected to each other both by I2C and SPI2.

For test purposes, implemented code in one system to act as SPI2 master for bootloader operation, and implemented code in the other system to act as SPI2 slave for bootloader operation.

Master sends SYNC, gets SYNC back from Slave.

Master pulls three byte ACK from Slave.

Master sends Get Version command, gets ACK from Slave, then gets one byte version, then gets another ACK from Slave.

Master sends Get ID command, gets ACK from Slave, then gets three byte ID [byte count minus one followed by two ID bytes], then gets another ACK from Slave.

So the hardware looks good and, assuming I understood the AN4286 specification correctly, the Master code should be able to interact with the real STM32 BOOTLOADER in the Slave.

Power off Slave, set SW1=ON, power on Slave, rerun Master code, only get 0xFF from the Slave, which of course means the Slave is not clocking any data out.

What might I be overlooking regarding SPI BOOTLOADER Master/Slave protocol?

4 REPLIES 4
MM..1
Chief II

You need handle initial interface selection , maybe your code dont meet this read AN2606

0693W00000KZlrRQAT.png

To the best of my knowledge, I am complying with AN2606, see CubeMX settings:

I'm not using the NSS directly from SPI because, using a logic analyzer, we found that chip select [NSS] was remaining asserted [low] after the buffer had been transferred.

So we disabled direct NSS and wired GPIO to PB12 and it works fine, when my own firmware is running in the SPI slave but not when the STM Bootloader is running.

Here are the CubeMX Parameters:

Can anyone point to a sample STM32 project that implements master SPI HAL function driven programming of a slave SPI bootloader?