mlaz commented on a change in pull request #836: [WIP] PWM add cycle interrupt handling to pwm_nrf52 driver URL: https://github.com/apache/mynewt-core/pull/836#discussion_r170050146
########## File path: hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c ########## @@ -177,9 +249,10 @@ nrf52_pwm_close(struct os_dev *odev) dev = (struct pwm_dev *) odev; inst_id = dev->pwm_instance_id; + assert(instances[inst_id].in_use); nrfx_pwm_uninit(&instances[inst_id].drv_instance); - instances[inst_id].playing = false; + cleanup_instance(inst_id); Review comment: The problem which the commit you mentioned fixes is the misuse of in_use flag. When you reported the problem, what was "breaking" execution was in fact an assert on pwm_open. Only yesterday I noticed that fix is not coherent with how the flag should be used. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services