UART0 TX pin sometimes pulled low after suspending uart0 and putting MCU into System OFF

I've got a product on the market that uses an nRF52832 on a custom board. It's been built with NCS V2.6.1

It spends most of its time in System OFF, and gets woken up by activity on one of several different GPIO.

Just before I put the MCU into System OFF, I suspend the UART:

err = pm_device_action_run(uart0_dev, PM_DEVICE_ACTION_SUSPEND); // Suspend pwm0
k_msleep(5);
sys_poweroff();

However, I've had some issues with power drain on some units, and on further investigation it appears that in some (seemingly random) cases, when the device goes into System OFF, the TX pin gets pulled low. This results in significant current draw during the off period (the TX pin drives an IR LED, so pulling it low draws current through the LED)

I have my UART pins set up as follows:

&uart0 {
status = "okay";
current-speed = <9600>;
compatible = "nordic,nrf-uarte";
pinctrl-0 = <&uart0_fem_default>;
pinctrl-1 = <&uart0_fem_sleep>;
pinctrl-names = "default", "sleep";
};

pinctrl {

uart0_fem_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 8)>;
};
};

uart0_fem_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 8)>;
low-power-enable;
};
};

I was of the understanding that "low-power-enable" then sets the TX and RX pins as input, high-Z, so that they are effectively floating.

What I want to understand then, is why is my TX pin getting pulled low? It's not happening consistently - seems pseudo random to be honest.

i know I can add some code to reconfigure the TX pin as a GPIO and then pull it high prior to going into System OFF, but I want to understand why the "low-power-enable" isn't doing what it's supppsed to do and actually allow the pin to float?

Can anyone assist?

Regards,

Mike

Parents Reply
  • Hi Ressa,

    Not sure that answers my question.

    That ticket seems to be how to configure the UART so that the sleep configuration doesn't get applied. Specifically, Vidar says: "if you don't want the 'uart1_sleep' group to be applied on suspend"

    Why does applying the UART sleep group cause my TX pin to get set low?

    I would have though putting the UART device into suspend and then calling sys_poweroff() was all that was needed?

    Is this random GPIO behavior some sort of errata?

    Regards,

    Mike

Children
No Data
Related