Hot!Easy Bootloader Forwarding interrupts

Author
Grobatt
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2012/04/20 09:17:54
  • Location: 0
  • Status: offline
2017/11/14 10:09:01 (permalink)
0

Easy Bootloader Forwarding interrupts

Hello,
 
I'm trying to implement EZBL for my application.
So far I've been able to compile EZBL and configure it for my pic24fj128da206, and it's seems to upload my application just fine.
 
But... my application use same UART port as the bootloader.
 
So when I configure my application with EZBL  I'm not able to use UART interrupts...
 
I've tried to play with interrupts forwarding but without success.... either the bootloader works or my uart works but I can have both :(..
 
In the bootloader code, in main.c I uncommented this lines:
EZBL_RAMSet((void*)&IEC0, 0x00, (unsigned int)&IPC0 - (unsigned int)&IEC0);
EZBL_ForwardBootloaderISR = 0xFFFFFFFF; // Forward all Interrupts to the Application
NOW_EndAllTasks();

 
This should forward the interrupts to my application.
Well this seems to work as when i do this, I can use the uart...
so when I receive a special command from the UART i do this:
 EZBL_RAMSet((void*)&IEC0, 0x00, (unsigned int)&IPC0 - (unsigned int)&IEC0); 
 EZBL_ForwardBootloaderISR = 0x0;

 
Once this is done... I can no longer send/received characters throught the UART so I guess the interrupts have been forwarded, but the bootloader does not respond anymore :(....
 
I guess I miss something... but what ? 
 
Thanks for your help.
post edited by Grobatt - 2017/11/14 10:14:02
#1

7 Replies Related Threads

    Grobatt
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2012/04/20 09:17:54
    • Location: 0
    • Status: offline
    Re: Easy Bootloader Forwarding interrupts 2017/11/14 11:18:39 (permalink)
    0
    Well, I found a workaround for now, but not very satifying...
     
    Instead of forwarding back the interrupts to the bootloader I just soft reset my application, therefore it restart in bootloader,  and I send the new firmware before the bootloader timeout...
     
    It does work, but I would prefer to forward the interrupts back to the bootloader ...
    #2
    RISC
    Super Member
    • Total Posts : 5177
    • Reward points : 0
    • Status: offline
    Re: Easy Bootloader Forwarding interrupts 2017/11/19 16:00:17 (permalink)
    0
    Hi,
    Are you using the new version of EZBL (v2.04) ?
    Regards
     
    #3
    DG5MK
    Starting Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2016/04/29 09:06:38
    • Location: 0
    • Status: offline
    Re: Easy Bootloader Forwarding interrupts 2018/01/11 13:06:25 (permalink)
    0
    @Grobatt, don't know if you still need help, but I have implemented exactly the same scenario with success. BL and app using same RX&TX INT on UART (and timer INT). During start, all interupts are forwarded to the app to enable the app to use the resources. By user command (or whatever triggers it) interrupt control is passed back to the bootloader by 
    EZBL_ForwardBootloaderISR = 0x00000000; //switch over to bootloader
    Don't forget to start the UART module, PPS pins or whatever is needed to create the environment the boot loader needs to communicate. Works perfect..
    Regards Michael
    #4
    JostR
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2018/02/07 03:10:45
    • Location: 0
    • Status: offline
    Re: Easy Bootloader Forwarding interrupts 2018/02/09 03:44:52 (permalink)
    0
    Hi,
    I have a similar problem. Interrupt forwarding works both ways, I am also able to update the code using BL, but when the interrupts are forwarded to bootloader the code in there is not executing until I try to upload new app, so I cannot pass the intereupts back to app after a timeout as I would like to. So how do you get the bootloader running @DG5MK ?

    Regards Jost
    #5
    DG5MK
    Starting Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2016/04/29 09:06:38
    • Location: 0
    • Status: offline
    Re: Easy Bootloader Forwarding interrupts 2018/02/09 08:43:11 (permalink)
    0
    Jost, what do you mean by BL code not executing until you update new app. If update works the code is executing. Is the question about going back to the app without updating? I simply switch off the device. BL recognizes that there is still a valid app and passes over to the app. Regards Michael
    #6
    JostR
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2018/02/07 03:10:45
    • Location: 0
    • Status: offline
    Re: Easy Bootloader Forwarding interrupts 2018/02/09 09:45:39 (permalink)
    0
     
     
    >>Is the question about going back to the app without updating?
     
    Yes thats what I am trying to do. The bootloader should be doing some tasks and after a timeout if there is no update request the app continues running.
    #7
    coarist
    New Member
    • Total Posts : 0
    • Reward points : 0
    • Joined: 2012/02/08 09:29:02
    • Location: 0
    • Status: offline
    ➥ Approval Pending
    Re: Easy Bootloader Forwarding interrupts 2018/04/24 05:51:48 (permalink)
    #8
    Jump to:
    © 2018 APG vNext Trial Version 4.5