-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Zephyr main efr32bg22 support #35361
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
Closed
sateeshkotapati
wants to merge
16
commits into
zephyrproject-rtos:main
from
sateeshkotapati:zephyr_main_efr32bg22_support
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3eea572
boards: Add support for Silicon Labs' EFR32BG22-SLTB010A board
sateeshkotapati 9b856d5
soc: silabs_exx32: Add support for SiLabs EFR32BG22 SoC
sateeshkotapati ca31109
drivers: gecko: Add/modify support for EFR32BG22 drivers
sateeshkotapati 988ab39
west.yml: Update hal_silabs module
sateeshkotapati dfed671
drivers: hwinfo: gecko: Fix RMU_RST build error for efr32bg22-sltb010a
sateeshkotapati 9b4c249
pinctrl: Add Silabs Gecko implementation
sateeshkotapati 6073101
boards: Add support for Silicon Labs' EFR32BG22-SLTB010A board
sateeshkotapati d3874e8
drivers: gecko: Add/modify support for EFR32BG22 drivers
sateeshkotapati 9cc76a2
soc: silabs_exx32: Add support for SiLabs EFR32BG22 SoC
sateeshkotapati c3ff5f6
Updated formatting for checkpatch
smalae 3988994
soc: silabs_exx32: Add support for SiLabs EFR32BG22 SoC
sateeshkotapati eee42f1
drivers: gecko: Add/modify support for EFR32BG22 drivers
sateeshkotapati 86c063f
drivers: gecko: Add/modify support for EFR32BG22 drivers
sateeshkotapati c7c855f
soc: silabs_exx32: Add support for SiLabs EFR32BG22 SoC
sateeshkotapati 73d817b
Updated formatting for checkpatch
smalae 05e36a9
tests: kernel: profiling: Exclude EFR32BG22-SLTB010A board
sateeshkotapati 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
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,7 @@ | ||
| # Copyright (c) 2021 Sateesh Kotapati | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if(CONFIG_UART_GECKO) | ||
| zephyr_library() | ||
| zephyr_library_sources(board.c) | ||
| endif() |
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,12 @@ | ||
| # EFR32BG SLTB010A board | ||
|
|
||
| # Copyright (c) 2022, Silicon Labs | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if BOARD_EFR32BG_SLTB010A | ||
|
|
||
| module = BOARD_EFR32BG22 | ||
| module-str = Board Control | ||
| source "subsys/logging/Kconfig.template.log_config" | ||
|
|
||
| endif # BOARD_EFR32BG_SLTB010A |
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,9 @@ | ||
| # EFR32BG SLTB010A board | ||
|
|
||
| # Copyright (c) 2021, Sateesh Kotapati | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config BOARD_EFR32BG_SLTB010A | ||
| bool "SiLabs EFR32BG-SLTB010A (Thunderboard BG22)" | ||
| depends on SOC_SERIES_EFR32BG22 | ||
| select SOC_PART_NUMBER_EFR32BG22C224F512IM40 |
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,21 @@ | ||
| # EFR32BG SLTB010A board | ||
|
|
||
| # Copyright (c) 2021, Sateesh Kotapati | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if BOARD_EFR32BG_SLTB010A | ||
|
|
||
| config BOARD | ||
| default "efr32bg_sltb010a" | ||
|
|
||
| config CMU_HFXO_FREQ | ||
| default 40000000 | ||
|
|
||
| config CMU_LFXO_FREQ | ||
| default 32768 | ||
|
|
||
| config UART_GECKO | ||
| default y | ||
| depends on SERIAL | ||
|
|
||
| endif # BOARD_EFR32BG_SLTB010A |
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,31 @@ | ||
| /* | ||
| * Copyright (c) 2021 Sateesh Kotapati | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #include <zephyr/init.h> | ||
| #include <zephyr/drivers/gpio.h> | ||
| #include <zephyr/sys/printk.h> | ||
| #include <zephyr/logging/log.h> | ||
|
|
||
| LOG_MODULE_REGISTER(efr32bg_sltb010a, CONFIG_BOARD_EFR32BG22_LOG_LEVEL); | ||
|
|
||
| static int efr32bg_sltb010a_init(const struct device *dev) | ||
| { | ||
| const struct gpio_dt_spec vcen_dev = | ||
| GPIO_DT_SPEC_GET(DT_ALIAS(vcomenable), gpios); | ||
|
|
||
| ARG_UNUSED(dev); | ||
|
|
||
| if (!device_is_ready(vcen_dev.port)) { | ||
| LOG_ERR("Virtual COM Port Enable device was not found!\n"); | ||
| return -ENODEV; | ||
| } | ||
| gpio_pin_configure_dt(&vcen_dev, GPIO_OUTPUT_HIGH); | ||
|
|
||
| return 0; | ||
| } | ||
|
|
||
| /* needs to be done after GPIO driver init */ | ||
| SYS_INIT(efr32bg_sltb010a_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); |
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,7 @@ | ||
| # Copyright (c) 2021, Sateesh Kotapati | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
|
|
||
| board_runner_args(jlink "--device=EFR32BG22C224F512IM40" "--reset-after-load") | ||
| include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) |
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,184 @@ | ||
| .. _efr32bg_sltb010a: | ||
|
|
||
| EFR32BG-SLTB010A | ||
| ################ | ||
|
|
||
| Overview | ||
| ******** | ||
|
|
||
| The EFR32™ Blue Gecko Starter Kit EFR32BG-SLTB010A (a.k.a Thunderboard EFR32BG22) | ||
| contains a MCU from the EFR32BG family built on ARM® Cortex®-M33F | ||
| processor with low power capabilities. | ||
|
|
||
| .. image:: ./efr32bg_sltb010a.jpg | ||
| :align: center | ||
| :alt: EFR32BG-SLTB010A | ||
|
|
||
| Hardware | ||
| ******** | ||
sateeshkotapati marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - EFR32BG22 Blue Gecko Wireless SoC with upto 76.8 MHz operating frequency | ||
| - ARM® Cortex® M33 core with 32 kB RAM and 512 kB Flash | ||
| - Macronix ultra low power 8-Mbit SPI flash (MX25R8035F) | ||
| - 2.4 GHz ceramic antenna for wireless transmission | ||
| - Silicon Labs Si7021 relative humidity and temperature sensor | ||
| - Silicon Labs Si1133 UV index and ambient light sensor | ||
| - Silicon Labs Si7210 hall effect sensor | ||
| - TDK InvenSense ICM-20648 6-axis inertial sensor | ||
| - One LED and one push button | ||
| - Power enable signals and isolation switches for ultra low power operation | ||
| - On-board SEGGER J-Link debugger for easy programming and debugging, which | ||
| includes a USB virtual COM port and Packet Trace Interface (PTI) | ||
| - Mini Simplicity connector for access to energy profiling and advanced wireless | ||
| network debugging | ||
| - Breakout pads for GPIO access and connection to external hardware | ||
| - Reset button | ||
| - Automatic switch-over between USB and battery power | ||
| - CR2032 coin cell holder and external battery connector | ||
|
|
||
| For more information about the EFR32BG SoC and Thunderboard EFR32BG22 | ||
| (EFR32BG-SLTB010A) board: | ||
|
|
||
| - `EFR32BG22 Website`_ | ||
| - `EFR32BG22 Datasheet`_ | ||
| - `EFR32xG22 Reference Manual`_ | ||
| - `EFR32BG22-SLTB010A Website`_ | ||
| - `EFR32BG22-SLTB010A User Guide`_ | ||
| - `EFR32BG22-SLTB010A Schematics`_ | ||
|
|
||
| Supported Features | ||
| ================== | ||
|
|
||
| The efr32bg_sltb010a board configuration supports the following hardware features: | ||
|
|
||
| +-----------+------------+-------------------------------------+ | ||
| | Interface | Controller | Driver/Component | | ||
| +===========+============+=====================================+ | ||
| | MPU | on-chip | memory protection unit | | ||
| +-----------+------------+-------------------------------------+ | ||
| | NVIC | on-chip | nested vector interrupt controller | | ||
| +-----------+------------+-------------------------------------+ | ||
| | SYSTICK | on-chip | systick | | ||
| +-----------+------------+-------------------------------------+ | ||
| | COUNTER | on-chip | stimer | | ||
| +-----------+------------+-------------------------------------+ | ||
| | FLASH | on-chip | flash memory | | ||
| +-----------+------------+-------------------------------------+ | ||
| | GPIO | on-chip | gpio | | ||
| +-----------+------------+-------------------------------------+ | ||
| | UART | on-chip | serial | | ||
| +-----------+------------+-------------------------------------+ | ||
| | WATCHDOG | on-chip | watchdog | | ||
| +-----------+------------+-------------------------------------+ | ||
| | TRNG | on-chip | true random number generator | | ||
| +-----------+------------+-------------------------------------+ | ||
|
|
||
| The default configuration can be found in the defconfig file: | ||
| ``boards/arm/efr32bg_sltb010a/efr32bg_sltb010a_defconfig``. | ||
|
|
||
| Other hardware features are currently not supported by the port. | ||
|
|
||
| Connections and IOs | ||
| =================== | ||
|
|
||
| The EFR32BG SoC has six gpio controllers (PORTA, PORTB, PORTC, PORTD, | ||
| PORTE and PORTF). | ||
|
|
||
| In the following table, the column Name contains Pin names. For example, PE2 | ||
| means Pin number 2 on PORTE and #27 represents the location bitfield , as used | ||
| in the board's and microcontroller's datasheets and manuals. | ||
|
|
||
| +------+-------------+-----------------------------------+ | ||
| | Name | Function | Usage | | ||
| +======+=============+===================================+ | ||
| | PB0 | GPIO | LED0 (RED) | | ||
| +------+-------------+-----------------------------------+ | ||
| | PB1 | GPIO | SW0 Push Button PB0 | | ||
| +------+-------------+-----------------------------------+ | ||
| | PA5 | UART_TX | UART TX Console VCOM_TX US1_TX #1 | | ||
| +------+-------------+-----------------------------------+ | ||
| | PA6 | UART_RX | UART RX Console VCOM_RX US1_RX #1 | | ||
| +------+-------------+-----------------------------------+ | ||
|
|
||
| System Clock | ||
| ============ | ||
|
|
||
| The EFR32BG SoC is configured to use the 38.4 MHz external oscillator on the | ||
| board. | ||
|
|
||
| Serial Port | ||
| =========== | ||
|
|
||
| The EFR32BG22 SoC has two USARTs. | ||
| USART1 is connected to the board controller and is used for the console. | ||
|
|
||
| Programming and Debugging | ||
| ************************* | ||
|
|
||
| .. note:: | ||
| Before using the kit the first time, you should update the J-Link firmware | ||
| from `J-Link-Downloads`_ | ||
|
|
||
| Flashing | ||
| ======== | ||
|
|
||
| The EFR32BG-SLTB010A includes an `J-Link`_ serial and debug adaptor built into the | ||
| board. The adaptor provides: | ||
|
|
||
| - A USB connection to the host computer, which exposes a Mass Storage and a | ||
| USB Serial Port. | ||
| - A Serial Flash device, which implements the USB flash disk file storage. | ||
| - A physical UART connection which is relayed over interface USB Serial port. | ||
|
|
||
| Flashing an application to EFR32BG-SLTB010A | ||
| ------------------------------------------- | ||
|
|
||
| The sample application :ref:`hello_world` is used for this example. | ||
| Build the Zephyr kernel and application: | ||
|
|
||
| .. zephyr-app-commands:: | ||
| :zephyr-app: samples/hello_world | ||
| :board: efr32bg_sltb010a | ||
| :goals: build | ||
|
|
||
| Connect the EFR32BG-SLTB010A to your host computer using the USB port and you | ||
| should see a USB connection. | ||
|
|
||
| Open a serial terminal (minicom, putty, etc.) with the following settings: | ||
|
|
||
| - Speed: 115200 | ||
| - Data: 8 bits | ||
| - Parity: None | ||
| - Stop bits: 1 | ||
|
|
||
| Reset the board and you should be able to see on the corresponding Serial Port | ||
| the following message: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| Hello World! efr32bg_sltb010a | ||
|
|
||
|
|
||
| .. _EFR32BG22-SLTB010A Website: | ||
| https://www.silabs.com/development-tools/thunderboard/thunderboard-bg22-kit | ||
|
|
||
| .. _EFR32BG22-SLTB010A User Guide: | ||
| https://www.silabs.com/documents/public/user-guides/ug415-sltb010a-user-guide.pdf | ||
|
|
||
| .. _EFR32BG22-SLTB010A Schematics: | ||
| https://www.silabs.com/documents/public/schematic-files/BRD4184A-A01-schematic.pdf | ||
|
|
||
| .. _EFR32BG22 Website: | ||
| https://www.silabs.com/wireless/bluetooth/efr32bg22-series-2-socs | ||
|
|
||
| .. _EFR32BG22 Datasheet: | ||
| https://www.silabs.com/documents/public/data-sheets/efr32bg22-datasheet.pdf | ||
|
|
||
| .. _EFR32xG22 Reference Manual: | ||
| https://www.silabs.com/documents/public/reference-manuals/efr32xg22-rm.pdf | ||
|
|
||
| .. _J-Link: | ||
| https://www.segger.com/jlink-debug-probes.html | ||
|
|
||
| .. _J-Link-Downloads: | ||
| https://www.segger.com/downloads/jlink | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think, that this is a good idea to add yourself as maintainer without additional approvement from main dev group. @galak?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to get additional approval from main dev group? It gave "check patch error" when I don't add myself here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please read this doc first to understand responsibilities: https://docs.zephyrproject.org/latest/development_process/project_roles.html
But I would say, that in your case the root of the problem is somewhere else.