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.

MSPM0G3519: Custom boot Jumping issue

Part Number: MSPM0G3519

Hi,

My code is getting stuck in hardware in default handler function after jump to the application. I am not able to run the application alone in debug mode also. it always stuck in default handler with Ipsr =3 menas HardFault . Please help to resolve the issue 

//My jump function code

 typedef void (*AppFunc)(void);


#define APP_START_ADDR    (0x00008000U)


void jumptoflash(void)
{
    uint32_t appStack;
    uint32_t appResetHandler;


    AppFunc appEntry;


    /* Disable global interrupts */
    __disable_irq();


    // /* Disable SysTick */
     SysTick->CTRL = 0;
     SysTick->LOAD = 0;
     SysTick->VAL  = 0;


    /* Disable NVIC interrupts */
    NVIC->ICER[0] = 0xFFFFFFFF;
    NVIC->ICPR[0] = 0xFFFFFFFF;


    /* Read application vector table */
    appStack        = *(volatile uint32_t *)APP_START_ADDR;
    appResetHandler = *(volatile uint32_t *)(APP_START_ADDR + 4U);


    /* Validate reset handler */
    if(appResetHandler == 0xFFFFFFFFU)
    {
        return;
    }

Also Find my Memory Map 

 


 /* Set vector table */
    SCB->VTOR = APP_START_ADDR;
    /* Set MSP from app vector table */
    __set_MSP(appStack);
      /* Jump to application reset handler */
    appEntry = (AppFunc)appResetHandler;
    appEntry();


    while(1);

}

 

 Find my Memory Map  Bootloder 

MEMORY
{
    FLASH           (RX)  : origin = 0x00000000, length = 0x00008000
    FLASH_APP       (RX)  : origin = 0x00008000, length = 0x00078000
    SRAM_BANK0      (RWX) : origin = 0x20200000, length = 0x00010000
    SRAM_BANK1      (RWX) : origin = 0x20210000, length = 0x00010000
    BCR_CONFIG      (R)   : origin = 0x41C00000, length = 0x000000FF
    BSL_CONFIG      (R)   : origin = 0x41C00100, length = 0x00000080
    DATA            (R)   : origin = 0x41D00000, length = 0x00004000
}

SECTIONS
{
    .intvecs:   > 0x00000000
    .text   : palign(8) {} > FLASH
    .const  : palign(8) {} > FLASH
    .cinit  : palign(8) {} > FLASH
    .pinit  : palign(8) {} > FLASH
    .rodata : palign(8) {} > FLASH
    .ARM.exidx    : palign(8) {} > FLASH
    .init_array   : palign(8) {} > FLASH
    .binit        : palign(8) {} > FLASH
    .TI.ramfunc   : load = FLASH, palign(8), run=SRAM_BANK0, table(BINIT)

    .vtable :   > SRAM_BANK0
    .args   :   > SRAM_BANK0
    .data   :   > SRAM_BANK0
    .bss    :   > SRAM_BANK0
    .sysmem :   > SRAM_BANK0
    .TrimTable :  > SRAM_BANK0
    .stack  :   > SRAM_BANK0 (HIGH)

    .BCRConfig  : {} > BCR_CONFIG
    .BSLConfig  : {} > BSL_CONFIG
    .DataBank   : {} > DATA
}

 Find my Memory Map  App code 

MEMORY
{
    FLASH_BOOT      (RX)  : origin = 0x00000000, length = 0x00008000
    FLASH           (RX)  : origin = 0x00008000, length = 0x00078000
    SRAM_BANK0      (RWX) : origin = 0x20200000, length = 0x00010000
    SRAM_BANK1      (RWX) : origin = 0x20210000, length = 0x00010000
    BCR_CONFIG      (R)   : origin = 0x41C00000, length = 0x000000FF
    BSL_CONFIG      (R)   : origin = 0x41C00100, length = 0x00000080
    DATA            (R)   : origin = 0x41D00000, length = 0x00004000
}

SECTIONS
{
    .intvecs:   > 0x00008000
    .text   : palign(8) {} > FLASH
    .const  : palign(8) {} > FLASH
    .cinit  : palign(8) {} > FLASH
    .pinit  : palign(8) {} > FLASH
    .rodata : palign(8) {} > FLASH
    .ARM.exidx    : palign(8) {} > FLASH
    .init_array   : palign(8) {} > FLASH
    .binit        : palign(8) {} > FLASH
    .TI.ramfunc   : load = FLASH, palign(8), run=SRAM_BANK0, table(BINIT)

    .vtable :   > SRAM_BANK0
    .args   :   > SRAM_BANK0
    .data   :   > SRAM_BANK0
    .bss    :   > SRAM_BANK0
    .sysmem :   > SRAM_BANK0
    .TrimTable :  > SRAM_BANK0
    .stack  :   > SRAM_BANK0 (HIGH)

    .BCRConfig  : {} > BCR_CONFIG
    .BSLConfig  : {} > BSL_CONFIG
    .DataBank   : {} > DATA
}

**Attention** This is a public forum