First, I can’t thank you enough for all the help !
So I have the following :
I’ve attached a different board to the Jetosn’s SPI-1 (only Clk, MOSI & CS). This board is a
master that sends 0xa5 and 0x5a continuously at 500Khz, I have a logic that observing the data being sent between that board and the Jetson, everything looks fine, CS goes low, master is sending data during the 8 clocks it’s generating.
I’ve used SPI1 (37: MOSI, 13 CLK, 18: CS).
I’ve used you reference code, and made an infinite loop that read and print a received byte.
In another terminal I have ‘dmesg -w’
Immediately after I turn the master device on I get :
[ 8283.765308] spi_master spi1: CMD[03f01027]: Sl M0 CS0 [HHHH] MSB MSb Rx Pa 8b TRANS[00ff0000]:BSY I:255 B:0
FIFO[00c00004]:RxF:1 TxE:64 Err RxSTA TxSTA[E]DMA: RxTr:0 TxTr:0 B:0
[ 8283.784388] spi_master spi1: failed to transfer one message from queue
[ 8283.792313] spi_master spi1: failed to transfer one message from queue
[ 8283.800204] spi_master spi1: failed to transfer one message from queue
[ 8283.807625] spi_master spi1: failed to transfer one message from queue … endlessly
(Doesn’t look good but it means that the Jetson knows that data is being transmitted, when I turn the master device off, those error messages stops).
My process gets many errors (read returns a negative value) and once in a while it reads a byte (but not 0xa5 or 0xa5).