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.

RM48L952: What is the CPU-SelfTest

Part Number: RM48L952


Dear All,

I would like to know what the CPU SelfTest. Is it detect stack overflow?  It is happy if you tell me the proper documentation.

Regards,

SONE

  • Dear All,

    I have one more question. Could you tell me what  the MMU/MPU is ?

    How can I tell the MMU/MPU is activated ? Which .c code should I see?

    Regards,

    SONE

  • Hello Sone,

    MMU is memory management unit. MPU is memory protection unit. RM48 devices has built-in 12 regions MPU, but the MMU is not implemented in this device.

    The MPU is not enabled at reset. Software must enable, configure and test the MPU. The MPU enables you to partition memory into regions and set individual protection attributes for each region. So the MPU logic can be used to provide spatial separation of software tasks in the device memory. The MPU can also be used to configure the memory ordering policies of the memory system.

    Please refer to MPU chapter in ARM Cortex-R4F TRM.

  • The CPU selftest is to test the HW logic inside the chip using LBIST mechanism. It doesn't detect the stack overflow.

  • Hi, QJ Wang,

    Thank you for teaching. Are there any mechanism which could check the stack overflow ?

    I also would like to know ragarding SYSESR resister.  Could you tell me who and when the bit in the SYSESR resister set ?

    Regards,

    SONE

  • Hello Sone,

    If your code runs out of stack space, or a task runs out of it’s allocated stack space, a stack overflow occurs. The very common examples are:

    1. Have large arrays in your code

    2. To much recursion in functions call. Every time a function in entered, a stack frame is created and placed on the stack. Recursively enter a function too many times, and the stack frames may fill up the task stack to the point of overflow.

    There is no dedicated hw mechanism to detect the stack overflow. You can check the stack usage in your code debug time. The CCS has a built-in feature to check the stack usage: CCS-->View--> Stack Usage.

  • The SYSESR (system exception status register) indicates the source for different reset encountered. 

    Please refer to Table 2-8 (Causes of Resets) in TRM for details

  • Hi, QJ Wang,

    I understand that. Thank you.  I will check stack usage with CCS. 

    Best Regards,

    Sone