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.
Not sure here if you mean the program flash or not, since you first say that you can write to "data eeprom" and then say that you can not write to "the data flash".
EEPROM and flash are more or less the same thing.
Flash is just a cooler name for describing that the EEPROM memory happens to support fast block-sized or full device-sized erase while the older and more traditional EEPROM requires individual cells or small blocks of maybe 8-32 bytes to be erased at a time.
It's a big difference between In Application Programming (IAP) to write to the program flash, and to write to the 4kB EEPROM memory. If the processor supports IAP, then there should be application notes or information in the datasheet how to do it. If you mean the 4kB EEPROM, then I don't see what information you need since you already claim you are able to write to it.
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.
View all questions in Keil forum