Div. Anpassungen
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
config BOARD_POOLTEMP
|
||||
select SOC_NRF52840_QIAA
|
||||
@@ -0,0 +1,2 @@
|
||||
config HW_STACK_PROTECTION
|
||||
default ARCH_HAS_STACK_PROTECTION
|
||||
@@ -0,0 +1,2 @@
|
||||
config PARTITION_MANAGER
|
||||
default n
|
||||
@@ -0,0 +1 @@
|
||||
&pinctrl {};
|
||||
106
firmware/boards/ItenEngineering/PoolTemp/PoolTemp.dts
Normal file
106
firmware/boards/ItenEngineering/PoolTemp/PoolTemp.dts
Normal file
@@ -0,0 +1,106 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include "PoolTemp-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Pool Thermometer";
|
||||
compatible = "ItenEngineering,PoolTemp";
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
zephyr,ieee802154 = &ieee802154;
|
||||
};
|
||||
|
||||
zephyr,user {
|
||||
io-channels = <&adc 0>;
|
||||
};
|
||||
|
||||
aliases {
|
||||
pooltemp = &ds18b20_sensor;
|
||||
};
|
||||
|
||||
sensor_power: regulator-sensor-power {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "sensor-power";
|
||||
enable-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
|
||||
startup-delay-us = <2000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
w1_0: w1-zephyr-gpio {
|
||||
compatible = "zephyr,w1-gpio";
|
||||
gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
||||
|
||||
ds18b20_sensor: ds18b20 {
|
||||
compatible = "maxim,ds18b20";
|
||||
family-code = <0x28>;
|
||||
resolution = <12>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ieee802154 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®1 {
|
||||
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* Battery voltage measurement via the internal VDD channel.
|
||||
* E73 modules are typically powered from VDD (not VDDH).
|
||||
*/
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x0 DT_SIZE_K(48)>;
|
||||
};
|
||||
|
||||
slot0_partition: partition@c000 {
|
||||
label = "image-0";
|
||||
reg = <0xc000 DT_SIZE_K(472)>;
|
||||
};
|
||||
|
||||
slot1_partition: partition@82000 {
|
||||
label = "image-1";
|
||||
reg = <0x82000 DT_SIZE_K(472)>;
|
||||
};
|
||||
|
||||
storage_partition: partition@f8000 {
|
||||
label = "storage";
|
||||
reg = <0xf8000 DT_SIZE_K(32)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
zephyr,gain = "ADC_GAIN_1_6";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 40)>;
|
||||
zephyr,resolution = <12>;
|
||||
zephyr,input-positive = <NRF_SAADC_VDD>;
|
||||
};
|
||||
};
|
||||
10
firmware/boards/ItenEngineering/PoolTemp/PoolTemp.yaml
Normal file
10
firmware/boards/ItenEngineering/PoolTemp/PoolTemp.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
identifier: PoolTemp/nrf52840
|
||||
name: Pool Thermometer
|
||||
vendor: ItenEngineering
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 256
|
||||
flash: 472
|
||||
toolchain:
|
||||
- zephyr
|
||||
supported: []
|
||||
@@ -0,0 +1,3 @@
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
|
||||
9
firmware/boards/ItenEngineering/PoolTemp/board.cmake
Normal file
9
firmware/boards/ItenEngineering/PoolTemp/board.cmake
Normal file
@@ -0,0 +1,9 @@
|
||||
set(OPENOCD_NRF5_SUBFAMILY "nrf52")
|
||||
board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=1000")
|
||||
board_runner_args(pyocd "--target=nrf52840" "--frequency=1000000")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
||||
6
firmware/boards/ItenEngineering/PoolTemp/board.yml
Normal file
6
firmware/boards/ItenEngineering/PoolTemp/board.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
board:
|
||||
name: PoolTemp
|
||||
full_name: PoolTemp
|
||||
vendor: ItenEngineering
|
||||
socs:
|
||||
- name: nrf52840
|
||||
@@ -0,0 +1,2 @@
|
||||
# Suppress "unique_unit_address_if_enabled" to handle some overlaps
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
||||
@@ -2,6 +2,30 @@
|
||||
zephyr,user {
|
||||
io-channels = <&adc 0>;
|
||||
};
|
||||
|
||||
aliases {
|
||||
pooltemp = &ds18b20_sensor;
|
||||
};
|
||||
|
||||
sensor_power: regulator-sensor-power {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "sensor-power";
|
||||
enable-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; // Check your supply pin here.
|
||||
startup-delay-us = <2000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
w1_0: w1-zephyr-gpio {
|
||||
compatible = "zephyr,w1-gpio";
|
||||
gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; // Check your data pin here.
|
||||
|
||||
ds18b20_sensor: ds18b20 {
|
||||
compatible = "maxim,ds18b20";
|
||||
family-code = <0x28>;
|
||||
resolution = <12>;
|
||||
// Removed: supply-gpios = <&sensor_power>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
@@ -12,9 +36,9 @@
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
zephyr,gain = "ADC_GAIN_1_6";
|
||||
zephyr,reference = "ADC_REF_INTERNAL"; // Intern 0.6V
|
||||
zephyr,reference = "ADC_REF_INTERNAL"; // Internal 0.6 V
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,input-positive = <NRF_SAADC_VDD>; // Hier greift er intern VDD ab!
|
||||
zephyr,input-positive = <NRF_SAADC_VDD>; // This reads VDD internally.
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user