Working with 1-wire bus on nRF5340

Hi there!

I'm trying to make the DS18b20 sensor work with nRF5340 under nRF Connect SDK. 
I tried a Zephyr example (ncs/zephyr/samples/sensor/ds18b20), and, after some debugging, it worked fine, I got the temperature values.


After porting all 1-wire-related changes (device tree, prj.conf, changes in sources) to openthread/cli_mqtt-sn example, I get stuck. All that I got is a errors from the Zephyr 1-wire driver:
<err> w1_serial: tx_rx_error reset_present
[00:19:41.145,965] <err> DS18B20: No 1-Wire slaves connected

But, on the same board, with the same connections, the example from Zephyr works fine, so it is not about the not connected device.
I think UART1 is actually not working. I tried to connect an oscilloscope - and with vanilla Zephyr example, we got something on the 1-wire bus (which is actually uart RX and TX connected together), and with modified Nordic Openthread CLI example we have nothing on the bus:

Zephyr vanilla:
1-wire bus with Zephyr example

Modified Nordic:

I bring all 1-wire and uart-related stuff from the Zephyr example to the Nordic one, and .config files in build/zephyr look the same in UART 1 part.
But, for some reason, with the Nordic example, it doesn't work...

Can you please point me to a working Nordic nRF Connect-related example for a 1-wire bus, please?

Thanks in advance!

Parents Reply Children
No Data
Related