2017-12-07 07:56 AM
Hello,
I have a problem with the STM32H743.
I have a pluggable SPI connection and the STM32H743 works as a Slave in receive mode.
When I pull and plug the connection the NSS, CLK and Data connections toggles and I get some random data.
After I plug the cable the NSS signal doesn't resynchronises the transmission and I get some Bits from the old transmission and the transmission before.
How can I activate the resynchronisation of the SPI connection with the NSS signal?
I think the same problem will appear when the slave misses a clock or count a clock to much from an disturbance.
Best reguards
Tobi
#stm32h7-spi-sync2017-12-07 08:13 AM
I forgot to say, that the transmission is 16bit long and the Problem appears in interrupt and in dma mode.
For example I send every time following data:
0b1100 1100 1100 1100
before I pull the connection I receive the right data.
After I pull and plug the connection I get for example the flowing data:
0b1001 1001 1001 1001
It seems that the data in the rx shift register didn't get flushed with a high NSS.
The NSS connection is tested and OK
2017-12-07 09:12 AM
I have a pluggable SPI connection and the STM32H743 works as a Slave in receive mode.
This might be the problem.
The SPI bus was designed as a simple inter-IC bus, and has noe provisions for interrupted connections.
Spurious pulses could throw your clock count off and produce bit shifts.
And additional 'reset' signal might help, were the master forces a known initial state.
2017-12-08 02:59 AM
After taking a closer lock at the received data I saw, that the data were shifted by 8 bit (I configured SPI connection to 16 bit).
It seems, that the SPI interface of the mcu only flushes the last 8 bits and not the 8 bits before for the complete flush of the 16 bits.
Using the device in 8bit mode the SPI interface works correctly.
Is there a unknown bug on the h7?
I locked at the errata sheet of stm32h743 and din't found that problem.