This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: how to handle application interrupt with a bootloader

Part Number: TMS570LC4357

Hi all,

we're developing a bootloader using ethernet communication. So far we managed to erase, program and jump to the application.

The problem is: during the application execution only background functionsare executed while the ones inside the timer interrupt aren't. 

The bootloader resides in flash from 0x0000 to 0x7FFF. the application resides from 0x8000.

We remapped the application vector table to 0x8000 and tried to follow the instructions at this link:

Interrupt exception vector handling with bootlaoder - Arm-based microcontrollers forum - Arm-based microcontrollers...

e2e.ti.com
Other Parts Discussed in Thread: HALCOGEN Hello, In my current project i need to implement a bootloader for firmware update purpose. The bootlaoder is at the

So now in the bootloader project we have:

resetEntry
        b   _c_int00
undefEntry
        b   #0x7FF8 ;undefEntry
svcEntry
        b   #0x7FF8; svcEntry
prefetchEntry
        b   #0x7FF8;prefetchEntry
dataEntry
        b   #0x7FF8; dataEntry
        b   #0x7FF8; phantomInterrupt
        ldr pc,[pc,#-0x1b0]
        ldr pc,[pc,#-0x1b0]

Besides we enabled the IRQ Handling via VIC Controller.

Still no changes.

Any suggestion?

Thanks

Valentina

  • Hi Valentina,

    After reset, the IRQ and FIQ bits in ARM CPSR register are set, and FIQ and IRQ interrupt are disabled. Please call "_enable_IRQ_interrupt_();" to enable the IRQ interrupt.

    You also need to enable the RTI compare interrupt notification. For example:
    rtiEnableNotification(rtiREG1,rtiNOTIFICATION_COMPARE0);
  • Hello Mr Wang,

    thank you for your attention.

    I do have "_enable_IRQ_interrupt()" inside my application code and the RTI interrupt notification enabled. As a matter of fact running the application code without the bootloader the timer interrupt works as the other interrupts.

    I guess I'm missing something in remapping interrupt vector table using the bootloader.

    Thanks

    Best regards

    Valentina

  • Hello Valentina,

    Did you change the cmd file to allocate vectors to 0x8000?

    VECTORS (X) : origin=0x00008000 length=0x00000020
  • To use the interrupt in application, the interrupt vector table of the bootloader, and the cmd file of the application should be modified as below:

    1. cmd file of the application

       VECTORS    (X)   : origin=0x0000xxxx (application  start address) length=0x00000020

    2. interrupt vector table in bootloader

    b _c_int00 ;0x00
    b #0xxxxx  (application start address - 0x08) 
    b #0xxxxx  (application start address - 0x08) ;Software interrupt
    b #0xxxxx  (application start address - 0x08) ;Abort (prefetch)
    b #0xxxxx  (application start address - 0x08) ;Abort (data)
    reservedEntry
    b reservedEntry
    ldr pc,[pc, #-0x1b0] ;0x18
    ldr pc,[pc, #-0x1b0] ;0x1C

  • Hi Valentina,

    Pay attention to the code“switch (getResetSource ())....” in the HL_sys_startup.c file.

    When the code jump into app from bootloader, the reset source is cleared at bootloader, the interrupt vector initialization and other functions will not be executed, so the interruption in app can not enter.

    If this place is not modified, this problem will be encountered.