2021-01-20 02:42 AM
Hello,
I am using SPI1 on STM32H743ZI MCU.
When I use SPI Transmit Function it works well.
But when I use :
HAL_SPI_Receive(&hspi1, ads_buf, READBACK_LENGTH,500);
ads_buf is still full of 0, it does not get filled
I checked with logic analyser and it is working fine :
I am using DTCMRAM but I tried to move to RAMD1 and the problem is still there
Any ideas how to solve this ?
Solved! Go to Solution.
2021-01-20 04:10 AM
Fixed by modifing HAL lib with this : Void_Buffer is a buffer I fill with 0 at init
2021-01-20 02:55 AM
When I switch from Half-Duplex to Full-Duplex the reading works but I want to use Half duplex since Full is making my slave crash / reset. I think my slave is bugging because the HAL SPI lib echoes the message. Is there any simple way to "mute" MOSI, it is very annoying that Full Duplex HAL lib can't work without transmitting data. Calling the Transmit_Receive function that needs a Tx ptr to work :face_with_tears_of_joy: .
2021-01-20 04:10 AM
Fixed by modifing HAL lib with this : Void_Buffer is a buffer I fill with 0 at init
2021-01-20 07:01 AM
> Is there any simple way to "mute" MOSI,
You can de-initialize the MOSI pin if you don't want a signal on it.
By setting the buffer to zeros, you're still sending data.
2021-01-21 02:43 AM
@TDK Just to be sure, when you mean de-initialize, I set MOSI as analog in ?
About the buffer, I am technically still sending data but only zeros means the line stays at low level
2021-01-21 06:55 AM