This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to write data in Flash data memory?

Dear Sir,

I am using ADUC841 microcontroller from Analog devices,which consists of 8052 core.In this it is having 4Kbytes of Flash data memory.I wrote the routines as mentioned in application note for writing the data in Flash.But the data is not storing in Flash.So,please send me some guidelines for writing the data in Flash.

Thanking you,

Yours sincerely, Shivakumar Manda

Parents
  • Seems like the calls to sleep are to allow time for the flash programming operation to occur.

    It seems like that to me too, but I was asking for an answer from the OP - if he wrote his code according to the datasheet, then he should have noticed that it is not necessary to manually wait for anything when writing to the flash - the CPU will idle automatically until the write operation finishes. When the next instruction after the write command executes, the write operation is already over.

    (Yes, this means that the chip may well spend several milliseconds doing nothing, including not responding to interrupts)

Reply
  • Seems like the calls to sleep are to allow time for the flash programming operation to occur.

    It seems like that to me too, but I was asking for an answer from the OP - if he wrote his code according to the datasheet, then he should have noticed that it is not necessary to manually wait for anything when writing to the flash - the CPU will idle automatically until the write operation finishes. When the next instruction after the write command executes, the write operation is already over.

    (Yes, this means that the chip may well spend several milliseconds doing nothing, including not responding to interrupts)

Children