Hi Ben,
There is an example of 1-Wire for BluePill (stm32f104-minimum) using
the DS18B20 temperature sensor.
All you need to do it:
$ ./tools/configure.sh stm32f103-minimum:sensors
$ make menuconfig
Enable CONFIG_TESTING_SENSORTEST
$ make
Flash the firmware nuttx.bin in your board
Wire the sensor as explained at boards/arm/stm32/stm32f103-minimum/README.txt
It suggests to use a 4k7 resistor, but I used with 10k resistor and
worked fine. Any pull-up resistor from 1k to 10k (maybe even higher)
should work.
You can test this way:
nsh> ls /dev/sensor
/dev/sensor:
humi0
temp0
temp1
nsh> sensortest temp1
SensorTest: Test /dev/sensor/temp1 with interval(100us),
latency(0us)
temp1: timestamp:1823 value:23.25
temp1: timestamp:1903 value:23.19
temp1: timestamp:1981 value:23.19
temp1: timestamp:2059 value:23.19
temp1: timestamp:2137 value:23.19
temp1: timestamp:2215 value:23.19
temp1: timestamp:2293 value:23.19
temp1: timestamp:2371 value:23.13
BR,
Alan
On 6/19/21, disruptivesolution...@gmail.com
wrote:
> Hello,
>
>
>
> I see some info searching Google about the 1-Wire (through USART)
> implementation for NuttX. It seems there is a driver for it for use through
> U(S)ART.
>
>
>
> Did someone already have implemented STM32 for it? src/stm32_1wire.c (or
> something) how I could initialize this driver?
>
>
>
> I appreciate any help you can provide.
>
> Ben
>
>