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.

The cache attribute configuration issue in the memory zone for Device

Hi all,

   I face a cache coherence in the memory zone for the Device. The code is enclosed as in 0310.uartEcho.c.

    In this case, the cnt, that is TCLR, printed out should be 47, as the DTIMER mode is configured as auto-reload mode.

    I have done some test as following:

   1. Configure the regionDev as MMU_MEMTYPE_DEVICE_SHAREABLE, and run the uartEco directly without breakpoint, the cnt print is 45.

   2. Configure the regionDev as MMU_MEMTYPE_STRONG_ORD_SHAREABLE, and run the uartEco directly without breakpoint, the cnt print is 47.

   3. Disable the MMU and cache, that is, comment out the MMUConfigAndEnable() & CacheEnable(), and run the uartEco without the breakpoint, the cnt print is 47.

   4. Configure the regionDev as MMU_MEMTYPE_DEVICE_SHAREABLE, and set the breakpoint with in the CPU_TS_TmrInit(), then continue to run the application, the cnt print is 47.

    Comparing the #1, #3 and #4, it can be seen that the breakpoint flush the cache to make the TCLR correct. Comparing #1 and #2, I think the strong order should be the correct attribute we need to set to the memory zone.

    Please review it and confirm.

Thanks!

Yaoming