You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/03/02 21:10:30 UTC
[GitHub] [incubator-nuttx] gustavonihei opened a new pull request #5671: xtensa/esp32s3: Add support for Free-running Timer wrapper
gustavonihei opened a new pull request #5671:
URL: https://github.com/apache/incubator-nuttx/pull/5671
## Summary
This PR intends to add support for the Free-running Timer wrapper component.
## Impact
Extended OS support for `esp32s3-devkit` platform.
## Testing
Tested using `esp32s3-devkit:timer` as a baseline configuration and creating a simple test application:
```c
int main(int argc, FAR char *argv[]) {
struct esp32s3_freerun_s freerun;
struct timespec ts = { 0 };
struct timespec sleep_time = { .tv_sec = 0, .tv_nsec = 300 * NSEC_PER_MSEC };
int i = 0;
esp32s3_freerun_initialize(&freerun, 1, 1);
while (i++ < 10) {
esp32s3_freerun_counter(&freerun, &ts);
nanosleep(&sleep_time, NULL);
}
esp32s3_freerun_uninitialize(&freerun);
return 0;
}
```
Output:
```
esp32s3_freerun_initialize: chan=1 resolution=1 usecs
esp32s3_freerun_initialize: pre=80 clk=80000000
esp32s3_freerun_counter: counter=20 (32) overflow=0, pending=0
esp32s3_freerun_counter: usec=20 ts=(0, 20000)
esp32s3_freerun_counter: counter=315656 (315656) overflow=0, pending=0
esp32s3_freerun_counter: usec=315656 ts=(0, 315656000)
esp32s3_freerun_counter: counter=625607 (625607) overflow=0, pending=0
esp32s3_freerun_counter: usec=625607 ts=(0, 625607000)
esp32s3_freerun_counter: counter=935607 (935607) overflow=0, pending=0
esp32s3_freerun_counter: usec=935607 ts=(0, 935607000)
esp32s3_freerun_counter: counter=1245607 (1245607) overflow=0, pending=0
esp32s3_freerun_counter: usec=1245607 ts=(1, 245607000)
esp32s3_freerun_counter: counter=1555607 (1555607) overflow=0, pending=0
esp32s3_freerun_counter: usec=1555607 ts=(1, 555607000)
esp32s3_freerun_counter: counter=1865607 (1865607) overflow=0, pending=0
esp32s3_freerun_counter: usec=1865607 ts=(1, 865607000)
esp32s3_freerun_counter: counter=2175607 (2175607) overflow=0, pending=0
esp32s3_freerun_counter: usec=2175607 ts=(2, 175607000)
esp32s3_freerun_counter: counter=2485607 (2485607) overflow=0, pending=0
esp32s3_freerun_counter: usec=2485607 ts=(2, 485607000)
esp32s3_freerun_counter: counter=2795607 (2795607) overflow=0, pending=0
esp32s3_freerun_counter: usec=2795607 ts=(2, 795607000)
esp32s3_freerun_uninitialize: chan=1
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #5671: xtensa/esp32s3: Add support for Free-running Timer wrapper
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #5671:
URL: https://github.com/apache/incubator-nuttx/pull/5671
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org