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: Self-Test enable in Safety Init causing ESM error when interrupt occurs

Part Number: RM48L952
Other Parts Discussed in Thread: HALCOGEN

Hi There,

I am trying to use the RTI interrupt example and "Safety Init" functions in Hacogen. My code is very simple:

/* USER CODE BEGIN (2) */
uint64_t milliseconds = 0;
/* USER CODE END */

int main(void)
{
/* USER CODE BEGIN (3) */
    /* Enable Real-Time Interrupt */
    rtiInit();

    /* Enable RTI Compare 0 interrupt notification */
    rtiEnableNotification(rtiNOTIFICATION_COMPARE0);

    /* Enable IRQ - Clear I flag in CPS register */
    /* Note: This is usually done by the OS or in an svc dispatcher */
    _enable_interrupt_();

    /* Start RTI Counter Block 0 */
    rtiStartCounter(rtiCOUNTER_BLOCK0);

    while(true)
    {

    };
/* USER CODE END */

    return 0;
}


/* USER CODE BEGIN (4) */
void rtiNotification(uint32 notification)
{
    milliseconds++;
}
/* USER CODE END */

The interrupt is working properly, but after I enabled all the boxes in the "Safety Init" tab in Halcogen I got an error in ESM module after the first interrupt of the RTI. The ESM is signalling group 3 bit 7 error (FMC - uncorrectable error: bus1 and bus2 interfaces (does not include address parity error and errors on accesses to EEPROM bank).

My CCS is 6.1.0.00104 and Halcogen is 04.06.00. Is there any configuration that I didn't?

KR

Thiago Esteves

ccmSelfCheck

  • Hi Thiago,

    I believe that you did not program the entire Flash memory. The ECC error is generated when CPU accesses the un-programmed region. The error will go away if you program the entire flash with ECC.

    Regards,
    QJ
  • Hi QJ,

    thank you for the answer. I am flashing all three banks: Bank 0, Bank 1 and Bank 7. In Halcogen, I enabled "Flash ECC enable" in the Flash Tab and using the debugger XDS100v2 I checked that all banks are erased before programming and "Auto ECC Generation" is enabled. Is there anything that I am missing? I still see the problem....
  • Hello Thiago,

    I created a project with HALCoGen 4.6.1. In this project, ECC is enabled, and all the selftests in SAFETY INIT are enabled.  But I didn't see the error. Did you try to read code from an un-programmed flash location somewhere in your code? To read unprogrammed location will get an error with ESM group 3 channel 7 bit set unless you program the ECC for the entire flash.

    Regards,

    QJ

  • Hello QJ,

    My code was too simple and I am 100% that I wasn't accessing any un-programmed flash location unless the linker or the compiler (CCS 6.1.0.00104 + TI v5.2.2) were creating a code for that. In any case, I got your suggestion about programming the entire flash and I changed the linker to calculate and insert the CRC (sys_link.cmd).

    MEMORY
    {
    VECTORS (X) : origin=0x00000000 length=0x00000020 fill=0xffffffff
    FLASH0 (RX) : origin=0x00000020 length=0x0017FFE0 vfill=0xffffffff
    FLASH1 (RX) : origin=0x00180000 length=0x00180000 vfill=0xffffffff
    STACKS (RW) : origin=0x08000000 length=0x00001500
    RAM (RW) : origin=0x08001500 length=0x0003EB00

    /* USER CODE BEGIN (2) */
    ECC_VEC (R) : origin=0xf0400000 length=0x00000004 ECC={ input_range=VECTORS }
    ECC_FLA0 (R) : origin=0xf0400004 length=0x0002FFFC ECC={ input_range=FLASH0 }
    /* USER CODE END */
    }

    /* Misc */

    /* USER CODE BEGIN (6) */
    ECC {
    algo_name : address_mask = 0x003ffff8
    hamming_mask = R4
    parity_mask = 0x0c
    mirroring = F021
    }
    /* USER CODE END */

    I also removed from the debugger the "Auto ECC generation" and the error disappeared. Thanks a lot.

    KR
    Thiago Esteves