2025-02-27 7:56 PM
MCU : STM32F103VET6 (Master & Slave)
STM32 Cube MX : 6.12.0
Firmware package version : 1.8.6
Master MCU configure
- Receive only Master
- NSS : Disable ( However, different GPIO sent a signal for the slave NSS )
- Clock 72 Mhz
- SPI Prescaler: 4 (9.0 MBits/s)
- Data size 16 Bits
- DMA Use ( Normal, Halfword )
Slave MCU configure
- Receive only Master
- NSS : Hardware NSS Input signal
- Clock 72 Mhz
- Data size 16 Bits
- DMA Use ( Normal, Halfword )
The SPI slave is working as expected.
HAL_SPI_Transmit_DMA() >>> HAL_SPI_TxCpltCallback() Success.
But the SPI master in not working.
HAL_SPI_Receive_DMA() >>> Not called HAL_SPI_RxCpltCallback()
After checking, it turned out that an OVF occurred.
However, data transmission and reception between the Master and Slave were both completed successfully,
and the data comparison test also passed.
The size parameter used in the DMA function call is the same on both sides.
What could be the problem?
Solved! Go to Solution.
2025-02-28 6:47 AM
RXONLY mode sends clocks continuously. Since there is some amount of delay between the last byte you want being received and the peripheral being disabled, this can result in more clocks than expected and cause the overflow.
If this is an issue for your application, use 4-wire SPI and leave the MOSI pin uninitialized.
2025-02-28 6:47 AM
RXONLY mode sends clocks continuously. Since there is some amount of delay between the last byte you want being received and the peripheral being disabled, this can result in more clocks than expected and cause the overflow.
If this is an issue for your application, use 4-wire SPI and leave the MOSI pin uninitialized.