MCSPI Loopback
Introduction
This example demonstrates the McSPI RX and TX operation configured in blocking, interrupt mode of operation.
This example sends a known data in the TX mode of length APP_MCSPI_MSGSIZE and then receives the same in RX mode. Internal pad level loopback mode is enabled to receive data. To enable internal pad level loopback mode, D0 pin is configured to both TX Enable as well as RX input pin in the SYSCFG.
When transfer is completed, TX and RX buffer data are compared. If data is matched, test result is passed otherwise failed.
To modify the example to use main domain SPI, refer Accessing main and wakeup domain peripherals from MCU domain
Supported Combinations
Parameter |
Value |
|---|---|
CPU + OS |
a53ss0-0 nortos |
CPU + OS |
a53ss0-0 freertos |
CPU + OS |
c75ss0-0 freertos |
CPU + OS |
mcu-r5fss0-0 nortos |
CPU + OS |
mcu-r5fss0-0 freertos |
Toolchain |
ti-arm-clang |
Toolchain |
arm.gnu.aarch64-none |
Toolchain |
ti-c7000 |
Boards |
am62dx-evm |
Example folder |
examples/drivers/mcspi/mcspi_loopback |
Parameter |
Value |
|---|---|
CPU + OS |
a53ss0-0 nortos |
CPU + OS |
mcu-r5fss0-0 freertos |
CPU + OS |
mcu-r5fss0-0 nortos |
Toolchain |
arm.gnu.aarch64-none |
Toolchain |
ti-arm-clang |
Board |
am62dx-evm |
Example folder |
examples/drivers/mcspi/mcspi_loopback |
Steps to Run the Example
When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)
Launch a CCS debug session and run the executable, see CCS Launch, Load and Run
See Also
Sample Output
Shown below is a sample output when the application is run,
[MCSPI] Loopback example started ...
All tests have passed!!