I've got a custom board with an AT91SAM9G45 with an M25P128 SPI flash part attached. I've modified the serial flash applet in SAM-BA to pick up the micron part and I can program AT91Bootstrap no problem.
However, when I come to try and flash on u-boot (~190KB) SAM-BA immediately prints '-E- Memory Overflow'
I notice that the memory size reported when initialising the applet is '0x10000' or 32KB where as it should be "0x1000000" or 16MB.
The line I added to the 'at26.c' file for the flash part is as follows:
Code: Select all
static const At26Desc at26Devices[] = {
// name, Jedec ID, size, page size, block size, block erase command
....
{"M25P64" , 0x00172020, 8 * 1024 * 1024, 256, 64 * 1024, AT26_BLOCK_ERASE_64K},
{"M25P128" , 0x00182020, 16 * 1024 * 1024, 256, 256 * 1024, AT26_BLOCK_ERASE_64K},
....
};
I'd be grateful for any help!
Thanks in advance,
Gordon.