Skip to content

Commit 90cd350

Browse files
MaochenWang1kartben
authored andcommitted
drivers: serial: fix console hang when waken up from PM3
The console can't input when waken up from PM3, as get the wrong usart_intenset when process PM_DEVICE_ACTION_TURN_ON and the USART interrupt is not enabled. Only saving usart_intenset after PM action of PM_DEVICE_ACTION_TURN_OFF can fix this issue. Signed-off-by: Maochen Wang <[email protected]>
1 parent db4344b commit 90cd350

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/serial/uart_mcux_flexcomm.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1123,14 +1123,13 @@ static int mcux_flexcomm_pm_action(const struct device *dev, enum pm_device_acti
11231123
const struct mcux_flexcomm_config *config = dev->config;
11241124
int ret;
11251125

1126-
usart_intenset = USART_GetEnabledInterrupts(config->base);
1127-
11281126
switch (action) {
11291127
case PM_DEVICE_ACTION_RESUME:
11301128
break;
11311129
case PM_DEVICE_ACTION_SUSPEND:
11321130
break;
11331131
case PM_DEVICE_ACTION_TURN_OFF:
1132+
usart_intenset = USART_GetEnabledInterrupts(config->base);
11341133
break;
11351134
case PM_DEVICE_ACTION_TURN_ON:
11361135
ret = mcux_flexcomm_init_common(dev);

0 commit comments

Comments
 (0)