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

Migrating from SDK14.2.0 to SDK15.0.0, nrfx uart

Hi,

I am migrating from SDK14.2 to SDK15.0 and I can compile now, but when runnning the nrfx_uart_init the hardware handshake signal RTS is high from the beginning.

Also if I dont use hardware handshake the event handler is not trigged by incoming data.

nrfx_uart_t g_Uart = NRFX_UART_INSTANCE(0);

void uart_init()
{
    nrfx_uart_config_t g_UartCfg = NRFX_UART_DEFAULT_CONFIG;

    g_UartCfg.pselrxd = RX_PIN_NUMBER;
    g_UartCfg.pseltxd = TX_PIN_NUMBER;
    g_UartCfg.pselrts = RTS_PIN_NUMBER;
    g_UartCfg.pselcts = CTS_PIN_NUMBER;
    g_UartCfg.hwfc = NRF_UART_HWFC_ENABLED;
    g_UartCfg.baudrate = NRF_UART_BAUDRATE_115200;
    g_UartCfg.interrupt_priority = 6;

    err_code = nrfx_uart_init(&g_Uart, &g_UartCfg, uart_event_handle);
}

As per recommendation from nordic I have ditched the app_uart( previously used in SDK14.2), because when I include the app_uart_fifo.c in the makefile, all the app_uart_put and get are not found, and gone fully nrfx uart ;(...

BR

  • Hello,

    I have started over the migrating process. I had lost track of what configuration enabled that worked and what didn't.

    error :Makefile:273: Cannot find source file:  ../../../SDK15.0.0/components/drivers_nrf/common/nrf_drv_common.c

    Where is the corresponding nrfx_common.c?

    error: "components/drivers_nrf/hal/nrf_saadc.c" not found:

    is it moved to "modules/nrfx/hal/nrf_saadc.c"?

    error: "components/libraries/twi" not founc:

    is it moved to "components/libraries/twi_mngr"?

    Error:"components/device" folder not found:

    is this moved to "modules/nrfx/mdk"?

    Error :"components/toolchain/gcc/gcc_startup_nrf52.S" not found:

    is this move to "/modules/nrfx/mdk/gcc_startup_nrf52.S"?

    Error :"components/toolchain/gcc/system_nrf52.c" not found:

    is this move to "/modules/nrfx/mdk/system_nrf52.c"?

    NRF_SDH_BLE_GAP_DATA_LENGTH is a new macro requirement in nrf_ble_gatt.c?

    Am I right in that the app_uart_fifo.c is only for legacy/integration and not purely nrfx_uart compatible?

    Thanks,

    Bjarke

  • Bjarke said:
    It seems that the nrfx_glue changes the NRFX_xxx to NRF_xxx.

     Yes. In addition there is a file called apply_old_config.h, which you should take a look at.

    Basically, if you have defines in sdk_config.h that has both NRFX_EXAMPLE_DEFINE and EXAMPLE_DEFINE, then the EXAMPLE_DEFINE will overrule the NRFX_EXAMPLE_DEFINE. 

    Note that this does not mean that you are using the legacy drivers. 

    I am not sure exactly what difficulties you are experiencing. I agree that it is confusing with NRFX and NRF defines, and it is not ideal. But what is the issue you are encountering? Are you able to compile? Does the app "crash" during runtime? Or is the UART not responding?

  • I can compile.

    The UART is not responding. The event is not fired, and the RTS is constant high.

    Bluetooth is running.

    I get a NRFX_SUCCESS from the app_fifi_uart_init ( should be NRF_SUCCESS, if the glue.h is applied correctly)

    In the Uart loopback example I dont see the the glue.h file is applied anywhere.

    See my other reply below

  • Have you copied your project file from the old SDK to SDK15? I would suggest that you rather start of with one of the project files from SDK15, and port your main.c file to that, and add the files that you have written yourself.

    The files that it complains it can't find doesn't exist in those locations anymore, and they have been renamed. 

    Please start with a project file from SDK15.0.0. It will save you a lot of time.

Related