Hallo zusammen,
ich habe bis jetzt Zephyr-CAN Erfahrung mit dem NRF52840 und einem
MCP2515 am SPI. Jetzt wollte ich mal an einer Blue Pill+
(https://github.com/WeActStudio/BluePill-Plus) den integrierten CAN
controller ausprobieren (zephyr can babbling sample). Allerdings weiss
ich nicht, wie das pinctrl ausschauen soll, damit ich CANRX/TX auf PB8
und PB9 kriege.
stm32_min_dev_stm32f103xb_blue.overlay:
1 | / {
|
2 | model = "STM32 Minimum Development Board (Blue)";
|
3 | compatible = "stm32_min_dev_blue", "st,stm32f103c8";
|
4 |
|
5 | leds {
|
6 | led: led {
|
7 | gpios = <&gpiob 2 GPIO_ACTIVE_LOW>;
|
8 | };
|
9 | };
|
10 | chosen {
|
11 | zephyr,canbus = &can1;
|
12 | };
|
13 | };
|
14 |
|
15 | &can1 {
|
16 | status = "okay";
|
17 | };
|
Da meckert west natürlich:
1 | $ west build -b stm32_min_dev@blue
|
2 | -- west build: generating a build system
|
3 | Loading Zephyr default modules (Zephyr base (cached)).
|
4 | -- Application: /home/edi/zephyrproject/projects/babbling
|
5 | -- CMake version: 3.30.2
|
6 | -- Cache files will be written to: /home/edi/.cache/zephyr
|
7 | -- Zephyr version: 3.7.99 (/home/edi/zephyrproject/zephyr)
|
8 | -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
|
9 | -- Board: stm32_min_dev, Revision: blue, qualifiers: stm32f103xb
|
10 | -- Found host-tools: zephyr 0.16.8 (/home/edi/zephyr-sdk-0.16.8)
|
11 | -- Found toolchain: zephyr 0.16.8 (/home/edi/zephyr-sdk-0.16.8)
|
12 | -- Found BOARD.dts: /home/edi/zephyrproject/zephyr/boards/others/stm32_min_dev/stm32_min_dev.dts
|
13 | -- Found devicetree overlay: /home/edi/zephyrproject/zephyr/boards/others/stm32_min_dev/stm32_min_dev_stm32f103xb_blue.overlay
|
14 | -- Found devicetree overlay: /home/edi/zephyrproject/projects/babbling/stm32_min_dev_stm32f103xb_blue.overlay
|
15 | -- In: /home/edi/zephyrproject/projects/babbling/build/zephyr, command: /usr/bin/python3;/home/edi/zephyrproject/zephyr/scripts/dts/gen_defines.py;--dts;/home/edi/zephyrproject/projects/babbling/build/zephyr/zephyr.dts.pre;--dtc-flags;'';--bindings-dirs;/home/edi/zephyrproject/zephyr/dts/bindings;--header-out;/home/edi/zephyrproject/projects/babbling/build/zephyr/include/generated/zephyr/devicetree_generated.h.new;--dts-out;/home/edi/zephyrproject/projects/babbling/build/zephyr/zephyr.dts.new;--edt-pickle-out;/home/edi/zephyrproject/projects/babbling/build/zephyr/edt.pickle;--vendor-prefixes;/home/edi/zephyrproject/zephyr/dts/bindings/vendor-prefixes.txt
|
16 | CMake Error at /home/edi/zephyrproject/zephyr/cmake/modules/dts.cmake:311 (message):
|
17 | gen_defines.py failed with result code: 1 - stderr contents:
|
18 |
|
19 | devicetree error: 'pinctrl-0' is marked as required in 'properties:' in
|
20 | /home/edi/zephyrproject/zephyr/dts/bindings/can/st,stm32-bxcan.yaml, but
|
21 | does not appear in <Node /soc/can@40006400 in
|
22 | '/home/edi/zephyrproject/zephyr/misc/empty_file.c'>
|
23 |
|
24 | Call Stack (most recent call first):
|
25 | /home/edi/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
|
26 | /home/edi/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
|
27 | /home/edi/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
|
28 | CMakeLists.txt:4 (find_package)
|
29 |
|
30 |
|
31 | -- Configuring incomplete, errors occurred!
|
32 | FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/edi/zephyrproject/projects/babbling/build -GNinja -S/home/edi/zephyrproject/projects/babbling
|
Kann mich da mal jemand in die richtige Richtung schubbsen? Ich brauche
wohl was in der Richtung von
1 | can1_rx_pb8: can1_rx_pb8 {
|
2 | pinmux = <STM32_PINMUX('B', 8, AF7)>;
|
3 | };
|
4 | can1_tx_pb9: can1_tx_pb9 {
|
5 | pinmux = <STM32_PINMUX('B', 9, AF7)>;
|
6 | };
|
Aber wie komme ich da auf die AF-Nummer? Ich habe im Datasheet und im
Manual nichts gefunden.
Danke und Gruss, Edi