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/11/04 20:49:11 UTC

[GitHub] [incubator-nuttx] daniel-p-carvalho opened a new pull request #2220: STM32L4 TIMER: Add some helper functions

daniel-p-carvalho opened a new pull request #2220:
URL: https://github.com/apache/incubator-nuttx/pull/2220


   ## Summary
   
   Add helper functions to
     * enable/disable timer
     * dump timer registers
   
   ## Impact
   
   The timer is no longer enabled at the end of stm32l4_tim_setclock()
   
   ## Testing
   
   Tested with SPWM example on nucleo-l432kc board. This example was changed to enable timer after configure timer clock.


----------------------------------------------------------------
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] acassis commented on pull request #2220: STM32L4 TIMER: Add some helper functions

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


   Hi Daniel, I think it is not a good idea to remove stm32l4_tim_disable() and modify stm32l4_tim_enable() to include a "bool state", doing it you are creating asymmetries with stm32, stm32f7, stm32h7 and stm32f0l0g0. If you propose to modify all them, then it could be fine, but it will involve testing in many other boards.
   Some arch like nrf52 and esp32 we don't have enable/disable, but start/stop that is more clear about its intention.


----------------------------------------------------------------
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] acassis commented on pull request #2220: STM32L4 TIMER: Add some helper functions

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


   Please take a look at arm/src/nrf52/nrf52_tim.h, maybe what you want is something similar, a Helper macro to START() and STOP() right?


----------------------------------------------------------------
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] daniel-p-carvalho commented on pull request #2220: STM32L4 TIMER: Add some helper functions

Posted by GitBox <gi...@apache.org>.
daniel-p-carvalho commented on pull request #2220:
URL: https://github.com/apache/incubator-nuttx/pull/2220#issuecomment-722380684


   Hi @acassis, thanks for reviewing the PR. I reverted the changes on stm32l4_tim_enable() function as you suggested. I kept the name of helper macros ENABLE/DISABLE to be coherent with the name of functions on timer driver.


----------------------------------------------------------------
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] acassis merged pull request #2220: STM32L4 TIMER: Add some helper functions

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


   


----------------------------------------------------------------
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] acassis commented on pull request #2220: STM32L4 TIMER: Add some helper functions

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


   Thank you @daniel-p-carvalho 


----------------------------------------------------------------
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