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

Errors when modifying the UART/serial port emulation project to run in a serialized connection

Hi,

I have built the example hrs_uart project and it works fine when I load the image into a pair of OCA10040 demo boards, one as application board and the other as connectivity board.

I am trying to modify the UART/serial emulation project to run in the same way.

I copied the hrs_uart folder to the UART/serial folder.  in the sdk_config.h file I enabled the nus service and disabled the hrs services.

it was built OK. However, when I run it, It had a fatal error.

I debugged it and found that the function call nrfx_uarte_init returned with an error code 8.

please help on this issue

Parents
  • Hi,

    The driver returns this invalid state error if the application tries to initialize the driver multiple times, so there are probably mor than one user of the UART in your program. Please check if the NRF_LOG_BACKEND_UART_ENABLED setting is disabled in your sdk_config.h header. Maybe it's the logger module that tries to use it.  For logging you can use RTT (NRF_LOG_BACKEND_RTT_ENABLED).

    Best regards,

    Vidar

Reply
  • Hi,

    The driver returns this invalid state error if the application tries to initialize the driver multiple times, so there are probably mor than one user of the UART in your program. Please check if the NRF_LOG_BACKEND_UART_ENABLED setting is disabled in your sdk_config.h header. Maybe it's the logger module that tries to use it.  For logging you can use RTT (NRF_LOG_BACKEND_RTT_ENABLED).

    Best regards,

    Vidar

Children
Related