Custom RT1176 Bringup - Blinky SysTick_Handler not firing

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom RT1176 Bringup - Blinky SysTick_Handler not firing

195 Views
anbn
Contributor I

I'm bringing up a custom RT1176 board using a PMIC. 

I have SKIP_POWER_ADJUSTMENT and SKIP_DCDC_CONFIGURATION set.

I've changed the pinmux to use our LED on pin G17 and changed the user led defines. 

The LED blinks if I change use a NOP loop instead of the SysTick_handler. 

void SysTick_Handler(void)
{
    if (g_systickCounter != 0U)
    {
 //Breakpoint here is never reached
       g_systickCounter--;
    }
}

void SysTick_DelayTicks(uint32_t n)
{
    g_systickCounter = n;
    while (g_systickCounter != 0U)
    {
    	g_systickCounter--; //My edit to get it working
    }
}

 

I've changed also changed the code to use BOARD_BootClockRUN_800M();  and removed the FLash from the memory options. 

What makes it tick and why isn't it?

0 Kudos
Reply
1 Reply

146 Views
anbn
Contributor I

This has been solved. It was most likely a reset issue - it was very consistent across power up/downs via power supply but after completely disconnecting MCUlink and power supply, the issue vanished. 
So seemingly, some register was kept across resets preventing the systick handler from being triggered. 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2181812%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ECustom%20RT1176%20Bringup%20-%20Blinky%20SysTick_Handler%20not%20firing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2181812%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20bringing%20up%20a%20custom%20RT1176%20board%20using%20a%20PMIC.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20SKIP_POWER_ADJUSTMENT%20and%20SKIP_DCDC_CONFIGURATION%20set.%3C%2FP%3E%3CP%3EI've%20changed%20the%20pinmux%20to%20use%20our%20LED%20on%20pin%20G17%20and%20changed%20the%20user%20led%20defines.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20LED%20blinks%20if%20I%20change%20use%20a%20NOP%20loop%20instead%20of%20the%20SysTick_handler.%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20SysTick_Handler(void)%0A%7B%0A%20%20%20%20if%20(g_systickCounter%20!%3D%200U)%0A%20%20%20%20%7B%0A%20%2F%2FBreakpoint%20here%20is%20never%20reached%0A%20%20%20%20%20%20%20g_systickCounter--%3B%0A%20%20%20%20%7D%0A%7D%0A%0Avoid%20SysTick_DelayTicks(uint32_t%20n)%0A%7B%0A%20%20%20%20g_systickCounter%20%3D%20n%3B%0A%20%20%20%20while%20(g_systickCounter%20!%3D%200U)%0A%20%20%20%20%7B%0A%20%20%20%20%09g_systickCounter--%3B%20%2F%2FMy%20edit%20to%20get%20it%20working%0A%20%20%20%20%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EI've%20changed%20also%20changed%20the%20code%20to%20use%20%3CSPAN%3EBOARD_BootClockRUN_800M()%3B%26nbsp%3B%20and%20removed%20the%20FLash%20from%20the%20memory%20options.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWhat%20makes%20it%20tick%20and%20why%20isn't%20it%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2183543%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Custom%20RT1176%20Bringup%20-%20Blinky%20SysTick_Handler%20not%20firing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2183543%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThis%20has%20been%20solved.%20It%20was%20most%20likely%20a%20reset%20issue%20-%20it%20was%20very%20consistent%20across%20power%20up%2Fdowns%20via%20power%20supply%20but%20after%20completely%20disconnecting%20MCUlink%20and%20power%20supply%2C%20the%20issue%20vanished.%26nbsp%3B%3CBR%20%2F%3ESo%20seemingly%2C%20some%20register%20was%20kept%20across%20resets%20preventing%20the%20systick%20handler%20from%20being%20triggered.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E