hi guys writing a simple program to blink a led for every 500ms using a systic timer i have observed the interrupt never occurs led stays on forever not only this but i have used many working sample programs involving interrupts but it doesnt work . Im using lpc1768(100mhz) with bootloader(factory installed) residing at 0x00000000 to 0x00002000 like is there a need to offset the vector table manually or the booloader does that by itself my application starts at 0x00002000 i have done that accordingly in keil heres the code for the systic timer
#include "LPC17xx.h"
volatile uint32_t msTicks = 0;
void SysTick_Handler(void)
{
msTicks++;//count no of ms
}
void Delay (uint32_t dlyTicks)
{ volatile uint32_t curTicks; curTicks = msTicks;
while ((msTicks - curTicks) < dlyTicks);//stay here until delay is acheived
int main (void) { SystemInit();//core speed 100mhz
SysTick_Config(SystemCoreClock/1000);//configuring systic timer to interrupt every 1ms
LPC_SC->PCONP |= ( 1 << 15 ); // power up GPIO LPC_GPIO1->FIODIR |= 1 << 29; // puts P1.29 into output mode. while(1) {
LPC_GPIO1->FIOPIN |= 1 << 29; // make P1.29 high Delay(500); LPC_GPIO1->FIOPIN &= ~( 1 << 29 ); // make P1.29 low Delay(500); }}
In the debugger, can you see the processor running any of your code?
Is SCB->VTOR set to the address of your vector table?
right now i dont have a debugger(i plan to buy j-link) how do i check whether SCB->VTOR is set to the address of the vector table sorry if the question is annoying im a beginner trying to learn from sample code