Dec 12, 2022
08:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 12, 2022
08:35 PM
Hi,
I am trying to make, For a long&short press button project using tact switch in the cyw920706 EVK.
I need to know the elapsed time like millies() function from Arduino.
In the Modustoolbox, I wonder if there is a easier way to do this.
thanks for replying
Solved! Go to Solution.
1 Solution
Dec 12, 2022
10:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 12, 2022
10:57 PM
Hi @DevRyan :
According to the API description of millies(), it is generated by timer.
Reconfiguration of the microcontroller’s timers may result in inaccuratemillis()
readings. The "Arduino AVR Boards" and "Arduino megaAVR Boards" cores use Timer0 to generatemillis()
. The "Arduino ARM (32-bits) Boards" and "Arduino SAMD (32-bits ARM Cortex-M0+) Boards" cores use the SysTick timer.
Therefore, I suggest you use timer API to achieve this function.
Best Regards,
Colin
1 Reply
Dec 12, 2022
10:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 12, 2022
10:57 PM
Hi @DevRyan :
According to the API description of millies(), it is generated by timer.
Reconfiguration of the microcontroller’s timers may result in inaccuratemillis()
readings. The "Arduino AVR Boards" and "Arduino megaAVR Boards" cores use Timer0 to generatemillis()
. The "Arduino ARM (32-bits) Boards" and "Arduino SAMD (32-bits ARM Cortex-M0+) Boards" cores use the SysTick timer.
Therefore, I suggest you use timer API to achieve this function.
Best Regards,
Colin