Juan Duran wrote 11 lines
Hi all,
I haven't been able to find a clear example on how to program on ARM with
interrupts. Can somebody post an example? I am specially interested in Systick
interrupts on LPC1768.
Thanks in advance
_______________________________________________
fpc-pascal maillist -
http://lists.freepascal.org/mailman/listinfo/fpc-pascalFor peripheral interrupts you'll need to set up the NVIC, but for systick(which is a common cortex-m3 core interrupt) something like this should work(I am not sure the systick initialization is perfect):
program test;
uses cortexm3;
procedure systick; public name 'SysTick_interrupt';
begin
// code here
end;
begin
SysTick.LOAD := 1000;
SysTick.CTRL := 7; // Enable, Int enable, and source = HCLK
asm
cpsie if // enable faults and interrupts
end;
while true do;
end.