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);
}
Solved! Go to Solution.
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
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