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/PROCESSOR-SDK-AM437X: McSPI example issues

Part Number: PROCESSOR-SDK-AM437X


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.

  • The RTOS team have been notified. They will respond here.
  • Hello again,

    UPDATE:

    I have reinstalled the pdk_am437x_1_0_8 and tried using the same example without rebuilding the pdk and now I have no problems, the example is working without an issue.

    It seems that I must have been edited something unintentionally.

    Although I would have follow-up questions if it is not a problem:

    1. When using the pinmux tool to generate custom starterware files for the idk do I have any limitations or rules that I have to follow, or if the pinmux tools does not report an error the configuration should be fine.

    By rules and limitations I mean, do I absolutely have to create a pinmux for some peripiherals (for example MMCSD) otherwise I will have problems running my code that would use only ADC and SPI?

    2. The generated files (am43xx_pinmux.h and am43xx_pinmux_data.c) should replace the files located in C:\ti\pdk_am437x_1_0_8\packages\ti\starterware\board\ ?

    am43xx_pinmux.h -> am43xx_pinmux.h

    am43xx_pinmux_data.c to be renamed to am43xx_idkevm_pinmux_data.c and replace the original am43xx_idkevm_pinmux_data.c

    At this point I should just clean and rebuild the pdk and will be able to use the new configuration or do I have to make some additional steps that I am unaware of?

    Thanks is advance.

    Akos

  • Hi,

    The Pinmux file is board specific, the example provided for several AM437x EVMs like IDK and GP for reference. Customer may choose the closest one then edit with PINMUX tool for their own board. As you step through the code, and found " 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)." If the previous module PINMUX config failed, the next one will not be executed. So if an instance doesn't exist, you need remove it from PINMUX configure.

    For the steps, please check the link processors.wiki.ti.com/.../Pin_Mux_Utility_for_ARM_MPU_Processors. We also have an example how to change PINMUX for AM335x (the same for AM437x): www.ti.com/.../sprac32.pdf

    Regards, Eric