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

UART does not work when bootloader is used

We have an app that uses UART. It works flawlessly when only SD and app are present on a chip.

But if bootloader is used, UART does not work.

nrfjprog -e
python device_page_generator.py -d nrf52840_xxAA -sd "s140_6.1.1" -o bin/device_page_nrf52840_xxAA_s140_6.1.1.hex
nrfjprog --program ../../bin/softdevice/s140_nrf52_6.1.1_softdevice.hex --chiperase
nrfjprog --program ../../bin/bootloader/armcc/mesh_bootloader_serial_armcc_nrf52840_xxAA.hex
nrfjprog --program <path>\provisioner_nrf52840_s140_6_1_1.hex
nrfjprog --program bin/device_page_nrf52840_xxAA_s140_6.1.1.hex
nrfjprog --reset

Why is it so? How to fix it?

[nRF Mesh 2.2, nRF SDK 15, SD140 6.1, nRF52840]

Top Replies

Parents
  • What specifically is the issue? Try to debug your problem, and see if you can locate the root of the problem. Is it in the setup phase or while trying to send/receive messages?

    Best regards, Simon

  • I did some additional debugging and some traces with a scope.

    Data (TX, RX) are in both cases (with or without bootloader) sent normally. However, the RTS signal is always 0 when a Mesh bootloader is present on a device. This behavior is not noticed when app runs without bootloader.

    It seems like the Mesh bootloader somehow interferes with an app, which uses UART. How is this possible?

    P.S. The app starts serial port in the following way:

    NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte0_drv_config, RX_PIN_NUMBER, TX_PIN_NUMBER, RTS_PIN_NUMBER, CTS_PIN_NUMBER, NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED, NRF_UART_BAUDRATE_115200, UART_DEFAULT_CONFIG_IRQ_PRIORITY);
    
    #define SERIAL_FIFO_TX_SIZE 64
    #define SERIAL_FIFO_RX_SIZE 64
    
    NRF_SERIAL_QUEUES_DEF(serial_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);
    
    #define SERIAL_BUFF_TX_SIZE 1
    #define SERIAL_BUFF_RX_SIZE 1
    
    NRF_SERIAL_BUFFERS_DEF(serial_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);
    NRF_SERIAL_CONFIG_DEF(serial_config, NRF_SERIAL_MODE_DMA, &serial_queues, &serial_buffs, serial_rx_cb, NULL);
    NRF_SERIAL_UART_DEF(serial_uarte, 0);
    
    APP_ERROR_CHECK(nrf_serial_init(&serial_uarte, &m_uarte0_drv_config, &serial_config));

  • I am not able to recreate the error, could you upload your project? I can make the ticket private if you would like to.

  • I created private issue (case 219743) with project included.

Reply Children
Related