Hi,
I am using iMXRT1170 EVK board and tried executing the QTimer in interrupt mode for every 1msec.
When I checked the output on DSO by configuring the GPIO output in the interrupt handler function. I got the output as attached here.
I am not able to go below 8.35msec for,
QTMR_SetTimerPeriod(BOARD_QTMR_BASEADDR, BOARD_SECOND_QTMR_CHANNEL,MSEC_TO_COUNT(1U, QTMR_SOURCE_CLOCK) );
and maximum I got 70msec for,
QTMR_SetTimerPeriod(BOARD_QTMR_BASEADDR, BOARD_SECOND_QTMR_CHANNEL,65000 );
Can you let me know why it is showing like this? In example code it says we can configure it for 1msec but I am not getting it.
Please let me know, did I missed any configuration here? How to resolve this for interrupt for every 1msec.
Code and DSO output is attached.
Thanks in advance.
Hi Pavel,
I want to configure the QTimer for 1ms interrupt. and I am using the example code of qtimer for imxRT1170 EVK board: SDK_2_12_1_MIMXRT1170\boards\evkmimxrt1170\driver_examples\qtmr\timer\cm7.
I have attached the same code before with the DSO image.
I have measured the time by toggling the GPIO in interrupt handler, It is not able go below 8.35msec but I have configure it for 1msec which I am not getting. Let me know how to get it for 1msec interrupt in qtimer.
Thanks in advance.
Hello,
I made some tests and have some issues, so I review the code and I find this macro [ USEC_TO_COUNT] could you make a test with that? I will make the test too, and share my result, I get 4ms in the last test.
QTMR_SetTimerPeriod(BOARD_QTMR_BASEADDR, BOARD_SECOND_QTMR_CHANNEL, USEC_TO_COUNT(1000U, QTMR_SOURCE_CLOCK));
Best regards,
Pavel
Hi Pavel,
I have tried with this at my end,
QTMR_SetTimerPeriod(BOARD_QTMR_BASEADDR, BOARD_SECOND_QTMR_CHANNEL, USEC_TO_COUNT(1000U, QTMR_SOURCE_CLOCK));
I am still getting complete cycle as Ttotal=8.4msec Ton=4.2msec and Toff= 4.2msec. I have attached the image for your reference.
Let me know did you get the same, how to resolve this?
Thanks in advance.