We are using the MCUXpresso IDE (V 11.2., SDK 2.8.2, emwin library 6.1) for an IMXRT1062 project (Embedded Artists iMX RT1062 OEM IT module).
When using multiple frame buffers for the display driver, the program abort sometimes the normal processing and runs only in the this routine (in core_cm7.h) which cleans the buffer cache. This could happen after seconds up to many minutes after program start.
With a single frame buffer the program runs fine, but there are some disturbance in the display.
/**
\brief Clean & Invalidate D-Cache
\details Cleans and Invalidates D-Cache
*/
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
uint32_t ccsidr;
uint32_t sets;
uint32_t ways;
SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();
ccsidr = SCB->CCSIDR;
/* clean & invalidate D-Cache */
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
do {
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
do {
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
#if defined ( __CC_ARM )
__schedule_barrier();
#endif
} while (ways-- != 0U);
} while(sets-- != 0U);
__DSB();
__ISB();
#endif
}
The frame buffer is located in the SDRAM:
Memory region Used Size Region Size %age Used
BOARD_FLASH: 480560 B 4 MB 11.46%
BOARD_SDRAM: 5603656 B 30 MB 17.81%
NCACHE_REGION: 16440 B 2 MB 0.78%
SRAM_DTC: 0 GB 128 KB 0.00%
SRAM_ITC: 0 GB 128 KB 0.00%
SRAM_OC: 0 GB 768 KB 0.00%
Best regards,
Reiner