Allow calls to timer functions within ISR#11629
Conversation
👋 Hello angelnu, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 13m 11s ⏱️ Results for commit e3a0a3a. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
All GP_TIMER functions are not by default it IRAM. They are put in IRAM only when #if CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM
#define TIMER_IRAM IRAM_ATTR
#else
#define TIMER_IRAM
#endif
inline TIMER_IRAM uint64_t timerRead(hw_timer_t *timer) {
//......Also do not remove error logs. They can be disabled if IRAM is in use (or make them conditional like above) #ifndef CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM
log_e("Timer handle is NULL");
#endif |
Description of Change
This PR allows to call some of the timer functions within interrupt context. TSee https://github.com/espressif/esp-idf/blob/master/components/esp_driver_gptimer/linker.lf for what functions are running in RAM.
I had to remove the logs of the functions. The alternative would be creating _isr alternative functions.
Tests scenarios
I have tested my Pull Request on Arduino-esp32 core v3.1.13 with ESP32 and ESP32-WROM Board with this scenario
Related links
NA