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 dual flash memory AT49xV32x

I have 2 off Atmel AT49BV322D devices in my design to provide a 32 bit wide memory. I am using the flash Memory Download Setup option AT49xV32x Dual Flash with address range set to 80000000H - 807FFFFFH. The device size is reported to be 8M (although the device is actually 2M * 16). My design has LPC2214 address lines A2 - A22 connected to the AT49BV322D address lines A0 - A20.
I have used a flash.ini file to configure the BCFG0 and PINSEL2 registers.

When I try to download I get the Erase Failed! message.

Am I using the correct flash memory driver? Should I add another AT49xV32x DualFlash to the download setup?
Is there an updated version of this driver with the correct memory size?

Parents
  • Hi Robert, here is my Flash.ini :-
    FUNC void Setup (void) {

    _WDWORD(0xFFE00000, 0x20003CE3); // BCFG0: Flash Bus Configuration

    _WDWORD(0xE002C014, 0x0F814924); // PINSEL2: CS0, OE, WE, BLS0..3 // D0..31, A2..23, JTAG
    } Setup(); // Setup for Flash

    Another thing I have found is that within the AT49xV32x Dual Flash C source file (as supplied by Keil....\Keil\Arm\Flash\AT49xV32x_2\FlashDev.c) the polling checks are made to the status bit 6, whereas the Atmel data sheet refers to bit 7 to poll for completion of the program word. I have made my own version of the algorithm to check bit 7, and this now completes the erase chip and erase sectors which are performed at the start of the Download flash.
    I am now able to complete the Download flash, but it appears to only be writing to addresses with A0 = 0, when A1=1 then the location is not programmed.
    As you can see I am getting there slowly. But I have only been able to get this far by creating my own version of the supplied algorithm (checking status bit 7). This is what made me suspicious that the supplied algorithm had bugs in it.

    Have you been able to succesfully use the Keil supplied algorithm?

    regards John

Reply
  • Hi Robert, here is my Flash.ini :-
    FUNC void Setup (void) {

    _WDWORD(0xFFE00000, 0x20003CE3); // BCFG0: Flash Bus Configuration

    _WDWORD(0xE002C014, 0x0F814924); // PINSEL2: CS0, OE, WE, BLS0..3 // D0..31, A2..23, JTAG
    } Setup(); // Setup for Flash

    Another thing I have found is that within the AT49xV32x Dual Flash C source file (as supplied by Keil....\Keil\Arm\Flash\AT49xV32x_2\FlashDev.c) the polling checks are made to the status bit 6, whereas the Atmel data sheet refers to bit 7 to poll for completion of the program word. I have made my own version of the algorithm to check bit 7, and this now completes the erase chip and erase sectors which are performed at the start of the Download flash.
    I am now able to complete the Download flash, but it appears to only be writing to addresses with A0 = 0, when A1=1 then the location is not programmed.
    As you can see I am getting there slowly. But I have only been able to get this far by creating my own version of the supplied algorithm (checking status bit 7). This is what made me suspicious that the supplied algorithm had bugs in it.

    Have you been able to succesfully use the Keil supplied algorithm?

    regards John

Children
No data