-
Notifications
You must be signed in to change notification settings - Fork 8.3k
boards: others: add candleLight USB to CAN 2.0B adapter board #80953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nashif
merged 1 commit into
zephyrproject-rtos:main
from
henrikbrixandersen:candlelight
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Copyright (c) 2024 Henrik Brix Andersen <[email protected]> | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config BOARD_CANDLELIGHT | ||
| select SOC_STM32F072XB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Copyright (c) 2024 Henrik Brix Andersen <[email protected]> | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse") | ||
| board_runner_args(jlink "--device=STM32F072CB") | ||
|
|
||
| include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake) | ||
| include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| board: | ||
| name: candlelight | ||
| full_name: candleLight | ||
| vendor: others | ||
| socs: | ||
| - name: stm32f072xb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| /* | ||
| * Copyright (c) 2024 Henrik Brix Andersen <[email protected]> | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| #include <st/f0/stm32f072Xb.dtsi> | ||
| #include <st/f0/stm32f072c(8-b)tx-pinctrl.dtsi> | ||
|
|
||
| / { | ||
| model = "candleLight"; | ||
| compatible = "candlelight"; | ||
|
|
||
| chosen { | ||
| zephyr,sram = &sram0; | ||
| zephyr,flash = &flash0; | ||
| zephyr,code-partition = &slot0_partition; | ||
| zephyr,canbus = &can1; | ||
| }; | ||
|
|
||
| aliases { | ||
| led0 = &led_rx; | ||
| led1 = &led_tx; | ||
| }; | ||
|
|
||
| leds { | ||
| compatible = "gpio-leds"; | ||
| led_rx: led_rx { | ||
| gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; | ||
| label = "LED RX"; | ||
| }; | ||
| led_tx: led_tx { | ||
| gpios = <&gpioa 1 GPIO_ACTIVE_LOW>; | ||
| label = "LED TX"; | ||
| }; | ||
| }; | ||
|
|
||
| transceiver0: can-phy0 { | ||
| compatible = "nxp,tja1051", "can-transceiver-gpio"; | ||
| enable-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; | ||
| max-bitrate = <1000000>; | ||
| #phy-cells = <0>; | ||
| }; | ||
| }; | ||
|
|
||
| &clk_hsi { | ||
| status = "okay"; | ||
| clock-frequency = <DT_FREQ_M(8)>; | ||
| }; | ||
|
|
||
| &pll { | ||
| prediv = <1>; | ||
| mul = <6>; | ||
| clocks = <&clk_hsi>; | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &rcc { | ||
| clocks = <&pll>; | ||
| clock-frequency = <DT_FREQ_M(48)>; | ||
| ahb-prescaler = <1>; | ||
| apb1-prescaler = <1>; | ||
| }; | ||
|
|
||
| zephyr_udc0: &usb { | ||
| pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; | ||
| pinctrl-names = "default"; | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &can1 { | ||
| pinctrl-0 = <&can_rx_pb8 &can_tx_pb9>; | ||
| pinctrl-names = "default"; | ||
| phys = <&transceiver0>; | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &flash0 { | ||
| partitions { | ||
| compatible = "fixed-partitions"; | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
|
|
||
| boot_partition: partition@0 { | ||
| label = "mcuboot"; | ||
| reg = <0x00000000 DT_SIZE_K(48)>; | ||
| read-only; | ||
| }; | ||
| slot0_partition: partition@c000 { | ||
| label = "image-0"; | ||
| reg = <0x0000c000 DT_SIZE_K(80)>; | ||
| }; | ||
| }; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| identifier: candlelight | ||
| name: candleLight | ||
| type: mcu | ||
| arch: arm | ||
| toolchain: | ||
| - zephyr | ||
| - gnuarmemb | ||
| ram: 16 | ||
| flash: 128 | ||
| supported: | ||
| - can | ||
| - gpio | ||
| - usb_device | ||
| - usbd | ||
| vendor: others |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| CONFIG_GPIO=y |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| .. zephyr:board:: candlelight | ||
|
|
||
| Overview | ||
| ******** | ||
|
|
||
| The candleLight is an open-hardware USB to CAN 2.0B adapter board available from a number of | ||
| sources. | ||
|
|
||
| Hardware | ||
| ******** | ||
|
|
||
| The candleLight board is equipped with a STM32F072CB microcontroller and features an USB connector, | ||
| a DB-9M connector for the CAN bus, and two user LEDs. Schematics and component placement drawings | ||
| are available in the `candleLight GitHub repository`_. | ||
|
|
||
| Supported Features | ||
| ================== | ||
|
|
||
| The ``candlelight`` board configuration supports the following hardware features: | ||
|
|
||
| +-----------+------------+-------------------------------------+ | ||
| | Interface | Controller | Driver/Component | | ||
| +===========+============+=====================================+ | ||
| | NVIC | on-chip | nested vector interrupt controller | | ||
| +-----------+------------+-------------------------------------+ | ||
| | PINMUX | on-chip | pinmux | | ||
| +-----------+------------+-------------------------------------+ | ||
| | FLASH | on-chip | flash memory | | ||
| +-----------+------------+-------------------------------------+ | ||
| | GPIO | on-chip | gpio | | ||
| +-----------+------------+-------------------------------------+ | ||
| | USB | on-chip | USB | | ||
| +-----------+------------+-------------------------------------+ | ||
| | CAN1 | on-chip | CAN controller | | ||
| +-----------+------------+-------------------------------------+ | ||
|
|
||
| The default configuration can be found in the defconfig file: | ||
| :zephyr_file:`boards/others/candlelight/candlelight_defconfig`. | ||
|
|
||
| Other hardware features are not currently supported by the port. | ||
|
|
||
| System Clock | ||
| ============ | ||
|
|
||
| The STM32F072CB PLL is driven by the internal RC oscillator (HSI) running at 8 MHz and | ||
| configured to provide a system clock of 48 MHz. | ||
|
|
||
| Programming and Debugging | ||
| ************************* | ||
|
|
||
| Build and flash applications as usual (see :ref:`build_an_application` and | ||
| :ref:`application_run` for more details). | ||
|
|
||
| If flashing via USB DFU, short resistor ``R203`` when applying power to the candleLight in order to | ||
| enter the built-in DFU mode. | ||
|
|
||
| Here is an example for the :zephyr:code-sample:`blinky` application. | ||
|
|
||
| .. zephyr-app-commands:: | ||
| :zephyr-app: samples/basic/blinky | ||
| :board: candlelight | ||
| :goals: flash | ||
|
|
||
| .. _candleLight GitHub repository: | ||
| https://github.com/HubertD/candleLight |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.