[NSWI004] Timer enabling

Vojtech Horky horky at d3s.mff.cuni.cz
Mon Dec 2 22:44:38 CET 2019


Hello.

Dne 02. 12. 19 v 22:38 Josef Starychfojtu napsal(a):
> Hi,
> 
> I am trying to make the interruption just work (jump to handle exception 
> code after some cycles). According to documentation, when Compare 
> register and Count register equal, it causes interrupt. I used the 
> time_interrupt_after function to set Compare = Count + X and then 
> watched their values in while loop, but nothing happens, even tho Count 
> was greater than Compare after a while. I have just a simple debug print 
> in handle_exception_general function and it is not triggered. I 
> call time_interrupt_after and interrupts_restore(true) (tried even 
> without it) in main function of a thread. Any suggestions on what am I 
> doing wrong?

Your explanation is correct, it only misses one extra point. Timer 
interrupt is not triggered when interrupts are disabled. I would thus 
suggest checking that.

- VH

> 
> Thanks !
> 
> Josef Starychfojtu
> 
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
> 


More information about the NSWI004 mailing list