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

Issue With loded code under IAP

i am using LPC2148 For my Project. There is a problem in Loded code in IAP programming through Secondary Bootloder(USB)....

1).When I load Code USING FLASH MAGIC ISP MODE(Through Serial Coomunication). my code works fine without any Problem..(BUT code is might in size so it is painful to wait 5 min To see How its Work.)

2).When Same code i modified(Not edit Code only few settings to generate binary file.) For compatiblity in USB Bootloder Purpose.The code is loded succesfully without errors and There is a proper execution of all things except SERIAL COMMUNICATION..my serial communication is not work properly and strange characters are displaying in Terminal...

i am beginner so not Developed A code for USB bootloder But just Get it from NXP..

www.nxp.com/.../AN10711.zip

and it is working fine and able to load code with P0.15 low and detect USB storage..

By googling about this i find there should be little modification for Startup.s for the Interrupt Vector Table and yes i am using Serial interrupt which on character reception into lpc2148..

Parents
  • After Reading NXP secondary Bootloder figure out some Data Might be Useful For solution...

    For NXP AN10711 USB bootloader....
    Loded At 0x00 Hex
    1> Used Interrupt:

    
      VICVectAddr0 = (unsigned long)USB_ISR;    /* USB Interrupt -> Vector 0 */
      VICVectCntl0 = 0x20 | 22;                 /* USB Interrupt -> IRQ Slot 0 */
      VICIntEnable = 1 << 22;                   /* Enable USB Interrupt */
    
    

    2> Startup.s Adresses:
    (Stack configuration..)

    Undefined Mode :0x0000 0000
    Supervisor Mode :0x0000 0008
    Abort Mode :0x0000 0000
    Fast Interrupt Mode:0x0000 0000
    Interrupt Mode :0x0000 0400
    User/System Mode :0x0000 0800

    For User Application (main application Code)....
    Loded At 0x2000 Hex
    1> Used Interrupt:

      VICVectCntl13 = 0x20 | 13; ; //Set channel
      VICVectAddr13 = (unsigned long)RTCHandler; //Set the timer ISR vector address
    
      VICVectCntl2 = 0x20 | 16; //0x0000002F; //select a priority slot for a given interrupt
      VICVectAddr2 = (unsigned long)EXTINT3_VectoredIRQ; // pass the address of the IRQ into VIC
      VICVectCntl0 = 0x20 | 14;
      VICVectAddr0 = (unsigned long)EXTINT0_VectoredIRQ;
      VICVectCntl3 = 0x20 | 17;
      VICVectAddr3 = (unsigned long)EXTINT2_VectoredIRQ;
    
      VICVectCntl5 = 0x20 | 6;
      VICVectAddr5=(unsigned long) UART_ISR0;
    

    2> Startup.s Adresses:
    (Stack configuration..)

    Undefined Mode :0x0000 0000
    Supervisor Mode :0x0000 0008
    Abort Mode :0x0000 0000
    Fast Interrupt Mode:0x0000 0000
    Interrupt Mode :0x0000 0080
    User/System Mode :0x0000 0400

    If there is a need of remaping than how to remap those adresses for proper execution of my code loded with secondary boot loder..

Reply
  • After Reading NXP secondary Bootloder figure out some Data Might be Useful For solution...

    For NXP AN10711 USB bootloader....
    Loded At 0x00 Hex
    1> Used Interrupt:

    
      VICVectAddr0 = (unsigned long)USB_ISR;    /* USB Interrupt -> Vector 0 */
      VICVectCntl0 = 0x20 | 22;                 /* USB Interrupt -> IRQ Slot 0 */
      VICIntEnable = 1 << 22;                   /* Enable USB Interrupt */
    
    

    2> Startup.s Adresses:
    (Stack configuration..)

    Undefined Mode :0x0000 0000
    Supervisor Mode :0x0000 0008
    Abort Mode :0x0000 0000
    Fast Interrupt Mode:0x0000 0000
    Interrupt Mode :0x0000 0400
    User/System Mode :0x0000 0800

    For User Application (main application Code)....
    Loded At 0x2000 Hex
    1> Used Interrupt:

      VICVectCntl13 = 0x20 | 13; ; //Set channel
      VICVectAddr13 = (unsigned long)RTCHandler; //Set the timer ISR vector address
    
      VICVectCntl2 = 0x20 | 16; //0x0000002F; //select a priority slot for a given interrupt
      VICVectAddr2 = (unsigned long)EXTINT3_VectoredIRQ; // pass the address of the IRQ into VIC
      VICVectCntl0 = 0x20 | 14;
      VICVectAddr0 = (unsigned long)EXTINT0_VectoredIRQ;
      VICVectCntl3 = 0x20 | 17;
      VICVectAddr3 = (unsigned long)EXTINT2_VectoredIRQ;
    
      VICVectCntl5 = 0x20 | 6;
      VICVectAddr5=(unsigned long) UART_ISR0;
    

    2> Startup.s Adresses:
    (Stack configuration..)

    Undefined Mode :0x0000 0000
    Supervisor Mode :0x0000 0008
    Abort Mode :0x0000 0000
    Fast Interrupt Mode:0x0000 0000
    Interrupt Mode :0x0000 0080
    User/System Mode :0x0000 0400

    If there is a need of remaping than how to remap those adresses for proper execution of my code loded with secondary boot loder..

Children
No data