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.

LP-MSPM0G3519: Program hangs at the __NVIC_EnableIRQ() function

Part Number: LP-MSPM0G3519
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I'm prototyping on the lp-mspm0g3519 board and ran into this perplexing problem where the program gets hung up on the __COMPILER_BARRIER() step in the __NVIC_EnableIRQ() function.  In the snippet below, I hang at the __COMPILER_BARRIER() step if I uncomment the UART5 enable line.  I see the hanging step when I pause the debugger.  My UART5 is configured identically to UART0 in sysconfig and UART0 works just fine.  Please help, I am stuck!  Does this mean I need to disable cache? 

...   
    NVIC_EnableIRQ(UART0_INT_IRQn);
    //NVIC_EnableIRQ(UART5_INT_IRQn);  // can't enable this line
    NVIC_EnableIRQ(GPIOB_INT_IRQn);
    NVIC_EnableIRQ(TIMG12_INT_IRQn);
...
/**
  \brief   Enable Interrupt
  \details Enables a device specific interrupt in the NVIC interrupt controller.
  \param [in]      IRQn  Device specific interrupt number.
  \note    IRQn must not be negative.
 */
__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
{
  if ((int32_t)(IRQn) >= 0)
  {
    __COMPILER_BARRIER();  // this is where my program gets stuck
    NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
    __COMPILER_BARRIER();
  }
}
  • So it appears to be user error.  I mixed up DMA channels with the other UART, sending my app into the shadow realm.  Fixing this error also fixed the app hanging on the __COMPILER_BARRIER() step.  I would still like to know how code gets hung up here but my problem is resolved.