Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

AM2434: Cache ECC failure with DMA

Part Number: AM2434

Hello, 

in the referenced thread (MCU-PLUS-SDK-AM243X: update to industrial comms SDK 11 breaks udma in bootloader - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums) in the past we noticed that the activated ECC for Cache leads to problems when using the DMA with OSPI. 
The snippet is in the boot_armv7r_asm.s_:

        //*------------------------------------------------------
        //* Enable ECC for R5F Cache
        //*------------------------------------------------------
        MRC p15, 0, r0, c1, c0, 0  // Read System Control Register
        BIC r0, r0, #0x1 << 2      // Disable data cache bit
        BIC r0, r0, #0x1 << 12     // Disable instruction cache bit
        DSB
        MCR p15, 0, r0, c1, c0, 0  // Write System Control Register
        ISB                        // Ensures following instructions are not executed from cache
        MRC p15, 0, r1, c1, c0, 1  // Read Auxiliary Control Register
        ORR r1, r1, #(0x1 << 3)    //Enable ECC for Cache
        ORR r1,r1,#(0x1 << 5)
        MCR p15, 0, r1, c1, c0, 1  // Write Auxiliary Control Register

        MCR p15, 0, r0, c15, c5, 0 // Invalidate entire data cache
        MCR p15, 0, r0, c7, c5, 0  // Invalidate entire instruction cache
        MRC p15, 0, r0, c1, c0, 0  // Read System Control Register
        ORR r0, r0, #0x1 << 2      // Enable data cache bit
        ORR r0, r0, #0x1 << 12     // Enable instruction cache bit
        DSB
        MCR p15, 0, r0, c1, c0, 0  // Write System Control Register
        ISB
        //*------------------------------------------------------
        //* Call the __mpu_init hook function.
        //*------------------------------------------------------
        BL      __mpu_init


I'm neither an ECC nor DMA expert, but in the thread it was stated that an internal ticket will be raised. I didn't hear anything since then and the code-snippet is still present in the latest SDKs. 
As soon as this is present DMA-access seems to 0 the memory when actually it should write data, in our case when DMA is activated for OSPI-access for the Bootloader-application. we did write our own bootloader, but it's based on the sbl_ospi-application from the sdk.

The referenced thread should contain all needed information for understanding.

Is there a solution for this issue? Or are we doing something wrong here?

Best regards

Felix