Hi, I am new to N79E059A 40 pin DIP package. This controller has 4k Data EEprom for storing or reading the data. I am able to write to data eeprom. Any guidance on writing the data flash will be helpful.
Okies, To make my things clear this uC has 4k data eeprom or non-volatile data memory to store data for reading and writing purpose. It supports ISP method for writing to data eeprom. In Atmel's 89S8253 writing to data eeprom is different.
In Nuvoton N79E059A to write to data flash or data eeprom or non-volatile data memory there is an ISP procedure which is given in sample code from Nuvotn's website. I can write the data value at a particular address say 0xF000 for the first time. If I write again on the same address the process fails and it returns me 0x00, which means either failed write process or failed read process.
I need some guidance in this situation.
Writing twice to the same location of a flash memory is expected to fail, since the flash block needs to be erased before it is possible to write different information to it.
Note that ISP is In System Programming. So you can from the outside of the system program the memory without removing the chip. Sometimes by connecting a programming probe but now normally by connecting to some form of serial port on the hardware.
IAP on the other hand is In Application Programming. Which means that your running program can run commands that will change the contents of the memory.
So ISP documentation will not help you if the goal is to perform IAP. And if it's flash memory, then there should be some information about how to prepare a flash block so it is ready for new data.