Device reset happening and i can't able to upload the code

Hello,

In my project i am using  nrf52840 with my custom board and to upload the code through NRF_CONNECT application with soft device its uploading properly but with  segger emmbedded its giving some error like this .please have look and let me know what is the problem.

after this i have add DEBUG in preprocessor definition and i got this

thank you.

Parents
  • Hi

    I think you have implemented the two UARTs correctly, and as long as you declare different pins for the two connected devices, you should be able to receive and transmit the data over BLE with the ble_nus_data_send() function. Some modifications to send the data from both UART instances might be necessary depending on where you store this data.

    Best regards,

    Simon

  • Hello Simonr,

    thanks for the reply, i have declare the two UART pins and nothing happens even BLE advertising was stop. the uart_init() is look like this 

    #define RX_PIN0 NRF_GPIO_PIN_MAP(0,9)
    #define TX_PIN0 NRF_GPIO_PIN_MAP(0,10)
    #define RX_PIN1 NRF_GPIO_PIN_MAP(1,11)
    #define TX_PIN1 NRF_GPIO_PIN_MAP(0,12)
    
    
    static void uart_init(void)
    {
        uint32_t                     err_code1;
        app_uart_comm_params_t const comm_params1 =
        {
            .rx_pin_no    = RX_PIN_NUMBER,
            .tx_pin_no    = TX_PIN_NUMBER,
            .rts_pin_no   = RTS_PIN_NUMBER,
            .cts_pin_no   = CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
            .use_parity   = false,
    #if defined (UART_PRESENT)
            .baud_rate    = NRF_UART_BAUDRATE_115200
    #else
            .baud_rate    = NRF_UARTE_BAUDRATE_115200
    #endif
        };
    
         uint32_t                     err_code2;
       app_uart_comm_params_t const comm_params2 =
        {
            .rx_pin_no    = RX_PIN1,
            .tx_pin_no    = TX_PIN1,
            .rts_pin_no   = RTS_PIN_NUMBER,
            .cts_pin_no   = CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
            .use_parity   = false,
    #if defined (UART_PRESENT)
            .baud_rate    = NRF_UART_BAUDRATE_115200
    #else
            .baud_rate    = NRF_UARTE_BAUDRATE_115200
    #endif
        };
    
        APP_UART_FIFO_INIT(&comm_params1,
                           UART_RX_BUF_SIZE,
                           UART_TX_BUF_SIZE,
                           uart_event_handle,
                           APP_IRQ_PRIORITY_LOWEST,
                           err_code1);
        APP_ERROR_CHECK(err_code1);
    
         APP_UART_FIFO_INIT(&comm_params2,
                           UART_RX_BUF_SIZE,
                           UART_TX_BUF_SIZE,
                           uart_event_handle,
                           APP_IRQ_PRIORITY_LOWEST,
                           err_code2);
        APP_ERROR_CHECK(err_code2);
    }

    so what is the problem when i am trying to print some messages also not happening. is that declaring two UART's is right.??

    thank you.

Reply
  • Hello Simonr,

    thanks for the reply, i have declare the two UART pins and nothing happens even BLE advertising was stop. the uart_init() is look like this 

    #define RX_PIN0 NRF_GPIO_PIN_MAP(0,9)
    #define TX_PIN0 NRF_GPIO_PIN_MAP(0,10)
    #define RX_PIN1 NRF_GPIO_PIN_MAP(1,11)
    #define TX_PIN1 NRF_GPIO_PIN_MAP(0,12)
    
    
    static void uart_init(void)
    {
        uint32_t                     err_code1;
        app_uart_comm_params_t const comm_params1 =
        {
            .rx_pin_no    = RX_PIN_NUMBER,
            .tx_pin_no    = TX_PIN_NUMBER,
            .rts_pin_no   = RTS_PIN_NUMBER,
            .cts_pin_no   = CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
            .use_parity   = false,
    #if defined (UART_PRESENT)
            .baud_rate    = NRF_UART_BAUDRATE_115200
    #else
            .baud_rate    = NRF_UARTE_BAUDRATE_115200
    #endif
        };
    
         uint32_t                     err_code2;
       app_uart_comm_params_t const comm_params2 =
        {
            .rx_pin_no    = RX_PIN1,
            .tx_pin_no    = TX_PIN1,
            .rts_pin_no   = RTS_PIN_NUMBER,
            .cts_pin_no   = CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
            .use_parity   = false,
    #if defined (UART_PRESENT)
            .baud_rate    = NRF_UART_BAUDRATE_115200
    #else
            .baud_rate    = NRF_UARTE_BAUDRATE_115200
    #endif
        };
    
        APP_UART_FIFO_INIT(&comm_params1,
                           UART_RX_BUF_SIZE,
                           UART_TX_BUF_SIZE,
                           uart_event_handle,
                           APP_IRQ_PRIORITY_LOWEST,
                           err_code1);
        APP_ERROR_CHECK(err_code1);
    
         APP_UART_FIFO_INIT(&comm_params2,
                           UART_RX_BUF_SIZE,
                           UART_TX_BUF_SIZE,
                           uart_event_handle,
                           APP_IRQ_PRIORITY_LOWEST,
                           err_code2);
        APP_ERROR_CHECK(err_code2);
    }

    so what is the problem when i am trying to print some messages also not happening. is that declaring two UART's is right.??

    thank you.

Children
No Data
Related