This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Generating a 1ms heartbeat timer on XMC4500.

Hi all. Just as the title says, I am trying to generate a 1ms heartbeat timer on my XMC4500 hexagon board, but I am running into an error which you can see here: http://imgur.com/o5TGwms .

You can see there at the bottom in Build Output that I am getting the L6200E Error. Now, the reason it says .\Flash\Blinky.axf in front of the error is because I simply opened up the example Blinky project and deleted the contents of Source Files folder and replaced it with the sysTick.c code.

Any help is much appreciated.

Parents
  • Hi Pier. I will try some of your suggestions, but just looking at the code do you think it will generate a systick 1ms timer?

    #include <stdio.h>
    #include <XMC4500.h>                    //SFR declarations of the selected device
    uint32_t msTicks = 0; /* Variable to store millisecond ticks */
    void SysTick_Handler(void) { /* SysTick interrupt Handler.
    msTicks++; See startup file startup_XMC4500.s for SysTick vector */
    }
    int main (void) {
    uint32_t returnCode;
    returnCode = SysTick_Config(SystemCoreClock / 1000); /* Configure SysTick to generate an interrupt every millisecond */
    if (returnCode != 0) { /* Check return code for errors */
    // Error Handling
    }
    while(1);
    }
    

Reply
  • Hi Pier. I will try some of your suggestions, but just looking at the code do you think it will generate a systick 1ms timer?

    #include <stdio.h>
    #include <XMC4500.h>                    //SFR declarations of the selected device
    uint32_t msTicks = 0; /* Variable to store millisecond ticks */
    void SysTick_Handler(void) { /* SysTick interrupt Handler.
    msTicks++; See startup file startup_XMC4500.s for SysTick vector */
    }
    int main (void) {
    uint32_t returnCode;
    returnCode = SysTick_Config(SystemCoreClock / 1000); /* Configure SysTick to generate an interrupt every millisecond */
    if (returnCode != 0) { /* Check return code for errors */
    // Error Handling
    }
    while(1);
    }
    

Children