Hello,
I was hoping the linked thread could be answered.
Thanks,
John W.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi John,
Is your HRCAP configuration similar to one in Andy's original post? It looks like he was not really using the hi-res part of the HRCAP and was just trying to get the regular capture working (but with the HRCAP peripheral - which is a valid use-case).
A couple of things that I noticed in the original post: he had both rising and falling edge interrupts enabled. I would instead use just one of the two, unless there was some other reason for this.
Secondly, I would want to make sure that the user defined variables 'carry' and UINT_MAX are being correctly used in the code and are not the cause for this error.
Lastly, CPU reads of HCCOUNTER are not reliable unless HRCAPxENCLK is disabled.
BTW there is some miscalculation in Andy's post. The actual error should be 4050 cycles at 90 MHz and not 450 cycles.
I hope this helps.
Hrishi
Hello Hrishi,
Yes - I thought since the names weren't unique maybe it was a shared resource; but you're right as I've seen that by now as far as HCCOUNTER being unique for each HRCAP channel which of course is good; unless you were thinking about using that for synchronization issues.
Thanks,
John