[SOLVED] turn off logging through UART.
Hello
I'm experiencing a strange issue where my device sends a beacon under DEBUG, but does not under RUN.
Due to that I tried to have the debug status written to a terminal.
I included nrf_serial.c and used default setup.
I call this and it prints "Hello nrf_serial!".
void serial_init(void)
{
ret_code_t ret;
ret = nrf_serial_init(&serial_uart, &m_uart0_drv_config, &serial_config);
APP_ERROR_CHECK(ret);
static char tx_message[] = "Hello nrf_serial!\n\r";
ret = nrf_serial_write(&serial_uart,
tx_message,
strlen(tx_message),
NULL,
NRF_SERIAL_MAX_TIMEOUT);
APP_ERROR_CHECK(ret);
ret = nrf_serial_flush(&serial_uart, NRF_SERIAL_MAX_TIMEOUT);
APP_ERROR_CHECK(ret);
}
then I do this: serial_init();
printf("\r\nTEST UART\r\n");
s_write("tst0\r\n");
s_write("tst1\r\n");
s_write("tst2\r\n");
s_write("tst3\r\n");
s_write("tst4\r\n");
neither of the "tst..." messages is written.
The s_write contains this:
ret = nrf_serial_write(&serial_uart, c, strlen(c), NULL, NRF_SERIAL_MAX_TIMEOUT);
APP_ERROR_CHECK(ret);
ret = nrf_serial_flush(&serial_uart, NRF_SERIAL_MAX_TIMEOUT);
APP_ERROR_CHECK(ret);
Is it an interrupt issue?