Hi, I used the SPI and SPIS examples to read a type K thermocouple with a max31856, the problem is that in no example do I get any response or data from the sensor, I wanted to know if someone tried to read thermocouples with the nRF52840DK or if they have any advice How to read sensors with SPI.
Your question is quite vague. You may receive a better response if you can provide more details of your setup including how you are configuring the SPI driver.
It sounds like the 52840 is the SPI master and thermocouple is the SPI slave device. Make sure you are using the SPI master drivers in your application (not SPIS)
Hello, that is one of the problems, I have only used the example given in nRF52 SDK 16.0.0, but since it does not show me any information I have not been able to analyze well how it works, I have reconnected the sensor pins but still not I get nothing
If you have not modified the SDK example to the communication protocol of your sensor, you can't expect to get any data from the sensor.
You need to read the datasheet of your sensor to figure out which registers to read/write in order to get any the desired response. Then you need to modify the SDK example to replicate this.
Ok, in order not to continue making mistakes, which SPI example is the one that I must modify to obtain the sensor data?
The SPI Master Example would be the best starting place for most SPI sensor applications. By default, this example sends a string, "Nordic", and prints whatever it receives back during the transfer to the UART log.