Tool/software: TI-RTOS
Hello,
I am having problems running the example project for SPI (MCSPI_BasicExample_idkAM437x_armExampleProject).
Versions that I have installed:
- ccs7.2
- bios_6_46_05_55
- edma3_lld_2_12_05_29
- processor_sdk_rtos_am437x_4_01_00_06
- pdk_am437x_1_0_8
- xdctools_3_32_01_22_core
After I have installed ccs and processor_sdk I have set up the env using the setupenv.bat batch file.
Right after that I have rebuilt the pdk for all targets "gmake clean", then "gmake all", then I have built the example and test projects (again, for all targets) with pdkProjectCreate.bat.
I was able to import the upper mentioned project to CCS and successfully built it and loaded it to the industrial dev kit (XDS200 debug probe).
I have checked the schematic and the pinmux(am43xx_idkevm_pinmux_data.c) of the idk and saw that SPI3 is muxed to AE22, AB20, AC21 and D11 pins, and these pins are connected to J16 on the idk:
- AE22 - J16/17
- AB20 - J16/29
- AC21 - J16/27
- D11 - J16/10
I have changed the default SPI index that is in the application from 1 to 3 to use SPI3 peripheral instead of SPI1.
The code is compiled and linked without an issue, all initialization functions return without an error, SPI_transmit function returns with the correct number of bytes configured to send,but the pins on the J16 header are not moving at all.
I have also tried 0 to be used for the SPI peripheral as index (SPI3 is the 0th element in the gMcspiPinCfg array so I tried it) but the result is the same.
I have investigated the issue a little further and started debugging the initialization functions, namely the Board_init(boardCfg); function.
In the Board_pinmuxConfig() fucntion the status = PINMUXModuleConfig(CHIPDB_MOD_ID_MMCSD, 0U, NULL) function returns with -14, this makes all the functions after this line to be not called at all (including the PINMUXModuleCOnfig for the MCSPI).
As far as I can tell, this happens because there is no MMCSD is configured in the default pinmux configuration.
I have tried overwriting the status variable with the debugger to let the execution continue and initialize the MCSPI, that returns with 0, which seems good, yet I still cant measure anything on the pins mentioned previously.
Any help would be much appreciated.
Thanks in advance.