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

Problem with re-configuration of Default-UART-pins

Hello,

I am having some trouble properly using UART and my MPU-sensor on a nRF52832-custom-board. The UART-pins I am trying to use are P0.05 for UART_TX and P0.06 for UART_RX, while the connections SDA and SCL for my MPU are on P0.07 and P0.08 respectively.

I already tried adjusting the macros NRF_LOG_BACKEND_SERIAL_UART_TX_PIN (default: 6), NRF_LOG_BACKEND_SERIAL_UART_RX_PIN (default: 8), NRF_LOG_BACKEND_SERIAL_UART_RTS_PIN (default: 5) and NRF_LOG_BACKEND_SERIAL_UART_CTS_PIN (default: 7) in my sdk_config.h. Simultaneously I adjusted the SDA- and SCL-pins thats are used within the nrf_drv_twi_config_t-structure, which is then passed to nrf_drv_twi_init().

For some unknown reason I am able to get a UART-communication when leaving the default-configuration in sdk_config.h and connecting my UART_TX and UART_RX to P0.05 and P0.06. When I try to access the MPU f.ex. with nrf_drv_twi_tx(), I am always getting the error code 0x11 (NRF_ERROR_BUSY).

In order to relocate the UART-functionality to some different pins I could use P0.11, P0.12, P0.13 and P0.17, so that at least in theory there shouldnt be any interference between UART and MPU. Does it maybe also require some compiler-flag for the Makefile in order to have SDA and SCL working on P0.07 and P0.08?

Currently I am realy lost here and I would very much appreciate any help that I can get!

Related