AnsweredAssumed Answered

MPC5674f Flash write

Question asked by Maycon Kruger on Jun 29, 2017
Latest reply on Jun 29, 2017 by Maycon Kruger

Hi, I am currently working with a MPC5674f based board.
I am trying to write to a flash memory block.
The code that writes to the flash memory is also in the same flash , but in a different memory block.
I've been reading the reference manual and concluded that the only way to that would be throught the FLASH CONFIGURATION REGISTER(located 0xC3F8800) described in chapter 11.2.1 of the reference manual.


The problem is I can't seen to write to these registers(Can only read then).

Is there any locking mechanism preventing me to do so?


This is the sample clode used to write in one of the configuration registers.

  os_uintptr_t* mcr  = (os_uintptr_t*)0xC3F88000;
   printf("mcr = 0x0%x\n",*mcr);
   *mcr = *mcr | 0x20000000;            //ERS
   printf("mcr = 0x0%x\n",*mcr);