• AVR Freaks

Hot!After interrupt event the project which will be loaded by bootloader hangs up on pic32mk

Author
anna.virabyan
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2019/01/30 03:18:54
  • Location: 0
  • Status: offline
2019/01/31 00:53:53 (permalink)
0

After interrupt event the project which will be loaded by bootloader hangs up on pic32mk

Please help me, i generate hid bootloader project and app with harmony. I enable timer, uart interrupts in the app. The project successfully loaded in pic32mk by bootloader, but after interrupt event, the app hangs up. For pic32mx interrupt works perfectly.
 
This is a bootloader linker script
 
* For interrupt vector handling
*************************************************************************/
PROVIDE(_vector_spacing = 0x00000001);
_ebase_address = 0x9FC01000;
/*************************************************************************
* Memory Address Equates
* _RESET_ADDR -- Reset Vector
* _BEV_EXCPT_ADDR -- Boot exception Vector
* _DBG_EXCPT_ADDR -- In-circuit Debugging Exception Vector
* _DBG_CODE_ADDR -- In-circuit Debug Executive address
* _DBG_CODE_SIZE -- In-circuit Debug Executive size
* _GEN_EXCPT_ADDR -- General Exception Vector
*************************************************************************/
_RESET_ADDR = 0xBFC00000;
_BEV_EXCPT_ADDR = (0xBFC00000 + 0x380);
_DBG_EXCPT_ADDR = (0xBFC00000 + 0x480);
_DBG_CODE_ADDR = 0xBFC02000;
_DBG_CODE_SIZE = 0xFF0;
_GEN_EXCPT_ADDR = _ebase_address + 0x180;
/*************************************************************************
* Memory Regions
*
* Memory regions without attributes cannot be used for orphaned sections.
* Only sections specifically assigned to these regions can be allocated
* into these regions.
*************************************************************************/
MEMORY
{
kseg0_program_mem (rx) : ORIGIN = 0x9D000000, LENGTH = 0x7000 /* All C Files will be located here */
kseg0_boot_mem : ORIGIN = 0x9FC00490, LENGTH = 0x0 /* This memory region is dummy */
exception_mem : ORIGIN = 0x9FC01000, LENGTH = 0x1000 /* Interrupt vector table */
config3 : ORIGIN = 0xBFC02FF0, LENGTH = 0x4
config2 : ORIGIN = 0xBFC02FF4, LENGTH = 0x4
config1 : ORIGIN = 0xBFC02FF8, LENGTH = 0x4
config0 : ORIGIN = 0xBFC02FFC, LENGTH = 0x4
kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x300 /* C Startup code */
kseg1_data_mem (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x20000
sfrs : ORIGIN = 0xBF800000, LENGTH = 0x100000
debug_exec_mem : ORIGIN = 0xBFC02000, LENGTH = 0xFF0
configsfrs : ORIGIN = 0xBFC02FF0, LENGTH = 0x10
}
 
This is a app linker script
 
/*************************************************************************
* For interrupt vector handling
*************************************************************************/
PROVIDE(_vector_spacing = 0x00000001);
_ebase_address = 0x9D008000;
/*************************************************************************
* Memory Address Equates
* _RESET_ADDR -- Reset Vector
* _BEV_EXCPT_ADDR -- Boot exception Vector
* _DBG_EXCPT_ADDR -- In-circuit Debugging Exception Vector
* _DBG_CODE_ADDR -- In-circuit Debug Executive address
* _DBG_CODE_SIZE -- In-circuit Debug Executive size
* _GEN_EXCPT_ADDR -- General Exception Vector
*************************************************************************/
_RESET_ADDR = (0x9D007000);
_GEN_EXCPT_ADDR = _ebase_address + 0x180;
/*************************************************************************
* Memory Regions
*
* Memory regions without attributes cannot be used for orphaned sections.
* Only sections specifically assigned to these regions can be allocated
* into these regions.
*************************************************************************/
MEMORY
{
kseg0_program_mem (rx) : ORIGIN = (0x9D000000 + 0x7000), LENGTH = (0x80000 - 0x7000) /* All C Files will be located here */
kseg0_boot_mem : ORIGIN = 0x9D000000 + 0x7000, LENGTH = 0x0 /* This memory region is dummy */
config3 : ORIGIN = 0xBFC02FF0, LENGTH = 0x4
config2 : ORIGIN = 0xBFC02FF4, LENGTH = 0x4
config1 : ORIGIN = 0xBFC02FF8, LENGTH = 0x4
config0 : ORIGIN = 0xBFC02FFC, LENGTH = 0x4
kseg1_data_mem (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x20000
sfrs : ORIGIN = 0xBF800000, LENGTH = 0x100000
debug_exec_mem : ORIGIN = 0xBFC02000, LENGTH = 0xFF0
configsfrs : ORIGIN = 0xBFC02FF0, LENGTH = 0x10
}
#1

4 Replies Related Threads

    Larry.Standage
    Super Member
    • Total Posts : 878
    • Reward points : 0
    • Joined: 2011/12/30 09:50:47
    • Location: 0
    • Status: offline
    Re: After interrupt event the project which will be loaded by bootloader hangs up on pic32 2019/01/31 14:29:09 (permalink)
    0
    Is the application handling the USB interrupt? If not, the bootloader may not be shutting it down before jumping to the application. An unhandled interrupt will cause the application to stop working.
    #2
    anna.virabyan
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/01/30 03:18:54
    • Location: 0
    • Status: offline
    Re: After interrupt event the project which will be loaded by bootloader hangs up on pic32 2019/01/31 23:56:25 (permalink)
    0
    Hello, thanks for your reply. 
     
    Why need to handle usb interrupt? I use timer interrupt only in app not in bootloader. I used hid bootloader without interrupt. There is no enabled interrupt in bootloader. Bootloader works perfectly. App loaded to pic by bootloader perfectly, but when app meet interrupt event app hangs up. I generated same project for pic32mx450f256l and worked perfectly. I don't understand why interrupt doesn't work for pic32mk0512gpd064 with bootloader project. 
    post edited by anna.virabyan - 2019/02/01 01:31:37
    #3
    anna.virabyan
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/01/30 03:18:54
    • Location: 0
    • Status: offline
    Re: After interrupt event the project which will be loaded by bootloader hangs up on pic32 2019/02/01 03:42:31 (permalink)
    0
    Does anybody have linker script for pic32mk0512? 
    #4
    anna.virabyan
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/01/30 03:18:54
    • Location: 0
    • Status: offline
    Re: After interrupt event the project which will be loaded by bootloader hangs up on pic32 2019/02/08 04:24:57 (permalink)
    0
    I found the solution in this link https://www.microchip.com/forums/m1036793.aspx.
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5