Hi,
I am using own hardware board based on https://www.raytac.com/product/ins.php?index_id=24 module, it uses nRF52840.
I
I am facing an strange issue that UART is not working in normal mode but it is transferring a char when i add break point and run it.
If just keep in debug mode and run still it is not sending anything to uart transfer only when i add break point that too with single char put.
HI have taken uart example and removed the uart get byte part and kept only uart put byte part with default ascii char for every 500ms.
/**
* @brief Function for main application entry.
*/
int main(void)
{
uint32_t err_code;
// bsp_board_init(BSP_INIT_LEDS);
const app_uart_comm_params_t comm_params =
{
RX_PIN_NUMBER,
TX_PIN_NUMBER,
RTS_PIN_NUMBER,
CTS_PIN_NUMBER,
UART_HWFC,
false,
#if defined (UART_PRESENT)
NRF_UART_BAUDRATE_115200
#else
NRF_UARTE_BAUDRATE_115200
#endif
};
APP_UART_FIFO_INIT(&comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_error_handle,
APP_IRQ_PRIORITY_LOWEST,
err_code);
APP_ERROR_CHECK(err_code);
#ifndef ENABLE_LOOPBACK_TEST
printf("\r\nUART example started.\r\n");
while (true)
{
uint8_t cr;
//while (app_uart_get(&cr) != NRF_SUCCESS);
cr = 'A';
while (app_uart_put(cr) != NRF_SUCCESS);
LED0_Toggle();
nrf_delay_ms(500);
}
#else
// This part of the example is just for testing the loopback .
while (true)
{
uart_loopback_test();
}
#endif
}
P0.00 and P0.01 are connected to external 32Khz crystal, I dont have way to verify the crystal generate clock or not. Even if external crystal failed to work i am expecting internal RC to work.
Please help me to understand how to enable the RC clock and soft device if required .
Or what could the root cause of the issue ?
I have attached uart example code with sdkconfig i am using it. Please help me with this.
SDK used: \nRF5_SDK_17.0.2_d674dde\examples\peripheral\uart