5.1.3.1.8. CSL MCSPI Example¶
This MCSPI Master Slave example application demonstrates simple data transfer from McSPI master to slave using polled mode. It carries out MCSPI external loopback between two modules which are internally connected and checks if the data transferred between the two SPI instances match.
5.1.3.1.8.1. Building MCSPI example¶
To build the MCSPI example app in PDK, use the following command:
$ make -s -j8 csl_mcspi_masterslave_app BOARD=<BOARD> CORE=<CORE>
The example app binary file can be found at the following location:
<pdk>/packages/ti/binary/csl_mcspi_masterslave_app/bin/<BOARD>/csl_mcspi_masterslave_app_<CORE>_release.xer5f
This command will build the MCSPI example app (csl_mcspi_masterslave_app) on baremetal.
Adjust the command according to your specific requirements,
such as selecting a different board or core if needed. By default, the release mode is built.
You can specify build mode by adding BUILD_PROFILE=debug in the instruction.
5.1.3.1.8.2. Supported SOCs¶
j721e
j7200
j721s2
5.1.3.1.8.3. Supported cores¶
mcu1_0
5.1.3.1.8.4. Hardware Connections¶
none
5.1.3.1.8.5. Running MCSPI example¶
After building the example, follow the given steps to run the test:
Launch a CCS debug session, load and run
csl_mcspi_masterslave_app_<CORE>_release.xer5fbinary file to the respective core for which the binary is built. Alternatively, the example application can be loaded using any other boot method such as MMC/SD.Logs will be printed on the CCS console and MCU UART port 1. Below is an example of the log when running csl_mcspi_masterslave_app on J721E on mcu1_0 core:
Binary: <pdk>/packages/ti/binary/csl_mcspi_masterslave_app/bin/<BOARD>/csl_mcspi_masterslave_app_<CORE>_release.xer5f
1 2 3 4 5 6 7 8 9 10 MasterSlave Application Started This application tests MCU McSPI2 and MAIN McSPI4 instance which are connected internally The Mode of transfer is Polled Mode The data written by Master and the one read by Slave are Equal. All tests have passed.. mcspiMasterSlave_spi1_spi2_v1.c:469:test_csl_mcspi_masterslave_app:PASS ----------------------- 1 Tests 0 Failures 0 Ignored OK