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

Programming Flash (AT49BV1614)

Hello!
i wanted to programm this flash (AT49BV1614).

So I copied the flash programming algorithms for AT49xV16x4A (Atmel Flash) and changed the flashdev.c and flashprog.c
But it won't work.

So I compared the datasheet from AT49xV16x4A with the algorithms from keil and found some difference:

The Algorithm from Keil for AT49xV16x4A:

int EraseChip (void) {

  // Start Chip Erase Command
  M16(base_adr + 0xAAA) = 0xAA;
  M16(base_adr + 0x554) = 0x55;
  M16(base_adr + 0xAAA) = 0x80;
  M16(base_adr + 0xAAA) = 0xAA;
  M16(base_adr + 0x554) = 0x55;
  M16(base_adr + 0xAAA) = 0x10;

  return (Polling(base_adr));  // Wait until Erase completed
}

The Hex Command definition from Atmel for AT49xV16x4A (Chip Erase):

1. Cycle: Adr: 555; Data = AA
2. Cycle: Adr: AAA; Data = 55
3. Cycle: Adr: 555; Data = 80
4. Cycle: Adr: 555; Data = AA
5. Cycle: Adr: AAA; Data = 55
6. Cycle: Adr: 555; Data = 10

As you can see the Adresses are different (seem to be inverted, but 554 and AAA?), but commands are equal, so i wonder how this can work?!?
This concerns also sector erase and programm.

In a simple test programm i tried to access the flash directly, with the commands from atmels datasheet. This seems to work fine.

Has anybody tried to write a flash prog. algorithm or an idea how to get it work?

0