About nrf52 timer capture and compare question

i want to consult a question:

for exzample:

1. i use timer[1] ,and start it.

2. set timer[1]->capture[1] = 1,the assumed value of cc[1] is 0x1000;

3.enable campare[1] int;

4.while timer count = 0x1000,will timer[1] generate a compare[1] int event? i haven't set cc[1],the only thing is i set timer[1]->capture[1] = 1;

how could i avoid this problem?By disable campare[1] int?

thanks.

Parents
  • Hi

    There will be no interrupt generated when you run a capture, even if you have set the INTENSET register for the CC register that you run a capture to. 

    In order for the interrupt to be generated the internal timer value has to reach the value stored in the CC register without doing a capture. 

    In other words you would have to wait for the timer to naturally run to the same value again (after a reset) in order for the interrupt to be generated. 

    Best regards
    Torbjørn

Reply
  • Hi

    There will be no interrupt generated when you run a capture, even if you have set the INTENSET register for the CC register that you run a capture to. 

    In order for the interrupt to be generated the internal timer value has to reach the value stored in the CC register without doing a capture. 

    In other words you would have to wait for the timer to naturally run to the same value again (after a reset) in order for the interrupt to be generated. 

    Best regards
    Torbjørn

Children
No Data
Related