This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to disable +CEREG notifications

Hi,

I've got an application based off the asset tracker firmware that needs a UART. From the many threads on the topic, I've found a way to shut down the UARTs to save power but I cannot shut down the console UART since the +CEREG notifications are coming in periodially.

If a notification comes in with the console UART_0 shut off, the application crashes.

In my application prj.conf I've got:

# UART 2 
CONFIG_SERIAL=y
CONFIG_UART_NRFX=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_2_NRF_UARTE=y

# Console
CONFIG_STDOUT_CONSOLE=n
CONFIG_LOG=n
CONFIG_BOOT_BANNER=n
CONFIG_PRINTK=n
#CONFIG_CONSOLE_SUBSYS=y
#CONFIG_CONSOLE_HANDLER=y
#CONFIG_CONSOLE_GETCHAR=y

# LOG config:
CONFIG_LOG=n
CONFIG_LOG_IMMEDIATE=n
CCONFIG_AWS_FOTA_LOG_LEVEL=0
CONFIG_AWS_JOBS_LOG_LEVEL=0
CONFIG_LTE_LINK_CONTROL_LOG_LEVEL=0
CONFIG_AT_NOTIF_LOG_LEVEL=0
CONFIG_NRF_CLOUD_LOG_LEVEL=0
CONFIG_NRF9160_GPS_LOG_LEVEL=0
CONFIG_MODEM_INFO=n

# Modem info
#CONFIG_MODEM_INFO=y

And my SPM prj.conf is:

CONFIG_IS_SPM=y
CONFIG_FW_INFO=y
CONFIG_GPIO=n
CONFIG_STDOUT_CONSOLE=n
CONFIG_LOG=n
CONFIG_BOOT_BANNER=n
CONFIG_PRINTK=n

To shut the UARTs down, I'm calling these disable functions:

//  nrf_uarte_disable(NRF_UARTE0);
    nrf_uarte_disable(NRF_UARTE2);
    
    
    

Note: this other suggested method from older threads didn't lower the sleep power consumption. It was still at 1.5mA:

// Start the UART (stopped for reduced power consumption)
	NRF_UARTE1_NS->ENABLE = 8;
	NRF_UARTE1_NS->TASKS_STARTTX = 1;
	NRF_UARTE1_NS->TASKS_STARTRX = 1; 
	
<use uart>
	
// Stop the UART for reduced power consumption  
	NRF_UARTE1_NS->TASKS_STOPRX = 1;
	NRF_UARTE1_NS->TASKS_STOPTX = 1; 
	NRF_UARTE1_NS->ENABLE = 0;	

What else can I do to disable all console output so I can safely turn off UART_0?

Thanks,

Tim

Parents
  • Hello Heidi,

    My loging/printk settings seem to supress notifications except for those first two +CEREG ones. But shouldn't those first two be supressed also? Since they are still present every time the application starts, there appears to be an active mechanism for console notifications.

    Is it safe to turn off UART_0, or is there a risk of another notification that will crash my application?

    Thanks,

    Tim

Reply
  • Hello Heidi,

    My loging/printk settings seem to supress notifications except for those first two +CEREG ones. But shouldn't those first two be supressed also? Since they are still present every time the application starts, there appears to be an active mechanism for console notifications.

    Is it safe to turn off UART_0, or is there a risk of another notification that will crash my application?

    Thanks,

    Tim

Children
Related