Dear Team,
We are facing memory updation not reflecting in alias region between M7 and M4 on IMXRT1176-EVK with MCUXpresso IDE with USB MSD with FATFS baremetal code.
We are developing an application with the following requirements:
Three buffers shared_buf[3][64KB] between M7 and M4 where M7 is master and M4 is Slave
Using M7, Read 64KB data from USB into one of the ‘shared_buf’ and send the index of buffer using MU_interrupt to M4. M7 starts reading another 64KB data from USB into another buffer
On receiving Interrupt, M4 processes the data in ‘shared_buf’, say increment each byte by 1 in buffer, and sends the processed data buffer index to M7 using MU_interrupt
On receiving Interrupt, M7 Writes the processed data into another USB MSD on Host1. The process continues
We have made the memory configuration on M7 as shown below:


M4 as shown in attched file and Memory configuration on M4 as shown below:


We have defined the shared memory of shared_buf[3][64KB] along with additional details for size and processed info of another 32bytes in ‘*(.shared_memory)’ section in ‘SRAM_CM4_ALIAS_SHARED’ region on M7 and ‘SRAM_DTC_cm4’ region on M4. ‘shared_buf’ is 32B aligned and starts at 0x2020e000 on both cores M7 and M4.
We are using the default ‘BOARD_ConfigMPU()’ function and no modifications done in the memory regions settings as shown below:
We are able access the shared memory on both cores successfully, but data changes are not reflected on either side with above mentioned memory configuration.
We tried cache cleaning functions ‘SCB_CleanDCache_by_Addr (volatile void *addr, int32_t dsize)’ before giving interrupt to M4 on M7 and SCB_CleanInvalidateDCache_by_Addr (volatile void *addr, int32_t dsize) after getting interrupt from M4 on M7 but execution becomes nearly 8 times slower.
If we change the above memory configuration to any of them as shown below and no usage of cache cleaning function, data changes are reflected properly but execution becomes nearly 8 times slower which is not desirable.
Setting-1:
Setting-2:

Setting-3:
How to achieve the data changes reflected properly with shared memory (approx. 196KB) at 0x2020e000 on both M7 and M4?
Please help us to resolve the problem.