2021-05-29 07:18 AM
Hi,
I'm trying to use SPI to communicate between two boards. On the MASTER side, i am using the HAL_SPI_Transmit(&hspi4, (uint8_t*)TxData,sizeof(TxData),100); and on the slave side i have enabled the interrupt, HAL_SPI_Receive_IT(&hspi4,RxData,1);
The message that i am trying to send is simply a 0x01. But it doesn't receive properly on the slave side....
Did anyone experience something like this?
Solved! Go to Solution.
2021-05-31 02:31 PM
thanks! i found the solution. I didn't set neither the pullup or pulldown. After i set as pulldown it started working properly.
Thank you all.
2021-05-30 09:47 AM
You're sending many bytes but only receiving 1. This is going to cause issues if the master sends another byte before the slave is ready.
2021-05-30 10:06 AM
Hi, thanks for your response. I dint' get the point... i am only sending 0x01, and have a buffer size of 1 on the Slave side.
2021-05-30 10:16 AM
2021-05-30 12:41 PM
I am not using as far as i know CS....
2021-05-31 03:33 AM
Hi @IRodr.2 ,
and welcome to ST Community.
Please refer to the STM32CubeH7, under directory: Projects\$board_name$\Examples\SPI\SPI_FullDuplex_ComIT
This example shows how to ensure SPI data buffer transmission/reception between two boards by using an interrupt.
Best Regards,
Ons.
2021-05-31 02:31 PM
thanks! i found the solution. I didn't set neither the pullup or pulldown. After i set as pulldown it started working properly.
Thank you all.