[X3 / X-Lite] Internal module was never powered off

This commit is contained in:
Bertrand Songis
2019-03-13 13:59:24 +01:00
parent ee9ee3dac3
commit c469794753
3 changed files with 24 additions and 3 deletions
@@ -24,8 +24,19 @@ ModuleFifo intmoduleFifo;
void intmoduleStop()
{
INTERNAL_MODULE_OFF();
GPIO_ResetBits(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN);
INTMODULE_DMA_STREAM->CR &= ~DMA_SxCR_EN; // Disable DMA
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = INTMODULE_TX_GPIO_PIN | INTMODULE_RX_GPIO_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(INTMODULE_GPIO, &GPIO_InitStructure);
GPIO_ResetBits(INTMODULE_GPIO, INTMODULE_TX_GPIO_PIN | INTMODULE_RX_GPIO_PIN);
}
void intmodulePxxStart()