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.

TMS570LS3137: TMS570LS3137 HALCOGEN Code loops wait time

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Hello,

We are using HALCOGEN generated code for TMS570LS3137 controller. in the generated code, we have few while loops which checks for the status bits. Below are few of the loops which i am talking about.

sample1: 

file name : sys_startup.c

function name: afterSTC()

Code: 

while ((mibspiREG1->FLG & 0x01000000U) == 0x01000000U)
{
}

sample2: 

file name : sys_selftest.c

function name: ccmSelfCheck()

Code: 

while ((CCMSR & 0x100U) != 0x100U)
{
}

There are few more places where these kind of while loops are generated. i would like to know the time elapses in these while loops. Is there any document which captures these time elapses?

Thanks,

Kalyan

  • Hello,
    "while ((mibspiREG1->FLG & 0x01000000U) == 0x01000000U)" is checking whether MiBSPI multi-buffer RAM initialization is complete. It takes 1 VCLK cycle for each buffer. Each MiBSPI module on TMS570LS3137 has 128 buffers and this means 128 VCLK cycles per module.

    "while ((CCMSR & 0x100U) != 0x100U)" checks whether CCM Self test is complete. According to Section 9.3.2 Self-Test Mode it takes 3615 GCLK cycles for CCM self test to complete.

    Best regards,
    Miro