MCU_SPI0 not working

Hi,

I am using the OSD62-PM-BRK to communicate with a master over MCU_SPI0, but it is not working. I have tried it with a few masters, so I know it is an issue with the OSD SPI. From debugging, I can tell it is not receiving anything, so it doesn’t even think a transaction is occurring. However, when I probe the pins, the signals look fine so not quite sure what is going wrong. Any help would be great. Thank you!

Hey Caitlin,

There are 2 SPI interfaces instantiated by default on OSD62-PM-BRK, SPI2 (header pins PB3 - PB6) and SPI0 (header pins PC35 - PC38).

If you run ls /dev/spidev*, you will see 2 entries like below:

root@am62xx-evm:~# ls /dev/spidev*
/dev/spidev0.0	/dev/spidev1.0

If you want to test these, you can tie D0 and D1 of the interface (hardware loopback) and run a software loopback test to see if the data received through RX = data sent through TX.

I used spidev_test.c from this repository: https://github.com/rm-hull/spidev-test. Compile like below:

root@am62xx-evm:~# gcc spidev_test.c -o spitest
root@am62xx-evm:~# ls
spidev_test.c  spitest

and run the test with D0 and D1 tied together with a jumper wire:


root@am62xx-evm:~# ./spitest -D /dev/spidev1.0 -v
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D  | ......@....?..................?.
RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D  | ......@....?..................?.

If you are trying to work on MCU_SPI0 specifically, please take a look at https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1297533/faq-sk-am62-how-to-configure-spidev-for-mcu_spi0-cs1-in-am625 on how to setup the device tree to instantiate it correctly.

Please let me know if you have any updates or you need clarification.

Best,
Neeraj