Hi, I am working with ARM Cortex R4F. I am using MPU to create 3 Memory Regions (Flash, SRAM and DRAM). I work in Supervisor, IRQ or FIQ Mode. When changing the Flash memory region from Memory mode to Device mode or vice versa, do I have to disable MPU ?
My code works fine without disabling it and as far as I have tested, nothing breaks. But I want to be sure if this is an acceptable approach and if there are any harmful effects
Thanks in Advance,
Karthik
Hi Karthik,
You do not need to disable, but we _strongly_ recommend the use of barrier instructions after reprogramming. See the below document, especially section 3.3.https://static.docs.arm.com/dai0321/a/DAI0321A_programming_guide_memory_barriers_for_m_profile.pdfRegards,
Ronan
Hi Ronan,
Thanks for the answer. The document that you suggested is for Cortex M. Will the same hold for Cortex R4F ?
Regards,
Apologies for misreading your first message, however, yes, the same rule applies.
You may find the below document useful:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0042a/index.html