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.

MSPM0L1228: SysTick Callback won't called

Part Number: MSPM0L1228
Other Parts Discussed in Thread: LP-MSPM0L2228, SYSCONFIG, MSPM0L2228, , SEGGER

Tool/software:

Hello,

I've got a problem with the SysTick timer on a MSPM0L1228S.
The timer is counting, but the callback will never be called.
I created a simple Test Program. Which I tested also on an LP-MSPM0L2228 and it works fine. The Technical Reference Manual is the same for both, so I assumed that they will behave the same.

Can you help me out, what is the difference between these devices? Or what did I wrong?

Config for the SysTick is completely in code. In Syscfg is no SysTick added. SDK version is 2.02.00.05.

#include "ti_msp_dl_config.h"
#include "stdio.h"

int main(void)
{
    SYSCFG_DL_init();

    /* Initialize the period to 1.00 ms */
    DL_SYSTICK_init(32000);
    DL_SYSTICK_enableInterrupt();
    DL_SYSTICK_enable();

    while (1) {
        delay_cycles(32000000);
        printf("systick: %d\n", DL_SYSTICK_getValue());
    }
}

/* SysTick_Handler();
 * interrupt handler for sysTick Timer.
 */
void SysTick_Handler(void)
{
    DL_GPIO_togglePins(GPIO_GRP_0_PORT, GPIO_GRP_0_PIN_A13_PIN);
}

Regards,
Timo

  • Hi Timo,
    The documentation for the MSPM0L1228 should apply to all its variations. I recommend running the systick_periodic_timer_LP_MSPM0L2228_nortos_ticlang example in our SDK to see if the same problem occurs on your MSPM0L1228S. If it doesn't happen, I recommend looking at the project's SYSCONFIG code (from ti_msp_dl_config.c) and use it to replace your current configuration.
    Best Regards,
    Diego Abad

  • Hello Diego,

    thanks for your Suggestion. I imported the systick_periodic_timer example and switched to L1228 as Device.
    But it gives me the same result. On the L1228 the callback won't call, and on the L2228 it runs as expected.

    Any other ideas to fix the problem?

    Is it possible for you to check the systick_periodic_timer example on a L1228?

    Regards,
    Timo

  • Hi Timo,
    Before doing that, could you confirm you're using the right SYSCONFIG file for your project? When you import a project, it's important to check if you're importing it for the desired target (like the picture below.) 
    Best Regards,
    Diego Abad

  • Hello Diego,

    Yes, I have selected the MSPM0L1228 while importing the project.

    Regards,
    Timo

  • Hi Timo,
    Thanks for letting me know. We currently don't have a 1228 in our office, so I'll have to order some and see if I can replicate the error. This process will probably take a week or two to complete.
    Best Regards,
    Diego Abad

  • Hi Diego,

    Thanks for ordering. I'm curious to see if it works on your side.

    In the meantime, I tried out another timer example, and it carries out that there the interrupt also isn't working.
    I have read out the timer registers and the flags are looking good. But no interrupt occurs.
    Is there a possibility to disable all interrupts? Something like a global interrupt enable flag? I didn't find something in the TRM.

    Best Regards,
    Timo

  • Hi Timo,
    The regular way to disable all interrupts will be to disable its IRQ for the module you want to disable using NVIC_DisableIRQ. However, for SYSTICK, the way to do it will be through the DL_SYSTICK_disableInterrupt function. For a more "global" approach, you can set the BIT0 of PRIMASK to 1 as mentioned in the device's TRM using register manipulation or the __set_PRIMASK function. Can you share the projects you are using on your MSPM0L1228? I want to double-check them and see if I can find any bugs on my end. Also, how are you programming your MSPM0L1228?

    Best Regards,

    Diego Abad

    PD1: TRM Section on PRIMASK

  • Hi Diego,

    I deliberately did not disable any interrupts. And the code examples are very small.
    The regular way would affect the mask flags, I think. Which is ok in the debugger. PRIMASK I have also checked, and it is not set. But thanks for that hint.

    I added the test projects for you.
    MSPM0L1228_Projects.zip

    For programming, I'm using a Segger J-Link. Maybe this is where the problems begin.

    Thanks for your support.
    Regards,
    Timo

  • Hi Timo,
    I reviewed the project you sent and can't see anything wrong with it (besides the J-LinkARM configurations). My recommendation will be for you to try to debug your Seger J-Link. For that, try other SDK examples and see if the no-interrupt error occurs as well.
    Best Regards,
    Diego Abad

  • Hi Diego,

    I assumed in the projects is all right. Still, thanks for looking.

    What do you mean with "besides the J-LinkARM configurations"? Did you see something wrong in there?

    Regards,
    Timo

  • Hi Timo,
    What I mean by that is that when I try to run your projects, I encounter a J-Link error. That is most likely due to the fact that I'm running the projects you sent (configured for J-Link) with my XDS110 EVM. The original examples from our SDK do not show this error. Can I assume you modified your project to use J-Link? 
    Best Regards,
    Diego Abad

  • Hi Diego,

    yes, I have chosen J-Link for connection in the Project Properties.

    Do you think this could cause the problem?

    Regards,
    Timo

  • Hi Timo,
    Let me talk with the software team, and I'll get you back on Monday about it.

    Best Regards,

    Diego Abad

  • Hi Timo,
    I was able to replicate the error you're seeing. It happens only when I use the J-Link to program the MCU. We will work in the next release to fix this problem. 
    Best Regards,
    Diego Abad 

  • Hi Diego,

    thanks for investigation. This sounds very interesting.
    Which device did you use? A MSPM0L1228S 32Pin like me, or another?
    Did you get an Error message while flashing with the J-Link?

    Best Regards,
    Timo

  • Hi Timo,
    I use both the 1228s and the 2228. Both seem to have similar issues when it comes to interrupt flags not being activated. No "error" messages I notice on my side.

    Best Regards,

    Diego Abad

  • Hi Diego,

    Thanks, this information was useful. I tested it also with the LP-2228 and it shows the same malfunction.
    I think you are right, my problem was a weak flashing process. Caused by the J-Link. I ordered a TI XDS-110 to check if the problem is solved on my hardware. I will update to you.

    You said you will work in the next release to fix the J-Link problem. For which release do I have to wait for? CCS?

    Best Regards,
    Timo

  • Hi Timo,
    The software team will review this in the JIRA ticket I sent, and they'll work on it to find and fix the issue. However, there is yet to be an estimate of when this will be. I recommend using the TI XDS-110 since that connection option allowed me to run both projects with the interrupts working. Moreover, I recommend updating CCS, the SDK, and SYSCONFIG to the latest version. 
    Best Regards,
    Diego Abad