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.

RM44L920: Forcing PLL1 Slip problem

Part Number: RM44L920
Other Parts Discussed in Thread: HALCOGEN

Tool/software:

Hello,

I am encountering an issue with the PLL1 slip detection mechanism on my project.

I want to force PLL1 slip using checkPLL1Slip(void) function.

I have observed that the checkPLL1Slip function is clearing the ESM flag in the ESM status register (SR1)

/* Clear ESM flag */
esmREG->SR1[0U] = 0x400U;

which is preventing the esmLowInterrupt from triggering the esmGroup1Notification function as expected.

void esmLowInterrupt(void)
{

    /* Note : Group 1 Error         */
    /* 1  to 32 -> channel 0  to 31 */
    /* 65 to 96 -> channel 32 to 63 */

    uint32 vec = esmREG->IOFFLR - 1U;

/* USER CODE BEGIN (39) */
/* USER CODE END */

    if (vec < 32U) /* channel 0 to 31  */
    {
        esmREG->SR1[0U] = (uint32)1U << vec;
        esmGroup1Notification(vec);
    }

I think a configured everything well in HALCoGen.

Could anyone provide guidance on:

  1. Why the checkPLL1Slip function might be clearing the ESM flag and preventing the esmGroup1Notification from being called?
  2. How can I modify the flow so that the ESM flag is not cleared prematurely, allowing the proper interrupt notification to be triggered?

Any suggestions or insights would be greatly appreciated.

Thank you!

  • Hi ,

    This function "checkPLL1Slip" purpose is not to create the ESM interrupt, its main purpose is to force the PLL slip and check whether the corresponding ESM flag for PLL is setting or not, so that if the real PLL slip error occurs then we will get the ESM notification properly.

    That is the reason they are clearing after checking the slip detection. Actually, this is not the real PLL slip error, here we are just checking ESM error bit for PLL slip. If the ESM flags not setting for PLL slip, then we are just calling the "selftestFailNotification" function to indicate something wrong before the actual error occur.

    So, using this function we can make sure the error path for PLL slip before the actual error trigger.

    If you want to trigger the ESM interrupt notification for PLL force slip as well then you can create your own API instead of HALCoGen API, in that API you can avoid clearing the ESM flag to get ESM interrupt notification for PLL slip.

    --
    Thanks & regards,
    Jagadish.