cancel
Showing results for 
Search instead for 
Did you mean: 

ads124s08 with STM32F407VGT6 spi communication problem

TBala.1
Associate

I need to get information from an ti's ads124s08 and imported an example from arduino forums. I can communicate with device using an arduino for test (on the same board and same specs) but can not use with stm.

In fact, i think there should be a problem about the spi configuration etc, but can't test or resolve the problem.

For example; when the device is connected on SPI pins, hal_spi_transmit function returns 0, but when i disconnect the device from STM's spi pins, it is also returns 0.

How can i get the best test to check my SPI is OK or not?

And, you can check my init functions(canbus, gpio pins, i2c works fine) and ads124s08 code from below. Maybe somebody can help about ads124s08.

Thanks & Regards.

2 REPLIES 2
TDK
Guru

> For example; when the device is connected on SPI pins, hal_spi_transmit function returns 0, but when i disconnect the device from STM's spi pins, it is also returns 0.

HAL_SPI_Transmit returns 0 (HAL_OK) when it succeeds. Why are you expecting a different value? It doesn't care if you have SPI pins hooked up to something else or not, it has no way of knowing.

If you feel a post has answered your question, please click "Accept as Solution".

> How can i get the best test to check my SPI is OK or not?

The basic test is a simple local loopback - disconnect the ads124s08 and connect the MOSI and MISO pins together - you should be able to receive what you transmit.

SPI is quite simple to operate without any "library" such as cube/HAL, and for basic experiments you don't even need to write any code, just write to and observe its registers in debugger, while observing the signals using oscilloscope/logic analyzer.

JW