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.

CCS: TMS570LC4357 - SafeTI Diagnosis Library - mpu setting error(ram range)

Tool/software: Code Composer Studio

I use SafeTI Diagnosis Library. And, I want to change mpu setting as MPU_NORMAL_OIWBWA_NONSHARED(0x000B) in ram range(0x08000000 ~ 0x803FFFF)

After setting mpu ram as MPU_NORMAL_OIWBWA_NONSHARED, in the libaray, SL_SelfTest_Flash occur exception error which is "_excpt_vec_abort_data()".

I want to know why this error occurred.

  • Hi Minwoo,

    What operation in the application caused the exception? You can read the data fault address and status registers to identify the exact cause of the exception.

  • I check the error is occurred in SL_SelfTest_Flash(FLASH_ECC_TEST_MODE_1BIT, TRUE, &failInfoFlash) function.

    After the function, "_excpt_vec_abort_data()" function is called and firmware is stopped. The error message is memory point is 0x08040004(this is reserve area). 

  • TMS570LC has 512KB of RAM, so addresses up to 0x08080000 are valid. How is the memory range from 0x08040000 to 0x08080000 configured?

    Please read the CPU's data fault status register in the debugger window to identify the cause of the error. This will indicate whether the error is caused by a background fault (access to memory not falling within any defined region), or a permission fault (MPU configuration to now allow read access).

    Regards,

    Sunil

  • Hello Sunil,

    I miss the address. The fault address is 0x08080004.

    And, the memory range from 0x08040000 to 0x08080000 is configured as MPU_NORMAL_OIWBWA_NONSHARED.

    The error state is like the figure.

    Regards,

    Minwoo.

  • Hi Minwoo,

    This address does not fall within the defined memory region for the RAM, which is why you are observing an abort response from the CPU. One of the self-test routines intentionally causes a data abort by accessing a memory location 0x08080000 which is outside any defined memory region. This is done when callling the SL_SelfTest_MemoryInterconnect(MEMINTRCNT_RESERVED_ACCESS) function.

    I suspect you are observing the abort due to execution of this test. Please confirm.

    Regards, Sunil

  • Hello, Sunil

    I will check about this problem. The error is occurred in SL_SelfTest_Flash() test. 

    I solve the problem this way. I want to know this solution is right.

    1. I want to decrease the calculation time. I change the ram mpu setting as 0x008 -> 0x00B in range( 0x08000000 ~ 0x0803FFFF)

    2. The flash ecc test is executed in ram (the start address is 0x803A800 and the size is 2kbytes).

    3. So, I change this ram range set as 0x008. Then, the error is not occurred and passed.

    Regards,

    Minwoo

  • Hi Minwoo,

    What was the original configuration of the MPU for the CPU RAM and what was the change you made before you saw the issue with the RAM address out of range?

    Regards, Sunil

  • Hello Sunil,

     The safeti library default set whole mpu region as MPU_NORMAL_OINC_NONSHARED.

     I change the ram range(0x08000000 ~ 0x803FFFF) as MPU_NORMAL_OIWBWA_NONSHARED to reduce calculation time.

    Then, when SL_SelfTest_Flash() is running, "_excpt_vec_abort_pref()" is occurred by pointing the address 0x08080004. (I'm not sure where the error occurred exactly in SL_SelfTest_Flash()

    Regards ,

    Minwoo

  • Hello Minwoo,

    3. So, I change this ram range set as 0x008. Then, the error is not occurred and passed.

    The above change makes the RAM range to be defined as non-cacheable, as done in the original demo project. By defining this range as write-back cacheable, I am also able to see the prefetch abort with the code trying to fetch instruction from 0x08080000, which is out of bounds of the available RAM.

    Please use the demo application with the same MPU settings as the original demo application.

    Regards,

    Sunil

  • Thanks for your help.

    Regards,

    Minwoo