I'm programming flash memory of MPC5606B through JTAG interface using Nexus. I'm imitating a tool that perform this task. However, in the middle of the process, the entire flash memory is erased. I skipped this part in code, but, when I do this, the write to memory does not work. Of course I have a backup of the memory, but, I was wondering, to allow programming the data flash is necessary to erase a block memory? I mean, the procedure is a bit long, so, I was wondering if I can just to write in memory positions.
The tool makes a selection of 4 blocks of 16kB to be erased, it is the entire dataflash of MPC5606, 64kB. So, I can erase only 16kB instead of 64kB, but, my doubt is, is really necessary to erase a block of 16kB, or the entire memory of 64kB, just to write some bytes , for example 16 bytes, in the flash memory ?
I looked about this information on datasheet and documents like AN4365 and I didn't find nothing.
Please, any help will be appreciated. With my bests regards , Daniel.