cancel
Showing results for 
Search instead for 
Did you mean: 

Access to DDR in M4

fantasylsdo
Associate II

Deaers,

I'm using stm32mp151fad and would like to transfter sram data to ddr in M4 side. I refer to the logic analyzer example https://github.com/STMicroelectronics/logicanalyser. The sram data could be copied into ddr immediately.  

 

// mask and transfer first SRAM buff
 
        uint32_t * pSource = (uint32_t *)&mSampBuff[0];
        uint32_t * pDest = (uint32_t *)(mArrayDdrBuff[mArrayDdrBuffIndex].physAddr+mRollingCompSampCount);
        // we have a buffer of mSramPacketSize/2 bytes, to send by packet of 4 => loop on mSramPacketSize/8
        for (int i=0; i<mSramPacketSize/8; i++) {
        *(pDest+i) = *(pSource+i) & 0x7F7F7F7F; // 76µs to perform this operation, a memcpy takes 104µs
        }
 
But when I tried it, the program will go to crash. The destination address is 0xf7841000.
 
Here is my etzpc configuration in tf-a. and I use spmin instead of optee.
DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)
DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)

Do you have any thoughts about its root cause?

0 REPLIES 0