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 }
"I compared the datasheet from AT49xV16x4A with the algorithms from keil and found some difference" This should come as no surprise! Different Flash chips have different algorithms - you just have to implement the correct algorithm for the chip you're actually using! This is why PROM programmers always have a list of supported devices! "In a simple test programm i tried to access the flash directly, with the commands from atmels datasheet. This seems to work fine." That's exactly as it should be - just do what the datasheet tells you!
Andy, I'm not sure, but I think what the poster was trying to say is that the algorithms from Keil that he attempted to use were stated to be the ones that DO work for his chip, but after checking the datasheet, he finds that's not the case.