v01d opened a new pull request #1248: URL: https://github.com/apache/incubator-nuttx/pull/1248
## Summary The oneshot timer would sets autoreload register to zero when a period equal to zero was requested. This would never be triggered since the ARR needs to be at least 1. This commit changes this case to set a minimum period of zero. The tone driver had an artificial delay of 1s possibly due to this problem which introduced an undersired lag when trying to play a tune. Since the oneshot is now fixed, this delay is removed and it now works as expected without lag. There is one caveat: I found that using stop() would not allow further notes to be played. Looking at the PWM code it would seem that the tone should be stopped setting a duty of zero, which is what I did. But I'm not sure this is a bug in the PWM code. Could someone verify that? ## Impact STM32L4 oneshot timer for period == 0. I don't think there are other cases for this scenario currently so it should not affect anything else. ## Testing Tested the tone driver on STM32L4 and worked as expected without the delay. This was on tickless mode which uses oneshot() for the underlying timer, so this indirectly tests also that. ---------------------------------------------------------------- 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: us...@infra.apache.org