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.

Timer64 questions

I have 2 questions.

1. I used Timer 14 in unchained mode where the lower was used as a free-running counter (set the period to FFFFFFFF). The other timer was used to create an interrupt. Since the next time to interrupt was based on a set of decisions, I stopped the timer, computed the new count, populated the period and started it again (all using XDC APIs, not primitively using the memory mapped registers). When I did this, it appeared that the free-running timer stopped as well. This was because as soon as I moved the free-running timestamp to timer 15, it worked without issues. I determined this by checking the TSCL against where I expected the free-running timestamp to be (since the relationship is deterministic at 1/6 of CPU clock). I wonder if there is a bug with the XDC layer. Also, the timer literally took 1.5us before it was received in the HWI. Not sure why (I am planning to benchmark this by primitively running the timer for multiple reasons and will post the results).

2. What is the purpose of RELHI and RELLO? I went and checked a previous version of the document prior to the introduction of TimerPlus mode and it shows that once the period is set and the timer is in continuous mode, it keeps the period and causes an interrupt (as one usecase) every X timercounts. What does the reload register provide in addition? An example would help. I checked the document and did not find any.

 

  • Hi Harish,

    We are working on this. The feedback from the team will be posted directly here.

    Best Regards,
    Yordan
  •  

    2. What is the purpose of RELHI and RELLO? I went and checked a previous version of the document prior to the introduction of TimerPlus mode and it shows that once the period is set and the timer is in continuous mode, it keeps the period and causes an interrupt (as one usecase) every X timercounts. What does the reload register provide in addition? An example would help. I checked the document and did not find any.

    Please refer "Continuous mode with reload (ENAMODE bits = 11b "

    Thank you.

     

  • Hi Raja,

     I read that from the document. It just does not explain how ENAMODE=10 and 11 are different. I have to assume in ENAMODE-10, the timer count resets to 0 when the period count is reached and then counts up again to the period counter and this process repeats. If it did not, then there is no point to call it continuous and periodic. So, the only usecase I can see for RELLO is if I want to toggle between two different timers for some reason. I am trying to understand that this is how the timer works. So if you see the figure in section 2.2.2.1, it simply states that the counter resets to 0, the period counter is still in place and it has to trigger an HWI when the counter reaches the period counter repeatedly. That is specifically the clarification I am looking for. Unfortunately, XDC hides a lot of these details and given I have an issue with using XDC, I required this clarification.

    Thanks

    Harish