MPC56xx Read flash from user code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC56xx Read flash from user code

Jump to solution
2,269 Views
tbonkers
Contributor III

Is there any restriction on reading Flash from user code in MPC56xx processors? I need to read parts from Shadow and Data flash, and know that erase and write are performed using special drivers, but what about reading?

Normally I'll use the code below:

  	for (i =SHADOW_FLASH_BASE; i <  SHADOW_FLASH_END; i+= 4)
  	{
  		word = *(uint32_t*) i;
  		uart_print_int(word);
  	}
  	

 

0 Kudos
Reply
1 Solution
2,256 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

you can read the flash directly, there are no restrictions.

It's just expected that the flash area is covered by Memory Management Unit - MMU (not present on e200z0 cores) and it's not protected by Memory Protection Unit - MPU (not all MPC56xx have MPU).

Regards,

Lukas

View solution in original post

0 Kudos
Reply
1 Reply
2,257 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

you can read the flash directly, there are no restrictions.

It's just expected that the flash area is covered by Memory Management Unit - MMU (not present on e200z0 cores) and it's not protected by Memory Protection Unit - MPU (not all MPC56xx have MPU).

Regards,

Lukas

0 Kudos
Reply