EXTMODULE TX and RX are inverted, we have to set them to high so that they cannot give power to the module

This commit is contained in:
Bertrand Songis
2020-11-24 10:10:33 +01:00
parent c7ddaebc42
commit e4a3dc73fd
@@ -37,7 +37,8 @@ void extmoduleStop()
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(EXTMODULE_USART_GPIO, &GPIO_InitStructure);
GPIO_ResetBits(EXTMODULE_USART_GPIO, EXTMODULE_TX_GPIO_PIN | EXTMODULE_RX_GPIO_PIN);
// TX and RX are inverted, we set it to HIGH
GPIO_SetBits(EXTMODULE_USART_GPIO, EXTMODULE_TX_GPIO_PIN | EXTMODULE_RX_GPIO_PIN);
#endif
EXTMODULE_TIMER->DIER &= ~(TIM_DIER_CC2IE | TIM_DIER_UDE);