2018-07-12 11:11 PM
Hello ST Team,
I am working on STM32091C-EVAL board, and I need to work on SPI so loopback test preferred. But I am facing some issue while receiving the data, receiving 3 consecutive bytes(except 1st byte) repeatedly.
What I have done:
- Connect MISO and MOSI to test loopback test.
- Configure SPI in Master mode, also with many parameters what it needed to register the handler.
- I am sending static data and trying to receive it with that static length.
What I am facing:
- If I send 'abcdefghi', then I would receive 'bcdbcdbcd', I don't know why the first character is missing and why this is so repeatedly?
Note:
- By 'HAL_SPI_TransmitReceive_IT' API I am not facing any issue in Tx and Rx, but this persists only in separate APIs for Tx and Rx('HAL_SPI_Transmit_IT' and 'HAL_SPI_Receive_IT'),
However, I am able to Tx the data using '
HAL_SPI_Transmit_IT' API but not able to receive proper data using '
HAL_SPI_Receive_IT' (As described above).
Let me know if you need any more information.
Any suggestions are welcome.
Thanks in advance,
Hardik Prajapati
#hal-spi #spi-communication #spi-write-and-read #spi_rx #stm32-spi-interrupts #spi