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.

PROCESSOR-SDK-TDAX: McSPI2 fails on reset on custom TDA2Px board

Part Number: PROCESSOR-SDK-TDAX
Other Parts Discussed in Thread: SYSCONFIG

Hello,

when intializing McSPI2 as master in interrupt mode the device will fail with an error after the accessing the SOFTRESET bit in MCSPI_HL_SYSCONFIG (GIO_create -> mcspiMdCreateChan -> McSPIReset). The baseadress argument to the function McSPIReset is correct as far as I can tell. All instance and channel handles have been setup correctly. I'm using VisionSDK 3.3.0.0 with PDK 1.9.0.17.

The same code works for initializing McSPI1 as slave (also in interrupt mode). To make sure initializing McSPI1 does not influence the other instance I tried to exclude McSPI1 but nothing changed.

When running the code on different custom TDA3x board the initialization works as expected.

Do you know what might cause this error at this specific location? What else could I check?

Thanks for the help.

  • Hi,

    You need to enable the clock for the McSPI2 instance.
    Clock enable is done using the register "CM_L4PER_MCSPI2_CLKCTRL" at address 0x4A00 97F8

    In the PDK there is an McSPI example which you can refer which enables the clock.
    <PDK_install_dir>\packages\ti\csl\example\mcspi\mcspiMasterSlave\mcspiMasterSlave_spi1_spi2.c

    Regards,
    Prasad

  • Thank you now it works.

    I was referencing this example <PDK_install_dir>packages\ti\drv\bsp_lld\mcspi\examples\mcspi_spi1tospi2\src\mcspiSample_main.c and it only includes the code for clock enable when building for the tda3xx and that is why it only worked for me on the tda3xx board as I did the same.

    #if defined (SOC_TDA3XX)
    static void PlatformMCSPI1PrcmEnable(void)
    {
        *((volatile UInt32 *) (0x4a009700 + 0xf0)) = 0x02;
        while ((*((volatile UInt32 *) (0x4a009700 + 0xf0))) != 0x02) ;
    }
    ...