Other Parts Discussed in Thread: AM5728
AM5728, PDK 1.0.2, Compiler V8.1.0, BIOS 6.45.1.29, XDC 3.32.0.06
Hello,
I am using MCSPI1 on the 5728 under control of a DSP core. The 5728 is first booted by Linux on the ARM core then my DSP code is loaded and the DSP uses the MCSPI. Thus, the DSP is not doing Board Init functions.
My code calls, SPI_Init(), SPI_Params_init() and SPI_open() to setup the SPI for Master mode, CALLBACK. At that point I am not able to use the SPI, no data is transferred.
I discovered that CM_L4PER_MCSPI1_CLKCTRL register was set to 0x00030000. I wrote a 0x00000002 to the register (direct register write in my C code) and it started working.
I've discovered in the file "C:\ti\pdk_am57xx_1_0_2\packages\ti\drv\spi\example\mcspiMasterTxApp\src\mcspiMasterTxApp.c" the following code:
#if (defined (SOC_TDA3XX))
/*MCSPI1 prcm*/
HW_WR_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER_MCSPI1_CLKCTRL, 0x02);
while (HW_RD_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER_MCSPI1_CLKCTRL) !=
0x02U)
{
;
}
....
#endif
However, that setting of CM_L4PER_MCSPI1_CLKCTRL is not in SOC_AM572x. Is this a bug or is the clock enabled some other way for the AM5728? What do I need to do in my code to enable this clock correctly, I don't like directing modifying SOC registers in my C code.