saramonteiro opened a new pull request #3656:
URL: https://github.com/apache/incubator-nuttx/pull/3656


   ## Summary
   
   This PR creates a freerun wrapper for ESP32-C3.
   
   ## Impact
   
   N/A
   
   ## Testing
   
   Tests results: To perform a test por the freerun wrapper was a little bit 
tricky, since it is not exposed as a character driver like oneshot is. So, I 
had to "violate" and call it from the user space:
   
   
![image](https://user-images.githubusercontent.com/33546913/117021932-2e99bd80-acce-11eb-95b9-bc39d029cc22.png)
   
   To make sure the the timer was properly configured and ensure its accuracy I 
tested the get counter function from the signal handler of the timer example 
because `usleep` and similar functions don't garante accuracy. Besides that, 
since the freerun standard timeout period is too long (the maximum the timer 
can count), I used other short period only to test the interrupt.
   
   Dependencies: Any timer instance that will be used by the freerun and 
CONFIG_ESP32_FREERUN.
   
   NOTE for future users: If someone wishes to develop some driver upon the 
freerun wrapper, have to keep in mind that the timer logic on bringup must be 
adjusted to prevent the timer used by the freerun wrapper to be initialized as 
a character driver. Just like it was done for the oneshot. For now, since 
nothing is currently using freerun, there was anything to do on bringup.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to