This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/DRA72: mcspi example

Part Number: DRA72

Tool/software: TI-RTOS

Do you have an example for SPI for use in TI-RTOS? I saw and example on the UART. I run Linux on the Cortex A15 and the CAN drivers on the IPU1 M4. I need to run all 5 CAN ports on that M4 core.

Another programmer wrote support for 3 external CAN with MCP25625 devices from Microchip. Since he could not get the SPI port to work he used bit banging.

The MCP25625 device is the device MCP2515 with the output driver.

Only the first device works so I was given the task to fix this. I want to modify it to use the SPI. All 2 are on mcspi1 and use the first 3 chip selects.

I would like to use DMA if possible.

The first device has a 16Mhz crystal and the other two use the output clock of the first device.

GPIO connections :

gpio5_0    RX0BF_CAN3
gpio5_1    RX1BF_CAN3
gpio5_2    TX0RTS_CAN3  
gpio5_3    TX1RTS_CAN3  
gpio5_4    TX2RTS_CAN3  
gpio5_5    RX0BF_CAN4   
gpio5_6    RX1BF_CAN4   
gpio5_7    TX0RTS_CAN4  
gpio5_8    TX1RTS_CAN4  
gpio5_9    TX2RTS_CAN4  
gpio5_10   RX0BF_CAN5  
gpio5_11   RX1BF_CAN5
gpio5_12   TX0RTS_CAN5
gpio5_13   TX1RTS_CAN5
gpio5_14   TX2RTS_CAN5

gpio6_7    MPU_CAN3_INT
gpio6_8    MPU_CAN4_INT
gpio6_9    MPU_CAN5_INT

SPI port

SPI1_SCK is on SPI1_SCLK on A25

SPI1_CS0   on A24   MPU_CAN3_CS
SPI1_CS1   on A22   MPU_CAN4_CS
SPI1_CS2   on B21   MPU_CAN5_CS

SPI1_D0    on B25   MPU_CAN_SI
SPI1_D1    on F16   MPU_CAN_SO


Michel Catudal

ACTIA Corp