sparkfun / AmbiqSuiteSDK

A copy of the AmbiqSuite SDK available on GitHub. Can be used to include AmbiqSuite as a submodule. May be used to track issues in SDK releases, however this repo is not maintained by AmbiqMicro
39 stars 31 forks source link

Update am_hal_uart.c #32

Open RichardSWheatley opened 3 years ago

RichardSWheatley commented 3 years ago

The call to am_hal_pwrctrl_periph_disable will leave some values of the UARTn->CR register powered up and the current draw to be 200-300nA higher than expected. The below adjustment is acceptable since the pState->sRegState.regCR will retain the state and return the state if requested..

UARTn(ui32Module)->CR = 0;