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.
The formatting gets messed up when I copy my code into here from uVision as you can see:
#include "stdio.h" #include "XMC4500.h" //SFR declarations of the selected device #include "xmc_gpio.h" 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 */ if (msTicks & 1) // 2ms period, 500 Hz on scope PORT3->OMR = 0x00000080UL; // 7 & 1 is 1; 8 & 1 is 0 -- bitwise operation, so basically we are just looking at the least else // significant count to determine whether it's odd or even. If odd, signal to pin goes HIGH, PORT3->OMR = 0x00800000UL; // if even, signal to pin goes LOW. This completes our 2ms/500Hz cycle. } int main (void) { uint32_t returnCode; EnableGPIOPeripheralClock(1); PORT3->OMR = 0x00000080UL; 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); }
My only remaining error is .\Objects\sadsadsa.axf: Error: L6218E: Undefined symbol EnableGPIOPeripheralClock (referred from maaaaaain.o). .
I am still looking for a way to enable the gpio peripheral clock. I think this is much easier to follow: http://imgur.com/550uCUC .