Hello,
I am working with 2 x nRF5340 Audio DK. I flashed the Central UART Sample on the 1st Kit and the Peripheral UART Sample on the second kit. It works 100%.
However the UART used in the sample is UART0 and it is a CDC-based UART accessible on the PC via 2 virtual COM ports via USB. I need to set up the kits to use a Hardware UART since I will be connecting the kits to other devices via RS232. I have a UART/RS232 circuit to take care of that.
According to the documentation, there is UART2 on the Arduino headers on Pin 1.08 (UART2_RXD) and P1.09 (UART2_TXD).
Based on the DTS files in the nRF5340 Audio DK there is no UART2 setup by default. I then created an overlay called nrf5340_audio_dk_nrf5340_cpuapp.overlay in the root folder of the project. Here are the contents:
&uart2 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&uart2_default_alt>; pinctrl-1 = <&uart2_sleep_alt>; pinctrl-names = "default", "sleep";};&gpiote { interrupts = <13 NRF_DEFAULT_IRQ_PRIORITY>;};&pinctrl { uart2_default_alt: uart2_default_alt { group1 { psels = <NRF_PSEL(UART_RX, 1, 8)>, <NRF_PSEL(UART_TX, 1, 9)>; }; }; uart2_sleep_alt: uart2_sleep_alt { group1 { psels = <NRF_PSEL(UART_RX, 1, 8)>, <NRF_PSEL(UART_TX, 1, 9)>; low-power-enable; }; };};I have tested another test project and I was able to communicate (RX and TX) with UART2 via my RS232/UART converter and a console on the PC. So UART2 is accessible and wired up correctly.
My question is:
How can I change these 2 projects (Central UART and Peripheral UART) to interact with UART2 and not with UART0?
Thanks