Skip to content

Commit bb12d36

Browse files
authored
Merge pull request #8591 from SiliconLabs/dev_9.0
Fix crash when pwmio deinit for Silabs's board
2 parents 166a98f + 55ecc64 commit bb12d36

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ports/silabs/common-hal/pwmio/PWMOut.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ void pwmout_reset(void) {
4646
mcu_tim_pin_obj_t *l_tim = &mcu_tim_list[tim_index];
4747
if (l_tim->pin != NULL) {
4848
sl_pwm_deinit(&pwm_handle[tim_index]);
49+
common_hal_reset_pin(l_tim->pin);
50+
l_tim->pin = NULL;
4951
}
5052
}
5153

0 commit comments

Comments
 (0)