Hi,
I am working on the RM46L852 MCU using RM46XHDK board. I enable SPI driver via Halcogen. We can transmit and receive data through SPI interface.(configure SPI3 master and SPI1 slave).
But if I configured SPI3 to master and try to communicate with other SPI slave device LTC6803, it could not get correct data. I used interface spiSendData() to send data_send[11] = {0x80, 0x49, 0x01, 0xc7, 0xe1, 0x00,0x00,0x00,0x00,0x00,0xd7}; then I used spiSendAndGetData() to read back. The expected data should be 0xe1, 0x00,0x00,0x00,0x00,0x00,0xd7, but I got 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc2, 0x00, 0x00, 0x00, 0x01, 0xae. It seems the data shift left 1 bit. I have tried to change CPHA and CPOL, it didn’t work out. BTW, I used PIC33FJ256 MCU before, it workd fine. I upload the example code. Could you please check it. Thanks a lot! 6472.SPI.rar
Judy