nrf5/hal: Fixing some issues in PWM stop function. Doing a proper stop and disable the peripheral.
This commit is contained in:
parent
3d120ac103
commit
1bc50dbeb5
@ -79,7 +79,8 @@ void hal_pwm_start(NRF_PWM_Type * p_instance) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void hal_pwm_stop(NRF_PWM_Type * p_instance) {
|
void hal_pwm_stop(NRF_PWM_Type * p_instance) {
|
||||||
p_instance->TASKS_STOP = 1;
|
p_instance->TASKS_SEQSTART[0] = 0;
|
||||||
|
p_instance->ENABLE = (PWM_ENABLE_ENABLE_Disabled << PWM_ENABLE_ENABLE_Pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hal_pwm_freq_set(NRF_PWM_Type * p_instance, uint16_t freq) {
|
void hal_pwm_freq_set(NRF_PWM_Type * p_instance, uint16_t freq) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user