Hi
I have a custom board implementation that operates as follows:
- Monitoring an input pin waiting for low high transition, BLE advertising of device.
- When input event occurs initialise 2 serial devices and supporting HW to operate as a serial bridge
- When input pin transitions back to low state uninitialise 2 serial devices and supporting HW to return to Point 1 state
After power on the current in state 1 is 100 micro amps. However after transitioning through 2 and 3 then back to 1 the current settles to 900 micro amps.
I have checked the control of the external devices and have isolated the issue to the initialisation / uninitialisation of the serial devices with either causing the issue.
Wondering if the devices are uninitialising correctly?
//Configure UARTs using nordic serial service configuration defined in global variables
ret = nrf_serial_init(&serial0_uart, &m_uart0_drv_config, &serial0_config);
APP_ERROR_CHECK(ret);
ret = nrf_serial_init(&serial1_uart, &m_uart1_drv_config, &serial1_config);
APP_ERROR_CHECK(ret);
nrf_gpio_pin_clear(U1DTR_PIN);
//Un-initialize UARTs
ret = nrf_serial_uninit(&serial0_uart);
APP_ERROR_CHECK(ret);
ret = nrf_serial_uninit(&serial1_uart);
APP_ERROR_CHECK(ret);
Using SDK 15 on a nRF52840 with the serial files provided in the attached link:
https://devzone.nordicsemi.com/f/nordic-q-a/25173/nrf52840-uart1-not-working-in-sdk-14/126390#126390
Regards