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

External Flash Problem

I am having problems with drivers for AM29F800 flash memory connected to a XC167 using CS0.

The flash is acting as though there were only one sector, Example: I erase sector 5 then write to sector 5, offset 0 a value of 0xABCD, I read back 0xABCD from sector 5:0 but also from all other sectors. No matter which sector I write to, the same data shows up in all sectors.

I believe the problem is in the setup rather the drivers themselves, but I am not sure of that. I do not know what the Base Address value should be, and it seems that it makes no difference what I set it to. I can read the manufacturer and device ID with no problem.

If anyone knows where I can find working drivers for this combination that would be very helpful.

  • My first question would be how did you define the memory map? You cannot assume a linear 8Mbyte mapping from address 0. The XC16x family has new restrictions over the previous family concerning the use of the memory map. One of the restrictions is that the XC16x family only allows for a maximum of 12MByte of external memory and it is not convenient for one contiguous 8MByte block. I assume you mapped it to 0x040000—0x0BEFFFF and are willing to give up the last 64KByte to the Boot Sector. (I would need to think about more if you want to come up with scheme to try to address it back).

    When you issue the flash command sequences are you assuming this offset?