This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Ble uart application wont run when just plugin supply

I have a ble_uart application which is working when I load it on the chip. But it will not automaticly run again if I unplug the supply and just plugin again. When I unplug the supply, then I have to run the application again on Keil.

But if I comment out uart_init(); then the application will automaticly run by plugin the supply.

This behavoir will only appear on the ble_example. The Uart example without SD will run automaticly by plugin even when uart is initialized.

Why the ble_uart application wont run automaticly when I plugin the supply?

Uart_init seems to be the problem. But why it isnt a problem when I run it from Keil?

I cant debug this, because when i start the debugger, then I have to run the program from keil, and then it will always run.

We use a Raytac module. This module has no external LFKC. Does Ble_Uart work without LFKC?

Here my UART initialization

static void uart_init(void)
{
    uint32_t                     err_code;
    const app_uart_comm_params_t comm_params =
    {
        RX_PIN_NUMBER,
        TX_PIN_NUMBER,
        RTS_PIN_NUMBER,
        CTS_PIN_NUMBER,
        APP_UART_FLOW_CONTROL_DISABLED,
        false,
        UART_BAUDRATE_BAUDRATE_Baud19200					
    };

    APP_UART_FIFO_INIT( &comm_params,
                       UART_RX_BUF_SIZE,
                       UART_TX_BUF_SIZE,
                       uart_event_handle,
                       APP_IRQ_PRIORITY_LOW,
                       err_code);
    APP_ERROR_CHECK(err_code);
}
Parents
  • The device may be powered through the UART pins when you unplug the power, so when you plugin the supply again the device have not been powered off and will hence not run the startup code.

    It is weird however that this is only the case when using SD.

    Is the behaviour the same even though nothing is connected on the other side of the UART? How do you see that the code is not running (not advertising, LEDs not blinking)?

Reply
  • The device may be powered through the UART pins when you unplug the power, so when you plugin the supply again the device have not been powered off and will hence not run the startup code.

    It is weird however that this is only the case when using SD.

    Is the behaviour the same even though nothing is connected on the other side of the UART? How do you see that the code is not running (not advertising, LEDs not blinking)?

Children
No Data
Related