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.

Starterware/MSP432P401R: Using Systick as a Timer

Part Number: MSP432P401R

Tool/software: Starterware

The driverlib starter code for the Systick module uses Interrupts.  Is there example code that uses Systick as a simple timer without Interrupts e.g. grabbing the current value for the timer?  I thought I could make a simple change to the Systick interrupt example code but I keep getting the following error: 

Description Resource Path Location Type
unresolved symbol SysTick_Handler, first referenced in ./startup_msp432p401r_ccs.obj Lab4 C/C++ Problem

  • Moving this thread to the MSP430 forum. Thanks for your patience.
  • Duane Shelton said:
    unresolved symbol SysTick_Handler, first referenced in ./startup_msp432p401r_ccs.obj Lab4 C/C++ Problem

    IMHO this means that the name of your Systick handler routine does not match that one given/expected in the startup code. I don't have the Starterware (because I don't have a MSP432 board) but usually it is an assembler file named "startup_xxx.s" - with "xxx" as placeholder for a MCU-specific string.

    BTW, the SysTick peripheral is common to all Cortex M3/M4 implementations, so you can use any example code you find - not just TI-specific. However, the SysTick timer is kept rather simple, it is designed for the very purpose of being a system tick timer.

  • Hi Duane,

     This is the example code that you are using - systick_interrupt_gpio_blink, am I correct??

    My guess is that you removed the  "SysTick_Handler" in main.c

    void SysTick_Handler(void)
    {
        MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);
    }

    So you will also need to remove it in your startup_msp432p401r_ccs.c, for example:

    From:

    #pragma RETAIN(interruptVectors)
    #pragma DATA_SECTION(interruptVectors, ".intvecs")
    void (* const interruptVectors[])(void) =
    {
        (void (*)(void))((uint32_t)&__STACK_END),
                                                /* The initial stack pointer */
        resetISR,                               /* The reset handler         */
        nmiISR,                                 /* The NMI handler           */
        faultISR,                               /* The hard fault handler    */
        defaultISR,                             /* The MPU fault handler     */
        defaultISR,                             /* The bus fault handler     */
        defaultISR,                             /* The usage fault handler   */
        0,                                      /* Reserved                  */
        0,                                      /* Reserved                  */
        0,                                      /* Reserved                  */
        0,                                      /* Reserved                  */
        defaultISR,                             /* SVCall handler            */
        defaultISR,                             /* Debug monitor handler     */
        0,                                      /* Reserved                  */
        defaultISR,                             /* The PendSV handler        */
        SysTick_Handler,                             /* The SysTick handler       */

    To:

    #pragma RETAIN(interruptVectors)
    #pragma DATA_SECTION(interruptVectors, ".intvecs")
    void (* const interruptVectors[])(void) =
    {
        (void (*)(void))((uint32_t)&__STACK_END),
                                                /* The initial stack pointer */
        resetISR,                               /* The reset handler         */
        nmiISR,                                 /* The NMI handler           */
        faultISR,                               /* The hard fault handler    */
        defaultISR,                             /* The MPU fault handler     */
        defaultISR,                             /* The bus fault handler     */
        defaultISR,                             /* The usage fault handler   */
        0,                                      /* Reserved                  */
        0,                                      /* Reserved                  */
        0,                                      /* Reserved                  */
        0,                                      /* Reserved                  */
        defaultISR,                             /* SVCall handler            */
        defaultISR,                             /* Debug monitor handler     */
        0,                                      /* Reserved                  */
        defaultISR,                             /* The PendSV handler        */
        defaultISR,                             /* The SysTick handler       */

    Hopefully this helps.

      David

  • That's what I was doing.  I changed the startup file as you suggested and it's working now.

    Thanks for your help!

    Duane

  • Thanks for your reply. I've used SYSTICK before with success but I was trying to implement a timer using the TI driverlib module. The suggestion below worked.

**Attention** This is a public forum