DMA transfer error when reading Code Flash ECC test pattern

Hi,

I'm using RH850 P1M-E device, and am trying to use DMA to read out the Code Flash ECC test pattern, however, when I tried to access the 2bit error pattern at address 0x0100A8B0, the DMA transfer reported an error, all the other locations in the Code Flash ECC test area are accessible via DMA.

I'm wondering whenever the DED pattern area is accessed, the DMA transfer will end up with an error, could you help me look into this issue?

Please find my demo DMA transfer code below:
The SourceAddr is 0x0100A8B0 according to the UserManual, and DesAddr is 0xFEEF8000 in my project.

static void DmaTransfer(uint32 SourceAddr, uint32 DesAddr)
{
WriteRegister_U32(DM00CM_Addr, 0x00002014U);
if(0x00000001U == ReadRegister_U32(DMA0DCEN0_Addr))
{
/* disable DMA0 channel0 if it's enabled*/
WriteRegister_U32(DMA0DCEN0_Addr, 0x00000000U);
}
/* specify source and destination address */
WriteRegister_U32(DMA0DSA0_ADDR, SourceAddr);
WriteRegister_U32(DMA0DDA0_ADDR, DesAddr);

/* set single transfer 128bits */
WriteRegister_U32(DMA0DTC0_ADDR, 0x00000001U);
WriteRegister_U32(DMA0DTCT0_ADDR, 0x00000010U);

if(0x00000010U == ReadRegister_U32(DMA0DCST0_ADDR))
{
WriteRegister_U32(DMA0DCSTC0_ADDR, 0x00000010U);
}

WriteRegister_U32(DMA0DCSTS0_ADDR, 0x00000001U);
WriteRegister_U32(DMA0DCEN0_Addr, 0x00000001U);

while(0x00000010U != ReadRegister_U32(DMA0DCST0_ADDR))
{
/* wait DMA Transfer complete */
}
}

Thank you!

Parents Reply Children
No Data