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

Hi,
Currently I'm using LPC2478 that has 512KB Internal flash with my ULINK2.
It works fine - I can downlaod flash, Debug, Run....

512KB become too small - I would like to move to bigger flash size (without changing NXP).

I Can use the LPC2470 (without internal flash) and connect it to the SST39x160x (that is supported by the ULINK2).
When I do that- I will loose something?
Can I still download , Debug, and run the target with the JTAG and ULINK2?

Regards,
Doron

Parents
  • Can I still download , Debug, and run the target with the JTAG and ULINK2?

    You need to adjust the initialization file (debug page of project settings) of uv4 so that it can access the NOR flash (LPC2478):

    // Setup pins for External NOR Flash
    _WDWORD(0xFFE08000, 0x00000001);        // EMC_CTRL: Disable address mirror
    _WDWORD(0xE01FC0C4, _RDWORD(0xE01FC0C4) | 0x00000800);    // PCONP: Turn on EMC PCLK
    _WDWORD(0xE002C018, 0x55555555);        // PINSEL6
    _WDWORD(0xE002C020, 0x55555555);        // PINSEL8
    _WDWORD(0xE002C024, 0x10051555);        // PINSEL9
    
    // Setup controller for External NOR Flash
    _WDWORD(0xFFE08200, 0x00000081);        // EMCStaticConfig0
    _WDWORD(0xFFE08204, 0x00000000);        // EMCStaticWaitWen0
    _WDWORD(0xFFE08208, 0x00000003);        // EMCStaticWaitOen0
    _WDWORD(0xFFE0820C, 0x00000005);        // EMCStaticWaitRd0
    _WDWORD(0xFFE08210, 0x00000000);        // EMCStaticWaitPage0
    _WDWORD(0xFFE08214, 0x00000000);        // EMCStaticWaitWr0
    _WDWORD(0xFFE08218, 0x00000000);        // EMCStaticWaitTurn0
    
    
    LOAD .\bin\FMMapp.axf INCREMENTAL     // Download program
    //_WDWORD(0xE01FC040, 0x00000003);        // Remap External Memory to 0
    
    PC = 0                                  // Set PC to beginning
    g, main
    

    You might also consider adjusting your bootloader to accomplish the same via IAP.

Reply
  • Can I still download , Debug, and run the target with the JTAG and ULINK2?

    You need to adjust the initialization file (debug page of project settings) of uv4 so that it can access the NOR flash (LPC2478):

    // Setup pins for External NOR Flash
    _WDWORD(0xFFE08000, 0x00000001);        // EMC_CTRL: Disable address mirror
    _WDWORD(0xE01FC0C4, _RDWORD(0xE01FC0C4) | 0x00000800);    // PCONP: Turn on EMC PCLK
    _WDWORD(0xE002C018, 0x55555555);        // PINSEL6
    _WDWORD(0xE002C020, 0x55555555);        // PINSEL8
    _WDWORD(0xE002C024, 0x10051555);        // PINSEL9
    
    // Setup controller for External NOR Flash
    _WDWORD(0xFFE08200, 0x00000081);        // EMCStaticConfig0
    _WDWORD(0xFFE08204, 0x00000000);        // EMCStaticWaitWen0
    _WDWORD(0xFFE08208, 0x00000003);        // EMCStaticWaitOen0
    _WDWORD(0xFFE0820C, 0x00000005);        // EMCStaticWaitRd0
    _WDWORD(0xFFE08210, 0x00000000);        // EMCStaticWaitPage0
    _WDWORD(0xFFE08214, 0x00000000);        // EMCStaticWaitWr0
    _WDWORD(0xFFE08218, 0x00000000);        // EMCStaticWaitTurn0
    
    
    LOAD .\bin\FMMapp.axf INCREMENTAL     // Download program
    //_WDWORD(0xE01FC040, 0x00000003);        // Remap External Memory to 0
    
    PC = 0                                  // Set PC to beginning
    g, main
    

    You might also consider adjusting your bootloader to accomplish the same via IAP.

Children