Other Parts Discussed in Thread: HALCOGEN
Hello,
I am using SPI1 to communicate with an external accelerometer. I can successfully send commands to the device via SPI1 and using a logic analyzer I can verify that the correct data is received via the MISO line directly to the MISO pin on the processor. However, whenever I try to read the SPI1 receive register/buffer, it is always all zeros. I am running the device in a polling mode.
I have tried monitoring the RXINT, bit 8, of the SPI FLag Register (SPIFLG) but it is always 0 as well.
The CS, CLK and MOSI all work as expected and as configured. MISO looks correct as well but I'm wondering if I missed a configuration setting or a register read/flag clear operation. I have tried using the spiReceiveData() function generated by HalCoGen but with the same results.
Any help would be greatly appreciated.
Thank you.