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
  • write an error handler which just idle loops (and turns on an LED so you can see when it's there). Then start your board up, wait for it to get to the error handler and THEN attach a debugger to it. You can attach debuggers to running processors. Then halt the CPU and you can trace down the problem.

    Something like Segger's ozone debugger is all you need for this, it basically just drives the Segger JLINK and lets you load the elf file so it can show you where it is.

Reply
  • write an error handler which just idle loops (and turns on an LED so you can see when it's there). Then start your board up, wait for it to get to the error handler and THEN attach a debugger to it. You can attach debuggers to running processors. Then halt the CPU and you can trace down the problem.

    Something like Segger's ozone debugger is all you need for this, it basically just drives the Segger JLINK and lets you load the elf file so it can show you where it is.

Children
No Data
Related