I have a problem with my HPET driver and specifically when I set the timer to operate in “64-bit periodic mode”. In this case, I am not getting any interrupts and that’s because the high nibble of the T0 Comparator value register (which should be 0 according to the value I am writing) gets set to 0xFFFFFFFF. All the other registers (low nibble of T0 Comparator and low and high nibble of T0 main counter) have the expected values.
This problem doesn’t appear when I setup the timer to “64-bit one-shot mode”. Also, when I configure the timer for “32-bit mode” operation, the above problem doesn’t appear neither on “periodic” or “one-shot” modes.
I do 32-bit operations (reads/writes) in the driver and something weird I noticed is the following: If (for setting 64-bit periodic mode) I firstly write the high nibble of the comparator register and then the low nibble, I get 0 in the high-nibble and 0xFFFFFFFF in the low-nibble. If I do the writes the other way around (low nibble first and then high nibble), I get my “counter” value in the low-nibble and 0xFFFFFFFF in the high-nibble of the comparator.
Code: Select all
| high-nibble | low-nibble |
----------------------------------------------------------
High nibble write first | 0 | 0xFFFFFFFF |
----------------------------------------------------------
Low nibble write first | 0xFFFFFFFF | Count value |
----------------------------------------------------------
Thanks in advance.