NRF52 problem with "Traced" pins and "Uart"

Good morning.

I have a custom board with softdevice 132 and sdk 15.0.3 where I have configured pin P0.16 and P0.17 for uart (rx, tx). I have read in other posts/problems that this pins ("Traced" pins) can be used to other jobs as "gpio", "spi", "ble" etc. I have configured them and at this moment I´m using for uart and all OK but from yesterday I´m having some problems with the uart (fatal error betwen other). This error is very random, there are times that throws at the start of program and others times throws after 2-3 hours.

Tests performed (Update).

  • I have checked if traced pins is well configured with "NRF_LOG_DEBUG("NRF_CLOCK->TRACECONFIG: 0x%x\n", NRF_CLOCK->TRACECONFIG);" and it returns "<debug> app: NRF_CLOCK->TRACECONFIG: 0x0" so it is ok.

  • Modify baud of uart.
  • Implements the specific type of "fatal error" with:

        case APP_UART_COMMUNICATION_ERROR:
            //APP_ERROR_HANDLER(p_event->data.error_communication);
		 NRF_LOG_ERROR("Communication error occurred while handling UART: %08X", p_event->data.error_communication );
            if( p_event->data.error_communication & UART_ERRORSRC_BREAK_Msk )
            {
                NRF_LOG_ERROR("   Break");
            }
            if( p_event->data.error_communication & UART_ERRORSRC_FRAMING_Msk )
            {
                NRF_LOG_ERROR("   Framing");
            }
            if( p_event->data.error_communication & UART_ERRORSRC_PARITY_Msk )
            {
                NRF_LOG_ERROR("   Parity");
            }
            if( p_event->data.error_communication & UART_ERRORSRC_OVERRUN_Msk )
            {
                NRF_LOG_ERROR("   Overrun");
            }
		
            break;

And the error is:

 0> <error> app: Communication error occurred while handling UART: 00000004
 0> <error> app:    Framing
 0> <error> app: Communication error occurred while handling UART: 00000008
 0> <error> app:    Break

  • Add "sd_clock_hfclk_request();" in the uart init.
  • Change priority of the uart from "Lowest" to "High" and "Highest"
  • Change the size of the uart buffer from 256 to 512.

Is there any problem with "traced" pins or is needed some configuration to use them as "uart"?

Thank for help.

Parents Reply Children
No Data
Related