Now I am trying to use the timer component in MQX4.0.1.
Is it possible to make the timer timeout in us? Or what's the resolution for the timer component?\
I have not used hwtimer but if you can reach the period you need for your interrupt there is no porblem.
In case you cannot reach the desired period with hwtimer you may try with the PIT. The difference is that hwtimer is an MQX driver and the interrupts is handled by the RTOS while the example I provided can bypass MQX, the interrupts are handled directly by the core andd you can get a smaller period.
Please take a look to the thread below, here I configured PIT and reached 1uS interrupt. Please note that you can let MQX handle the interrupts or bypass MQX, to reach 1uS I had to bypass MQX. In the project there is a macro to set if you want MQX to handle interrupts or bypass MQX.
Hope this helps.
Now I am using the hwtimer in MQX to generate the interrupt in micro-second and it seems working.
Is there any disadvantage of using hwtimer?
Thank you. For the hwtimer, I can get a 3us accurate period, and it works for me.
Would you please give me more details on how you got us resolution in hwtimer? The smallest resolution I could get is 1ms by using hwtimer_set_period().
I could use PIT approach as Carlos mentioned in the last post but I would prefer to stick with MQX handler.
Retrieving data ...