I try to test the bus api with SPI. I just connect SPI1 Output to SPI1 Input to get the data I send (loopback). I just achieve to send the data (I see the data on the bus) but I cannot get what I send…
I’m pretty sure that what you are trying to do cannot work…
The read command generates the clock and decodes what is received on the bus. But at that time, the send command is already finished, so there will be no more pulses to receive on the data line…
Apparently it’s possible on small microcontollers.
I want to use SPI to exchange data with a MCP2510 (CAN 2 SPI IC).
I think it should work if I use opcode and address but I don’t know if this IC will work properly if the clock is interrupted for 5 periods between address, opcode and data.