When I using the UART port, if I float the port after init the UART it will restart the code, is it need a external pull-up resistor? How about the value?
When I using the UART port, if I float the port after init the UART it will restart the code, is it need a external pull-up resistor? How about the value?
You are probably getting an APP_UART_COMMUNICATION_ERROR event which will by default call the APP_ERROR_HANDLER which will reset the chip by default (if DEBUG is not defined).
You can either handle the communcation error differently or configure RX with an internal pull-up:
NRF_GPIO->PIN_CNF[RX_PIN_NUMBER] |= (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos);
You are probably getting an APP_UART_COMMUNICATION_ERROR event which will by default call the APP_ERROR_HANDLER which will reset the chip by default (if DEBUG is not defined).
You can either handle the communcation error differently or configure RX with an internal pull-up:
NRF_GPIO->PIN_CNF[RX_PIN_NUMBER] |= (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos);