One byte shifting in transmit data in STM32F072RB while using SPI with DMA
Hi Team,
Recently while working with STM32F072RB , I am using DMA mechanism with SPI. I am receiving a 63 bytes of data continuously from an external system at every 1ms.
In STM32F072RB, I have enabled two SPI-SPI1 &SPI2. From/to the external system. I have to receive and transmit 63bytes of data simultaneously . I am receiving 63bytes of data in SPI1 and SPI2 happening with no shifting.
But coming to the transmit part for SPI1 and SPI2, I am getting 63 bytes of data(i.e. frame 1 ), but in byte shifting is happening in this 63 bytes. For example , frame 1's last byte(62nd index position) is coming as 1st byte in the Frame2(0th index position)(checked in logic analyser) .
I am using below function for both SPI's.
HAL_SPI_TransmitReceive_DMA(&hspi2, (uint8_t*) aTxLeftBuffer,
(uint8_t*) aRxLeftBuffer, 63);
