I used the SPI of S32K312 to communicate with BE13.When I read data through BE13, BE13 always replied to me that SPI was faulty, and the fault was that a clock was missing during the first SPI communication. I checked the waveform with an oscilloscope and found that there was no clock signal missing during the first SPI communication, so I would like to ask, Is my SPI not configured or is it incorrectly configured? I hope you can reply to me sometime.Here is my configuration and code diagram.Thinks.
These two are the SPI timing and clock phase and polarity of the BE13, and the SPI clock is 60MHZ
Hi @chenyh,
We have tested your configurations and observed that the clock frequency is set to 200kHz.
Based on the image shared, we can see that the minimum SPI Frequency supported by your BE13 is 0.5MHz.
Additionally, we notice that you are using half-duplex transmission but have not configured the SpiDeviceHalfDuplexSupport. We suggest reviewing these configurations.
Hope it helps you.
Have a nice day!
IsaulO.
Hi,
Based on your comments and the image shared about BE13 manual, the data is latched on rising edge of each SCLK pulse. This indicate that the SPI mode could be 0 or 3.
If you are using Trailing Edge, you need to set CPOL=1 to ensure the requirements of the BE13.
If you are using Leading Edge, you need to set CPOL=0 to ensure the requirements of the BE13.
Note: These recommend options are based just on your comments and the image shared, we suggest check the BE13 manual.
Additionally, it is helpful to examine the data frame to check inconsistencies during the process. If you can share the data frame or clock signals, I can help visualize and analyze any potential issues.
Have a nice day!
IsaulO.
Use half duplex mode must check the 'SpiDeviceHalfDuplexsupport'? Now I can communicate through half duplex, is it because I have checked 'SpiHalfDuplexModeSupport'?If I checked SpiDeviceHalfDuplexsupport, can you give me an example of send and receive, BE13 communication must be sent and I sent 32 bit at a time, 4 bytes of data,Looking forward to your reply