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.

Hercules RM57 Flash and RAM ECC

Other Parts Discussed in Thread: HALCOGEN

Current HALCOGEN code / RM57 Technical documents do not specify turning on ARM Flash and RAM ECC described in Section 4.3.17 of Cortex-R5 Technical Reference:

Described as B0TCMPCEN and B1TCMPCEN by ARM for RAM and ATCMPCEN for FLASH


Sample functions from other Chips:

_coreEnableRamEcc_:
    
    stmfd sp!, {r0}
        mrc   p15, #0x00, r0,         c1, c0, #0x01
    orr   r0,  r0,    #0x0C000000                        @Enable RAM ECC in accordance with Section 4.3.17 of Cortex-R5 Technical Reference
        mcr   p15, #0x00, r0,         c1, c0, #0x01
        ldmfd sp!, {r0}
        bx    lr

    .type _coreEnableRamEcc_, $function
    .size _coreEnableRamEcc_,.-_coreEnableRamEcc_


@ Enable Flash ECC

    .globl _coreEnableFlashEcc_

_coreEnableFlashEcc_:
    
    stmfd sp!, {r0}
        mrc   p15, #0x00, r0,         c1, c0, #0x01
    orr   r0,  r0,    #0x02000000                        @Enable Flash ECC in accordance with Section 4.3.17 of Cortex-R5 Technical Reference
        mcr   p15, #0x00, r0,         c1, c0, #0x01
        ldmfd sp!, {r0}
        bx    lr

    .type _coreEnableFlashEcc_, $function
    .size _coreEnableFlashEcc_,.-_coreEnableFlashEcc_


Do these need to be enabled in the RM57 for safe operations?

  • Dmitri,

    ATCM, B0TCM, B1TCM refer to the tightly-coupled memory busses on the Cortex R.

    On the TMS570LS series and the RM4 series MCUs we have TCM - flash is directly connected to the CPU core and so is RAM.

    But on the TMS570LC and RM57L the Cortex R5 is configured with Cache. The Flash and SRAM are not directly connected to the CPU anymore - they are moved to the 2nd level of memory.

    In the ARM docs you might see that you can have Cache and TCM at the same time - but we didn't implement the chip this way for speed reasons.

    So in a nutshell - no on the RM57L these busses are not used and that's why their ECC wouldn't be enabled.
  • Thank you, that answers my question.