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.

TMS320F28069: TMS320F28069 HRCAP accuracy

Part Number: TMS320F28069


Hello,

I was hoping the linked thread could be answered.

Thanks,
John W.

  • 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,

    No - my config isn't the same - but I did want to know the correct way to read HCCOUNTER - and since that was something I was curious about some time ago; and I noticed it wasn't answered, I was wondering.

    I'm using all 4 HRCAP channels on the TMS320F28069 and it is working out pretty well; and I'm using all 4 IRQ's. I have found out how easy it is to become IRQ bound when doing that; so of course I've got that under control now.

    But, thanks - that was helpful.

    Is HCCOUNTER the same across all 4 HRCAP register sets - I assume it is - I will know for sure shortly; but was wondering about that.

    Thanks Again,
    John
  • Hi John,

    Sorry for the delay. I believe you have already figured this out by now, but for what it's worth, each HRCAP instance has its own HCCOUNTER.

    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