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 2020/12/10 16:56:29 UTC

[GitHub] [incubator-nuttx] saramonteiro opened a new pull request #2514: xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later

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


   ## Summary
   
   This PR is intended to remove an unnecessary initial configuration that was preventing the rtc wdt to be configured in the bootloader. 
   
   ## Impact
   
   Now, it will be possible to configure the RTC in the bootloader as well as use it as a character driver after.
   Important: For the correct behavior, it's recommended to call the ioctl `start` before calling the other wdt's ioctl, even if the RTC has already been initialized by the bootloader.
   The explanation is that the start function enables a flag variable that indicates the RTC WDT was turned on. This flag may alter the logic of other functions.
   
   ## Testing
   To test it, first, the RTC watchdog was enabled in the bootloader, then it was run the watchdog example with all 3 available WDTs (2 from Timers Module and 1 from the RTC).
   It was observed a normal behavior. The bootloader configuration was kept and it was possible to reconfigure the watchdog after initialization, as expected.  
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2514: xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #2514:
URL: https://github.com/apache/incubator-nuttx/pull/2514


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] v01d commented on pull request #2514: xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #2514:
URL: https://github.com/apache/incubator-nuttx/pull/2514#issuecomment-742714980


   I did a similar change for nRF52. Without knowing the particulars of ESP32 maybe you could do something similar: what i did is to check if the WDT is running and set the internal flag accordingly (see https://github.com/apache/incubator-nuttx/pull/2148/files#diff-ee887d9b947e24dd85e59ee039ecf2cd618c377f294599146d7103265068d626R409). The only caveat is that the "time to expire" will not be accurate until next time watchdog is reset.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on pull request #2514: xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on pull request #2514:
URL: https://github.com/apache/incubator-nuttx/pull/2514#issuecomment-742769687


   Hey @v01d 
   I appreciated your suggestion.
   I'll implement the feature also, there's no particularity in ESP32 for this.
   But we will also have a caveat: the RTC period may also be a little inaccurate while the user doesn't change the timeout, it depends on how the timeout was configured in bootloader because the `set timeout` ioctl takes into account the RTC frequency deviation.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on a change in pull request #2514: xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #2514:
URL: https://github.com/apache/incubator-nuttx/pull/2514#discussion_r540465528



##########
File path: arch/xtensa/src/esp32/esp32_wtd.h
##########
@@ -41,7 +41,6 @@
 #define ESP32_WTD_STOP(d)                       ((d)->ops->stop(d))
 #define ESP32_WTD_LOCK(d)                       ((d)->ops->enablewp(d))
 #define ESP32_WTD_UNLOCK(d)                     ((d)->ops->disablewp(d))
-#define ESP32_WTD_INITCONF(d)                   ((d)->ops->initconf(d))

Review comment:
       Done




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2514: xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2514:
URL: https://github.com/apache/incubator-nuttx/pull/2514#discussion_r540403568



##########
File path: arch/xtensa/src/esp32/esp32_wtd.h
##########
@@ -41,7 +41,6 @@
 #define ESP32_WTD_STOP(d)                       ((d)->ops->stop(d))
 #define ESP32_WTD_LOCK(d)                       ((d)->ops->enablewp(d))
 #define ESP32_WTD_UNLOCK(d)                     ((d)->ops->disablewp(d))
-#define ESP32_WTD_INITCONF(d)                   ((d)->ops->initconf(d))

Review comment:
       should we remove initconf from esp32_wtd_ops_s too?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on a change in pull request #2514: xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #2514:
URL: https://github.com/apache/incubator-nuttx/pull/2514#discussion_r540411103



##########
File path: arch/xtensa/src/esp32/esp32_wtd.h
##########
@@ -41,7 +41,6 @@
 #define ESP32_WTD_STOP(d)                       ((d)->ops->stop(d))
 #define ESP32_WTD_LOCK(d)                       ((d)->ops->enablewp(d))
 #define ESP32_WTD_UNLOCK(d)                     ((d)->ops->disablewp(d))
-#define ESP32_WTD_INITCONF(d)                   ((d)->ops->initconf(d))

Review comment:
       Yes. Definitely! 
   Thanks for pointing it out to me.
   I will fix it now.




----------------------------------------------------------------
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:
users@infra.apache.org