Other Parts Discussed in Thread: ADS1292R,
Hello.
I have the following problem. The code I wrote for communicating between TM4C123GH6PZ and ADS1292R via SPI doesn't work. I am trying to read the ECG and respiration data from the ADS1292R (slave) and then send it through the UART, but I'm getting only zeroes, and not the actual data. I also tried to read the WHOAMI (ID) pin, but it reads as 0. I tried measuring the signals with a logic analyzer, but the results are not what I expected. For starters, the clock's frequency is 50kHz (even though in the code I've set the frequency to 1MHz) and the CS pin doesn't go down every time it should. Also, when I set the CPOL = 0 and CPHA = 1 in the settings, Saleae reports an error "The initial (idle) state of the CLK line does not match the settings.", but when I set CPOL = 1 it reades '255' on both transmitter and reciever, even though it's not supposed to. In ADS1292R datasheet it says the correct settings are CPOL = 0 and CPHA = 1, so I set SSI_FRF_MOTO_MODE_1 in SSI configuration. I am using Arduino Library for ADS1292R Shield/Breakout which I adapted so it fits my TM4C uC.
All this confuses me since I'm new to working with microcontrollers and I would really appreciate some help. I'm not even sure if the problem is with the software or hardware. In the attachment I put the whole project (folder: 'project'), the results from Saleae (folder: 'SALEAE SAMPLES'), the scheme of connecting the pins I used (folder: 'Scheme') and the Arduino Library for ADS1292R Shield/Breakout (folder: 'arduino_library').
Best regards,
Laura