Hi Dev Team,
I have been trying to send data across from my nRF9160DK board to an external sensor via RS-485. For this, I have a TTL_RS485 converter in between.
To start off with, I just want to send a string and receive it on an external debugger to check my UART communication. I am using UART_2 and I am attaching my nrf9160dk_nrf9160ns.overlay file here. The wiring has been done based on uart_2 configuration.
/* Needed to get NRF_PWMn defined. */
/ {
model = "Nordic nRF9160 DK NRF9160";
compatible = "nordic,nrf9160-dk-nrf9160";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
};
};
&pwm1 {
status = "okay";
};
&pwm2 {
status = "okay";
};
&pwm3 {
status = "okay";
};
&uart1 {
current-speed = <9600>;
status = "okay";
tx-pin = <12>;
rx-pin = <13>;
rts-pin = <14>;
cts-pin = <15>;
};
&uart2 {
status = "okay";
current-speed = <9600>;
tx-pin = <10>;
rx-pin = <11>;
rts-pin = <16>;
cts-pin = <17>;
};
The same is in the SPM folder as nrf9160dk_nrf9160.overlay file.
The basic UART example in the master branch provides the structure to receive data from UART. Is there any particular example to send the data from the UART ?.
I tried following this thread : https://devzone.nordicsemi.com/f/nordic-q-a/44788/nrf9160-dk-send-receive-data-from-uart1/179149#179149 , but I get an error while trying to implement that code. The error I get is in Line 24 where k_fifo_get is defined. Is there any way to fix this issue ?
Is there any other example that shows how to transmit the strings externally through a UART (UART_2 in my case).
Regards,
Adeel.

