text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```restructuredtext .. _samd21_xpro: SAM D21 Xplained Pro Evaluation Kit ################################### Overview ******** The SAM D21 Xplained Pro evaluation kit is ideal for evaluation and prototyping with the SAM D21 Cortex-M0+ processor-based microcontrollers. The kit includes Atmel's Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware. .. figure:: img/atsamd21_xpro.jpg :width: 500px :align: center :alt: SAMD21-XPRO SAMD21-XPRO (Credit: `Microchip Technology`_) Hardware ******** - SAMD21J18 ARM Cortex-M0+ processor at 48 MHz - 32.768 kHz crystal oscillator - 256 KiB flash memory and 32 KiB of RAM - One yellow user LED - One mechanical user push button - One reset button - On-board USB based EDBG unit with serial console Supported Features ================== The samd21_xpro board configuration supports the following hardware features: .. list-table:: :header-rows: 1 * - Interface - Controller - Driver / Component * - NVIC - on-chip - nested vector interrupt controller * - Flash - on-chip - Can be used with LittleFS to store files * - SYSTICK - on-chip - systick * - WDT - on-chip - Watchdog * - ADC - on-chip - Analog to Digital Converter * - GPIO - on-chip - I/O ports * - PWM - on-chip - Pulse Width Modulation * - USART - on-chip - Serial ports * - I2C - on-chip - I2C ports * - SPI - on-chip - Serial Peripheral Interface ports * - USB - on-chip - Universal Serial Bus device ports Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam0/samd21_xpro/samd21_xpro_defconfig`. Pin Mapping =========== The SAM D21 Xplained Pro evaluation kit has 3 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc. For more details please refer to `SAM D21 Family Datasheet`_ and the `SAM D21 Xplained Pro Schematic`_. .. image:: img/ATSAMD21-XPRO-pinout.jpg :align: center :alt: SAMD21-XPRO-pinout Default Zephyr Peripheral Mapping: ---------------------------------- - SERCOM0 USART TX : PA10 - SERCOM0 USART RX : PA11 - SERCOM1 USART TX : PA16 - SERCOM1 USART RX : PA19 - SERCOM2 I2C SDA : PA08 - SERCOM2 I2C SCL : PA09 - SERCOM3 USART TX : PA22 - SERCOM3 USART RX : PA23 - SERCOM5 SPI MISO : PB16 - SERCOM5 SPI MOSI : PB22 - SERCOM5 SPI SCK : PB23 - USB DP : PA25 - USB DM : PA24 - GPIO SPI CS : PB17 - GPIO/PWM LED0 : PB30 System Clock ============ The SAMD21 MCU is configured to use the 32.768 kHz external oscillator with the on-chip PLL generating the 48 MHz system clock. Serial Port =========== The SAMD21 MCU has six SERCOM based USARTs with three configured as USARTs in this BSP. SERCOM3 is the default Zephyr console. - SERCOM0 9600 8n1 - SERCOM1 115200 8n1 - SERCOM3 115200 8n1 connected to the onboard Atmel Embedded Debugger (EDBG) PWM === The SAMD21 MCU has 3 TCC based PWM units with up to 4 outputs each and a period of 24 bits or 16 bits. If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is driven by TCC0 instead of by GPIO. SPI Port ======== The SAMD21 MCU has 6 SERCOM based SPIs. On the SAM D21 Xplained Pro, SERCOM5 is connected to an 8 megabit SPI flash. Programming and Debugging ************************* The SAM D21 Xplained Pro comes with a Atmel Embedded Debugger (EDBG). This provides a debug interface to the SAMD21 chip and is supported by OpenOCD. Flashing ======== #. Build the Zephyr kernel and the ``hello_world`` sample application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: samd21_xpro :goals: build :compact: #. Connect the SAM D21 Xplained Pro to your host computer using the USB debug port. #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ minicom -D /dev/ttyACM0 -o The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows: - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. To flash an image: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: samd21_xpro :goals: flash :compact: You should see "Hello World! samd21_xpro" in your terminal. References ********** .. target-notes:: .. _Microchip Technology: path_to_url .. _SAM D21 Family Datasheet: path_to_url .. _SAM D21 Xplained Pro Schematic: path_to_url ```
/content/code_sandbox/boards/atmel/sam0/samd21_xpro/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,373
```ini source [find interface/cmsis-dap.cfg] transport select swd # chip name set CHIPNAME atsame54p20a set ENDIAN little set CPUTAPID 0x0bc11477 source [find target/atsame5x.cfg] reset_config none cortex_m reset_config sysresetreq $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/atmel/sam0/same54_xpro/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
126
```unknown /* * */ /dts-v1/; #include <atmel/same5xx20.dtsi> #include "same54_xpro-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "SAM E54 Xplained Pro"; compatible = "same54,xpro", "atmel,same54p20a", "atmel,same54"; chosen { zephyr,console = &sercom2; zephyr,shell-uart = &sercom2; zephyr,sram = &sram0; zephyr,flash = &flash0; }; /* These aliases are provided for compatibility with samples */ aliases { led0 = &led0; pwm-led0 = &pwm_led0; sw0 = &button0; i2c-0 = &sercom7; }; leds { compatible = "gpio-leds"; led0: led_0 { gpios = <&portc 18 GPIO_ACTIVE_LOW>; label = "Yellow LED"; }; }; pwmleds { compatible = "pwm-leds"; pwm_led0: pwm_led_0 { pwms = <&tcc0 2 PWM_MSEC(20)>; }; }; buttons { compatible = "gpio-keys"; button0: button_0 { gpios = <&portb 31 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; label = "SW0"; zephyr,code = <INPUT_KEY_0>; }; }; }; &cpu0 { clock-frequency = <120000000>; }; &tcc0 { status = "okay"; compatible = "atmel,sam0-tcc-pwm"; /* Gives a maximum period of 1.1s for 120MHz main clock */ prescaler = <8>; #pwm-cells = <2>; pinctrl-0 = <&pwm_default>; pinctrl-names = "default"; }; &sercom2 { status = "okay"; compatible = "atmel,sam0-uart"; current-speed = <115200>; rxpo = <1>; txpo = <0>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom2_uart_default>; pinctrl-names = "default"; }; &sercom4 { status = "okay"; compatible = "atmel,sam0-spi"; dipo = <3>; dopo = <0>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom4_spi_default>; pinctrl-names = "default"; }; &sercom7 { status = "okay"; compatible = "atmel,sam0-i2c"; clock-frequency = <I2C_BITRATE_FAST>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom7_i2c_default>; pinctrl-names = "default"; eeprom: eeprom@5e { compatible = "atmel,24mac402"; reg = <0x5e>; }; }; &adc0 { status = "okay"; }; zephyr_udc0: &usb0 { status = "okay"; pinctrl-0 = <&usb_dc_default>; pinctrl-names = "default"; }; &gmac { status = "okay"; pinctrl-0 = <&gmac_rmii>; pinctrl-names = "default"; mac-eeprom = <&eeprom>; phy-handle = <&phy>; }; &mdio { status = "okay"; pinctrl-0 = <&mdio_default>; pinctrl-names = "default"; phy: ethernet-phy@0 { compatible = "ethernet-phy"; status = "okay"; reg = <0>; }; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* * The final 16 KiB is reserved for the application. * Storage partition will be used by FCB/LittleFS/NVS * if enabled. */ storage_partition: partition@fc000 { label = "storage"; reg = <0x000fc000 0x00004000>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam0/same54_xpro/same54_xpro.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
995
```cmake include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19
```unknown /* */ #include <dt-bindings/pinctrl/samr21g-pinctrl.h> &pinctrl { pwm_default: pwm_default { group1 { pinmux = <PA19F_TCC0_WO3>; }; }; sercom1_i2c_default: sercom1_i2c_default { group1 { pinmux = <PA16C_SERCOM1_PAD0>, <PA17C_SERCOM1_PAD1>; }; }; sercom4_spi_default: sercom4_spi_default { group1 { pinmux = <PC19F_SERCOM4_PAD0>, <PB31F_SERCOM4_PAD1>, <PB30F_SERCOM4_PAD2>, <PC18F_SERCOM4_PAD3>; }; }; sercom5_spi_default: sercom5_spi_default { group1 { pinmux = <PB2D_SERCOM5_PAD0>, <PB22D_SERCOM5_PAD2>, <PB23D_SERCOM5_PAD3>; }; }; sercom0_uart_default: sercom0_uart_default { group1 { pinmux = <PA4D_SERCOM0_PAD0>, <PA5D_SERCOM0_PAD1>; }; }; usb_dc_default: usb_dc_default { group1 { pinmux = <PA25G_USB_DP>, <PA24G_USB_DM>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/samr21_xpro-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
325
```unknown config BOARD_SAMR21_XPRO select SOC_SAMR21G18A ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/Kconfig.samr21_xpro
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
21
```restructuredtext .. _same54_xpro: SAM E54 Xplained Pro Evaluation Kit ################################### Overview ******** The SAM E54 Xplained Pro evaluation kit is ideal for evaluation and prototyping with the SAM E54 Cortex-M4F processor-based microcontrollers. The kit includes Atmels Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware. .. image:: img/atsame54_xpro.jpg :align: center :alt: SAME54-XPRO Hardware ******** - SAME54P20A ARM Cortex-M4F processor at 120 MHz - 32.768 kHz crystal oscillator - 12 MHz crystal oscillator - 1024 KiB flash memory and 256 KiB of RAM - One yellow user LED - One mechanical user push button - One reset button - On-board USB based EDBG unit with serial console - One QTouch PTC button - 32 MiB QSPI Flash - ATECC508 CryptoAuthentication device - AT24MAC402 serial EEPROM with EUI-48 MAC address - Ethernet - RJ45 connector with built-in magnetics - KSZ8091RNA PHY - 10Base-T/100Base-TX IEE 802.3 compliant Ethernet transceiver - USB interface, host, and device - SD/SDIO card connector Supported Features ================== The same54_xpro board configuration supports the following hardware features: +---------------+------------+----------------------------+ | Interface | Controller | Driver/Component | +===============+============+============================+ | ADC | on-chip | adc | +---------------+------------+----------------------------+ | DAC | on-chip | dac | +---------------+------------+----------------------------+ | DMAC | on-chip | dma | +---------------+------------+----------------------------+ | EEPROM | i2c | eeprom, EUI-48 MAC Address | +---------------+------------+----------------------------+ | EIC | on-chip | interrupt_controller | +---------------+------------+----------------------------+ | GMAC | on-chip | ethernet, mdio | +---------------+------------+----------------------------+ | GPIO | on-chip | gpio | +---------------+------------+----------------------------+ | MPU | on-chip | arch/arm | +---------------+------------+----------------------------+ | NVIC | on-chip | arch/arm | +---------------+------------+----------------------------+ | NVMCTRL | on-chip | flash | +---------------+------------+----------------------------+ | PORT | on-chip | pinctrl | +---------------+------------+----------------------------+ | RTC | on-chip | timer | +---------------+------------+----------------------------+ | SERCOM I2C | on-chip | i2c | +---------------+------------+----------------------------+ | SERCOM SPI | on-chip | spi | +---------------+------------+----------------------------+ | SERCOM USART | on-chip | serial, console | +---------------+------------+----------------------------+ | Serial Number | on-chip | hwinfo | +---------------+------------+----------------------------+ | SYSTICK | on-chip | timer | +---------------+------------+----------------------------+ | TC | on-chip | counter | +---------------+------------+----------------------------+ | TCC | on-chip | counter, pwm | +---------------+------------+----------------------------+ | TRNG | on-chip | entropy | +---------------+------------+----------------------------+ | USB | on-chip | usb | +---------------+------------+----------------------------+ | WDT | on-chip | watchdog | +---------------+------------+----------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam0/same54_xpro/same54_xpro_defconfig`. Pin Mapping =========== The SAM E54 Xplained Pro evaluation kit has 4 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc. For more details please refer to `SAM D5x/E5x Family Datasheet`_ and the `SAM E54 Xplained Pro Schematic`_. .. image:: img/ATSAME54-XPRO-pinout.jpg :align: center :alt: SAME54-XPRO-pinout Default Zephyr Peripheral Mapping: ---------------------------------- - SERCOM2 USART TX : PB24 - SERCOM2 USART RX : PB25 - GPIO/PWM LED0 : PC18 - GPIO SW0 : PB31 - GMAC RMII REFCK : PA14 - GMAC RMII TXEN : PA17 - GMAC RMII TXD0 : PA18 - GMAC RMII TXD1 : PA19 - GMAC RMII CRSDV : PC20 - GMAC RMII RXD0 : PA13 - GMAC RMII RXD1 : PA12 - GMAC RMII RXER : PA15 - GMAC MDIO MDC : PC11 - GMAC MDIO MDIO : PC12 - SERCOM4 SPI SCK : PB26 - SERCOM4 SPI MOSI : PB27 - SERCOM4 SPI MISO : PB29 - SERCOM7 I2C SDA : PD08 - SERCOM7 I2C SCL : PD09 - USB DP : PA25 - USB DM : PA24 System Clock ============ The SAME54 MCU is configured to use the 32.768 kHz external oscillator with the on-chip PLL generating the 48 MHz system clock. Serial Port =========== The SAME54 MCU has 8 SERCOM based USARTs with one configured as USARTs in this BSP. SERCOM2 is the default Zephyr console. - SERCOM2 115200 8n1 connected to the onboard Atmel Embedded Debugger (EDBG) PWM === The SAME54 MCU has 5 TCC based PWM units with up to 6 outputs each and a period of 24 bits or 16 bits. If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is driven by TCC0 instead of by GPIO. SPI Port ======== The SAME54 MCU has 8 SERCOM based SPIs. I2C Port ======== The SAME54 MCU has 8 SERCOM based I2Cs. On the SAM E54 Xplained Pro, SERCOM7 is connected to a AT24MAC402 EEPROM and a ATECC508A Crypto Authentication device. Programming and Debugging ************************* The SAM E54 Xplained Pro comes with a Atmel Embedded Debugger (EDBG). This provides a debug interface to the SAME54 chip and is supported by OpenOCD. Flashing ======== #. Build the Zephyr kernel and the ``hello_world`` sample application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: same54_xpro :goals: build :compact: #. Connect the SAM E54 Xplained Pro to your host computer using the USB debug port. #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ minicom -D /dev/ttyACM0 -o The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows: - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. To flash an image: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: same54_xpro :goals: flash :compact: You should see "Hello World! same54_xpro" in your terminal. References ********** .. target-notes:: .. _Microchip website: path_to_url .. _SAM D5x/E5x Family Datasheet: path_to_url .. _SAM E54 Xplained Pro Schematic: path_to_url ```
/content/code_sandbox/boards/atmel/sam0/same54_xpro/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,804
```yaml identifier: samr21_xpro name: SAM R21 Xplained Pro type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 256 ram: 32 supported: - adc - flash - gpio - i2c - netif - pwm - spi - uart - usb_device - xpro_gpio - xpro_i2c - xpro_serial - xpro_spi vendor: atmel ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/samr21_xpro.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
132
```cmake # SPI is implemented via sercom so node name isn't spi@... list(APPEND EXTRA_DTC_FLAGS "-Wno-spi_bus_bridge") # Suppress "unique_unit_address_if_enabled" to handle the following overlaps: # - /soc/pinmux@41004400 & /soc/gpio@41004400 # - /soc/pinmux@41004480 & /soc/gpio@41004480 list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/pre_dt_board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
104
```unknown CONFIG_SOC_ATMEL_SAMD_XOSC32K=y CONFIG_SOC_ATMEL_SAMD_XOSC32K_AS_MAIN=y CONFIG_BUILD_OUTPUT_HEX=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y CONFIG_UART_INTERRUPT_DRIVEN=y ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/samr21_xpro_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56
```yaml board: name: samr21_xpro vendor: atmel socs: - name: samr21g18a ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown /* * */ /dts-v1/; #include <atmel/samr21.dtsi> #include <atmel/samx2xx18.dtsi> #include "samr21_xpro-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "SAM R21 Xplained Pro"; compatible = "samr21,xpro", "atmel,samr21g18a", "atmel,samr21"; chosen { zephyr,console = &sercom0; zephyr,shell-uart = &sercom0; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,ieee802154 = &ieee802154; }; /* These aliases are provided for compatibility with samples */ aliases { led0 = &led0; pwm-led0 = &pwm_led0; sw0 = &user_button; i2c-0 = &sercom1; }; leds { compatible = "gpio-leds"; led0: led_0 { gpios = <&porta 19 GPIO_ACTIVE_LOW>; label = "Yellow LED"; }; }; pwmleds { compatible = "pwm-leds"; pwm_led0: pwm_led_0 { pwms = <&tcc0 3 PWM_MSEC(20)>; }; }; buttons { compatible = "gpio-keys"; user_button: button_0 { gpios = <&porta 28 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; label = "SW0"; zephyr,code = <INPUT_KEY_0>; }; }; ext1_header: xplained-pro-connector1 { compatible = "atmel-xplained-pro-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &porta 6 0>, /* ADC6 */ <1 0 &porta 7 0>, /* ADC7 */ <2 0 &porta 13 0>, /* GPIO */ <3 0 &porta 28 0>, /* GPIO */ <4 0 &porta 18 0>, /* PWM_T0_W2 */ <5 0 &porta 19 0>, /* PWM_T0_W3 */ <6 0 &porta 22 0>, /* GPIO */ <7 0 &porta 23 0>, /* GPIO */ <8 0 &porta 16 0>, /* TWD1 EXT2 */ <9 0 &porta 17 0>, /* TWCK1 EXT2 */ <10 0 &porta 5 0>, /* RXD0 */ <11 0 &porta 4 0>, /* TXD0 */ <12 0 &portb 3 0>, /* SPI5(SS) */ <13 0 &portb 22 0>, /* SPI5(MOSI) EXTx */ <14 0 &portb 2 0>, /* SPI5(MISO) EXTx */ <15 0 &portb 23 0>; /* SPI5(SCK) EXTx */ }; ext2_header: xplained-pro-connector2 { compatible = "atmel-xplained-pro-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = /*<0 0 - - 0>, - */ /*<1 0 - - 0>, - */ <2 0 &porta 15 0>, /* GPIO */ /*<3 0 - - 0>, - */ /*<4 0 - - 0>, - */ /*<5 0 - - 0>, - */ /*<6 0 - - 0>, - */ <7 0 &porta 8 0>, /* GPIO */ <8 0 &porta 16 0>, /* TWD1 EXT1 */ <9 0 &porta 17 0>, /* TWCK1 EXT1 */ /*<11 0 - - 0>, - */ /*<12 0 - - 0>, - */ <12 0 &porta 14 0>, /* GPIO */ <13 0 &portb 22 0>, /* SPI5(MOSI) EXTx */ <14 0 &portb 2 0>, /* SPI5(MISO) EXTx */ <15 0 &portb 23 0>; /* SPI5(SCK) EXTx */ }; }; &cpu0 { clock-frequency = <48000000>; }; &tcc0 { status = "okay"; compatible = "atmel,sam0-tcc-pwm"; prescaler = <4>; #pwm-cells = <2>; pinctrl-0 = <&pwm_default>; pinctrl-names = "default"; }; &sercom0 { status = "okay"; compatible = "atmel,sam0-uart"; current-speed = <115200>; rxpo = <1>; txpo = <0>; pinctrl-0 = <&sercom0_uart_default>; pinctrl-names = "default"; }; &sercom1 { status = "okay"; compatible = "atmel,sam0-i2c"; clock-frequency = <I2C_BITRATE_FAST>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom1_i2c_default>; pinctrl-names = "default"; }; &sercom4 { status = "okay"; compatible = "atmel,sam0-spi"; /* * CS-PB31; MOSI-PB30; MISO-PC19; SCLK-PC18 * PAD[1]; PAD[2]; PAD[0]; PAD[3] */ dipo = <0>; dopo = <1>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom4_spi_default>; pinctrl-names = "default"; cs-gpios = <&portb 31 GPIO_ACTIVE_LOW>; ieee802154: rf2xx@0 { compatible = "atmel,rf2xx"; reg = <0x0>; spi-max-frequency = <6000000>; irq-gpios = <&portb 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; reset-gpios = <&portb 15 GPIO_ACTIVE_LOW>; slptr-gpios = <&porta 20 GPIO_ACTIVE_HIGH>; dig2-gpios = <&portb 17 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; status = "okay"; tx-pwr-min = [01 11]; /* -17.0 dBm */ tx-pwr-max = [00 04]; /* 4.0 dBm */ tx-pwr-table = [00 01 03 04 05 05 06 06 07 07 07 08 08 09 09 0a 0a 0a 0b 0b 0b 0b 0c 0c 0c 0c 0d 0d 0d 0d 0d 0d 0d 0d 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0e 0f 0f]; }; }; &sercom5 { status = "okay"; compatible = "atmel,sam0-spi"; dipo = <0>; dopo = <2>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom5_spi_default>; pinctrl-names = "default"; }; zephyr_udc0: &usb0 { status = "okay"; pinctrl-0 = <&usb_dc_default>; pinctrl-names = "default"; }; ext1_spi: &sercom5 { }; ext1_i2c: &sercom1 { }; ext1_serial: &sercom0 { }; ext2_spi: &sercom5 { }; ext2_i2c: &sercom1 { }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* * The final 16 KiB is reserved for the application. * Storage partition will be used by FCB/LittleFS/NVS * if enabled. */ storage_partition: partition@3c000 { label = "storage"; reg = <0x0003c000 0x00004000>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/samr21_xpro.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,176
```ini source [find interface/cmsis-dap.cfg] transport select swd # chip name set CHIPNAME at91samr21g18a set ENDIAN little set CPUTAPID 0x0bc11477 source [find target/at91samdXX.cfg] reset_config trst_and_srst separate $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
124
```cmake include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19
```unknown CONFIG_SOC_ATMEL_SAML_XOSC32K=y CONFIG_SOC_ATMEL_SAML_XOSC32K_AS_MAIN=y CONFIG_BUILD_OUTPUT_HEX=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y CONFIG_UART_INTERRUPT_DRIVEN=y ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/saml21_xpro_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56
```yaml identifier: saml21_xpro name: SAM L21 Xplained Pro type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 256 ram: 32 supported: - adc - counter - dma - gpio - i2c - pwm - spi - uart - usb_device - watchdog vendor: atmel ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/saml21_xpro.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
109
```yaml board: name: saml21_xpro vendor: atmel socs: - name: saml21j18b ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown /* * */ #include <dt-bindings/pinctrl/saml21j-pinctrl.h> &pinctrl { tcc0_default: tcc0_default { group1 { pinmux = <PB10F_TCC0_WO4>; }; }; sercom0_default: sercom0_default { group1 { pinmux = <PA4D_SERCOM0_PAD0>, <PA6D_SERCOM0_PAD2>, <PA7D_SERCOM0_PAD3>; }; }; sercom1_default: sercom1_default { group1 { pinmux = <PA18C_SERCOM1_PAD2>, <PA19C_SERCOM1_PAD3>; }; }; sercom2_default: sercom2_default { group1 { pinmux = <PA8D_SERCOM2_PAD0>, <PA9D_SERCOM2_PAD1>; }; }; sercom3_default: sercom3_default { group1 { pinmux = <PA22C_SERCOM3_PAD0>, <PA23C_SERCOM3_PAD1>; }; }; sercom4_default: sercom4_default { group1 { pinmux = <PB8D_SERCOM4_PAD0>, <PB9D_SERCOM4_PAD1>; }; }; sercom5_default: sercom5_default { group1 { pinmux = <PB16C_SERCOM5_PAD0>, <PB22D_SERCOM5_PAD2>, <PB23D_SERCOM5_PAD3>; }; }; usb0_default: usb0_default { group1 { pinmux = <PA24G_USB_DM>, <PA25G_USB_DP>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/saml21_xpro-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
397
```restructuredtext .. _samr21_xpro: SAM R21 Xplained Pro Evaluation Kit ################################### Overview ******** The SAM R21 Xplained Pro is a compact evaluation board by Atmel featuring a SAMR21G18A SoC. The SoC includes a SAMR21 ARM Cortex-M0+ micro-controller bundled with Atmel's AT86RF233, a 2.4GHz IEEE802.15.4 compatible radio. The kit includes Atmels Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware. .. image:: img/atsamr21_xpro.jpg :align: center :alt: SAMR21-XPRO Hardware ******** - SAMR21G18A ARM Cortex-M0+ processor at 48 MHz - 32.768 kHz crystal oscillator - 256 KiB flash memory and 32 KiB of RAM - One yellow user LED - One mechanical user push button - One reset button - On-board USB based EDBG unit with serial console Supported Features ================== The samr21_xpro board configuration supports the following hardware features: +-----------+------------+--------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+======================================+ | NVIC | on-chip | nested vector interrupt controller | +-----------+------------+--------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+--------------------------------------+ | WDT | on-chip | Watchdog | +-----------+------------+--------------------------------------+ | GPIO | on-chip | I/O ports | +-----------+------------+--------------------------------------+ | PWM | on-chip | Pulse Width Modulation | +-----------+------------+--------------------------------------+ | USART | on-chip | Serial ports | +-----------+------------+--------------------------------------+ | SPI | on-chip | Serial Peripheral Interface ports | +-----------+------------+--------------------------------------+ | I2C | on-chip | I2C Peripheral Interface ports | +-----------+------------+--------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam0/samr21_xpro/samr21_xpro_defconfig`. Pin Mapping =========== The SAM R21 Xplained Pro evaluation kit has 3 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc. For more details please refer to `SAM R21 Family Datasheet`_ and the `SAM R21 Xplained Pro Schematic`_. .. image:: img/ATSAMR21-XPRO-pinout.jpg :align: center :alt: SAMR21-XPRO-pinout Default Zephyr Peripheral Mapping: ---------------------------------- - SERCOM0 USART TX : PA5 - SERCOM0 USART RX : PA4 - SERCOM1 I2C SDA : PA16 - SERCOM1 I2C SCL : PA17 - SERCOM5 SPI MISO : PB02 - SERCOM5 SPI MOSI : PB22 - SERCOM5 SPI SCK : PB23 - GPIO SPI CS : PB03 - GPIO/PWM LED0 : PA19 System Clock ============ The SAMR21 MCU is configured to use the 32.768 kHz external oscillator with the on-chip PLL generating the 48 MHz system clock. Serial Port =========== The SAMR21 MCU has six SERCOM based USARTs with two configured as USARTs in this BSP. SERCOM0 is the default Zephyr console. - SERCOM0 115200 8n1 connected to the onboard Atmel Embedded Debugger (EDBG) PWM === The SAMR21 MCU has 3 TCC based PWM units with up to 4 outputs each and a period of 24 bits or 16 bits. If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is driven by TCC0 instead of by GPIO. SPI Port ======== The SAMR21 MCU has 6 SERCOM based SPIs. - SERCOM5 is exposed via Xplained Pro Standard Extension Header I2C Port ======== When connecting an I2C device and a logic analyzer to an I2C port at the same time, the internal pull-up resistors are not sufficient for stable bus operation. You probably have to connect external pull-ups to both bus lines. 10K is a good value to start with. - SERCOM1 is exposed via Xplained Pro Standard Extension Header Radio ===== The SAMR21 SoC includes an on-chip AT86RF233 radio. It is internally connected via SPI and some GPIO pins and behaves the same way as externally connected SPI devices. +-------------+your_sha256_hash--------------------------+ | Sensor | AT86RF233 | +=============+==========================================================================================+ | Type | 2.4GHz IEEE802.15.4 radio | +-------------+your_sha256_hash--------------------------+ | Vendor | Atmel | +-------------+your_sha256_hash--------------------------+ | Datasheet |`Datasheet <path_to_url`_| +-------------+your_sha256_hash--------------------------+ | connected to| SPI_0 | +-------------+your_sha256_hash--------------------------+ | Pin Config: | +-------------+your_sha256_hash--------------------------+ | Device | SERCOM4 | +-------------+your_sha256_hash--------------------------+ | MOSI | PB30 (OUT, SPI MOSI) | +-------------+your_sha256_hash--------------------------+ | MISO | PC19 (IN, SPI MISO) | +-------------+your_sha256_hash--------------------------+ | SCLK | PC18 (OUT, SPI SCLK) | +-------------+your_sha256_hash--------------------------+ | CS | PB31 (OUT, GPIO output) | +-------------+your_sha256_hash--------------------------+ | IRQ | PB00 (IN, GPIO external interrupt) | +-------------+your_sha256_hash--------------------------+ | RSTN | PB15 (OUT, GPIO output) | +-------------+your_sha256_hash--------------------------+ | SLP_TR | PA20 (OUT, GPIO output) | +-------------+your_sha256_hash--------------------------+ Zephyr provide several samples that can use this technology. You can check :zephyr:code-sample:`wpan-serial` example as starting points. Another good test can be done with IPv6 by using the server/client echo demo. More information at :zephyr:code-sample:`sockets-echo-server` and :zephyr:code-sample:`sockets-echo-client`. Programming and Debugging ************************* The SAM R21 Xplained Pro comes with a Atmel Embedded Debugger (EDBG). This provides a debug interface to the SAMR21 chip and is supported by OpenOCD. Flashing ======== #. Build the Zephyr kernel and the :ref:`hello_world` sample application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: samr21_xpro :goals: build :compact: #. Connect the SAM R21 Xplained Pro to your host computer using the USB debug port. #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ minicom -D /dev/ttyACM0 -o The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows: - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. To flash an image: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: samr21_xpro :goals: flash :compact: You should see "Hello World! samr21_xpro" in your terminal. References ********** .. target-notes:: .. _Microchip website: path_to_url .. _SAM R21 Family Datasheet: path_to_url .. _SAM R21 Xplained Pro Schematic: path_to_url ```
/content/code_sandbox/boards/atmel/sam0/samr21_xpro/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,828
```unknown /* * */ /dts-v1/; #include <atmel/saml21.dtsi> #include "saml21_xpro-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "SAM L21 Xplained Pro"; compatible = "saml21,xpro", "atmel,saml21j18b", "atmel,saml21"; chosen { zephyr,console = &sercom3; zephyr,shell-uart = &sercom3; zephyr,sram = &sram0; zephyr,flash = &flash0; }; /* These aliases are provided for compatibility with samples */ aliases { led0 = &led0; pwm-led0 = &pwm_led0; sw0 = &user_button; }; leds { compatible = "gpio-leds"; led0: led_0 { gpios = <&portb 10 GPIO_ACTIVE_LOW>; label = "Yellow LED"; }; }; pwmleds { compatible = "pwm-leds"; pwm_led0: pwm_led_0 { pwms = <&tcc0 0 PWM_MSEC(20)>; }; }; buttons { compatible = "gpio-keys"; user_button: button_0 { gpios = <&porta 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; label = "SW0"; zephyr,code = <INPUT_KEY_0>; }; }; }; &cpu0 { clock-frequency = <48000000>; }; &adc { status = "okay"; }; &tcc0 { status = "okay"; compatible = "atmel,sam0-tcc-pwm"; /* Gives a maximum period of 1.4s */ prescaler = <4>; #pwm-cells = <2>; pinctrl-0 = <&tcc0_default>; pinctrl-names = "default"; }; &sercom0 { status = "okay"; compatible = "atmel,sam0-spi"; dipo = <0>; dopo = <1>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom0_default>; pinctrl-names = "default"; }; &sercom1 { status = "okay"; compatible = "atmel,sam0-uart"; current-speed = <115200>; rxpo = <3>; txpo = <0>; pinctrl-0 = <&sercom1_default>; pinctrl-names = "default"; }; &sercom2 { status = "okay"; compatible = "atmel,sam0-i2c"; clock-frequency = <I2C_BITRATE_FAST>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom2_default>; pinctrl-names = "default"; }; &sercom3 { status = "okay"; compatible = "atmel,sam0-uart"; current-speed = <115200>; rxpo = <1>; txpo = <0>; pinctrl-0 = <&sercom3_default>; pinctrl-names = "default"; }; &sercom4 { status = "okay"; compatible = "atmel,sam0-uart"; current-speed = <115200>; rxpo = <1>; txpo = <0>; pinctrl-0 = <&sercom4_default>; pinctrl-names = "default"; }; &sercom5 { status = "okay"; compatible = "atmel,sam0-spi"; dipo = <0>; dopo = <1>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom5_default>; pinctrl-names = "default"; }; zephyr_udc0: &usb0 { status = "okay"; pinctrl-0 = <&usb0_default>; pinctrl-names = "default"; }; ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/saml21_xpro.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
898
```ini source [find interface/cmsis-dap.cfg] transport select swd # chip name set CHIPNAME at91saml21j18 set ENDIAN little set CPUTAPID 0x0bc11477 source [find target/at91samdXX.cfg] reset_config trst_and_srst separate $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
123
```unknown config BOARD_SAML21_XPRO select SOC_SAML21J18B ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/Kconfig.saml21_xpro
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19
```cmake include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19
```unknown /* * */ #include <dt-bindings/pinctrl/samr34j-pinctrl.h> &pinctrl { tcc0_default: tcc0_default { group1 { pinmux = <PA19F_TCC0_WO3>; }; }; sercom0_default: sercom0_default { group1 { pinmux = <PA4D_SERCOM0_PAD0>, <PA5D_SERCOM0_PAD1>; }; }; sercom1_default: sercom1_default { group1 { pinmux = <PA16C_SERCOM1_PAD0>, <PA17C_SERCOM1_PAD1>; }; }; sercom5_default: sercom5_default { group1 { pinmux = <PB2D_SERCOM5_PAD0>, <PB22D_SERCOM5_PAD2>, <PB23D_SERCOM5_PAD3>; }; }; usb0_default: usb0_default { group1 { pinmux = <PA24G_USB_DM>, <PA25G_USB_DP>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/samr34_xpro-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
249
```unknown config BOARD_SAMR34_XPRO select SOC_SAMR34J18B ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/Kconfig.samr34_xpro
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
21
```yaml board: name: samr34_xpro vendor: atmel socs: - name: samr34j18b ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown /* * */ /dts-v1/; #include <atmel/samr34.dtsi> #include "samr34_xpro-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "SAM R34 Xplained Pro"; compatible = "samr34,xpro", "atmel,samr34j18b", "atmel,samr34"; chosen { zephyr,console = &sercom0; zephyr,shell-uart = &sercom0; zephyr,sram = &sram0; zephyr,flash = &flash0; }; /* These aliases are provided for compatibility with samples */ aliases { led0 = &led0; pwm-led0 = &pwm_led0; sw0 = &user_button; }; leds { compatible = "gpio-leds"; led0: led_0 { gpios = <&porta 19 GPIO_ACTIVE_LOW>; label = "Yellow LED"; }; }; pwmleds { compatible = "pwm-leds"; pwm_led0: pwm_led_0 { pwms = <&tcc0 3 PWM_MSEC(20)>; }; }; buttons { compatible = "gpio-keys"; user_button: button_0 { gpios = <&porta 28 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; label = "SW0"; zephyr,code = <INPUT_KEY_0>; }; }; }; &cpu0 { clock-frequency = <48000000>; }; &adc { status = "okay"; }; &tcc0 { status = "okay"; compatible = "atmel,sam0-tcc-pwm"; /* Gives a maximum period of 1.4s */ prescaler = <4>; #pwm-cells = <2>; pinctrl-0 = <&tcc0_default>; pinctrl-names = "default"; }; &sercom0 { status = "okay"; compatible = "atmel,sam0-uart"; current-speed = <115200>; rxpo = <1>; txpo = <0>; pinctrl-0 = <&sercom0_default>; pinctrl-names = "default"; }; &sercom1 { status = "okay"; compatible = "atmel,sam0-i2c"; clock-frequency = <I2C_BITRATE_FAST>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom1_default>; pinctrl-names = "default"; }; /* SERCOM4 is used for the internal LoRa radio */ &sercom4 { status = "okay"; }; &lora { status = "okay"; tcxo-power-gpios = <&porta 9 GPIO_ACTIVE_HIGH>; /* TCXO_PWR */ tcxo-power-startup-delay-ms = <5>; rfi-enable-gpios = <&porta 13 GPIO_ACTIVE_HIGH>; /* BAND_SEL */ rfo-enable-gpios = <&porta 13 GPIO_ACTIVE_HIGH>; /* BAND_SEL */ }; &sercom5 { status = "okay"; compatible = "atmel,sam0-spi"; dipo = <0>; dopo = <1>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom5_default>; pinctrl-names = "default"; }; zephyr_udc0: &usb0 { status = "okay"; pinctrl-0 = <&usb0_default>; pinctrl-names = "default"; }; ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/samr34_xpro.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
811
```unknown CONFIG_SOC_ATMEL_SAML_XOSC32K=y CONFIG_SOC_ATMEL_SAML_XOSC32K_AS_MAIN=y CONFIG_BUILD_OUTPUT_HEX=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y CONFIG_UART_INTERRUPT_DRIVEN=y ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/samr34_xpro_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56
```restructuredtext .. _saml21_xpro: SAM L21 Xplained Pro Evaluation Kit ################################### Overview ******** The SAM L21 Xplained Pro evaluation kit is ideal for evaluation and prototyping with the SAM L21 Cortex-M0+ processor-based microcontrollers. The kit includes Atmels Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware. .. image:: img/atsaml21-xpro.jpg :align: center :alt: SAML21-XPRO Hardware ******** - SAML21J18 ARM Cortex-M0+ processor at 48 MHz - 32.768 kHz crystal oscillator - 256 KiB flash memory, 32 KiB of SRAM, 8KB Low Power SRAM - One yellow user LED - One mechanical user push button - One reset button - On-board USB based EDBG unit with serial console Supported Features ================== The saml21_xpro board configuration supports the following hardware features: .. list-table:: :header-rows: 1 * - Interface - Controller - Driver / Component * - NVIC - on-chip - nested vector interrupt controller * - Flash - on-chip - Can be used with LittleFS to store files * - SYSTICK - on-chip - systick * - WDT - on-chip - Watchdog * - GPIO - on-chip - I/O ports * - PWM - on-chip - Pulse Width Modulation * - USART - on-chip - Serial ports * - I2C - on-chip - I2C ports * - SPI - on-chip - Serial Peripheral Interface ports * - TRNG - on-chip - True Random Number Generator Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam0/saml21_xpro/saml21_xpro_defconfig`. Pin Mapping =========== The SAM L21 Xplained Pro evaluation kit has 2 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc. For more details please refer to `SAM L21 Family Datasheet`_ and the `SAM L21 Xplained Pro Schematic`_. .. image:: img/atsaml21-xpro-pinout.jpg :align: center :alt: SAML21-XPRO-pinout Default Zephyr Peripheral Mapping: ---------------------------------- - SERCOM0 SPI MISO : PA04 - SERCOM0 SPI MOSI : PA06 - SERCOM0 SPI SCK : PA07 - SERCOM1 USART TX : PA18 - SERCOM1 USART RX : PA19 - SERCOM2 I2C SDA : PA08 - SERCOM2 I2C SCL : PA09 - SERCOM3 USART TX : PA22 - SERCOM3 USART RX : PA23 - SERCOM4 USART TX : PB08 - SERCOM4 USART RX : PB09 - SERCOM5 SPI MISO : PB16 - SERCOM5 SPI MOSI : PB22 - SERCOM5 SPI SCK : PB23 - USB DP : PA25 - USB DM : PA24 - GPIO SPI CS : PB17 - GPIO/PWM LED0 : PB10 System Clock ============ The SAML21 MCU is configured to use the 32.768 kHz external oscillator with the on-chip PLL generating the 48 MHz system clock. Serial Port =========== The SAML21 MCU has six SERCOM based USARTs with two configured as USARTs in this BSP. SERCOM3 is the default Zephyr console. - SERCOM1 115200 8n1 - connected to EXT2 and EXT3 - SERCOM3 115200 8n1 - connected to the onboard Atmel Embedded Debugger (EDBG) - SERCOM4 115200 8n1 - connected to EXT1 PWM === The SAML21 MCU has 3 TCC based PWM units with up to 4 outputs each and a period of 24 bits or 16 bits. If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is driven by TCC0 instead of by GPIO. SPI Port ======== The SAML21 MCU has 6 SERCOM based SPIs, with two configured as SPI in this BSP. - SERCOM0 - connected to EXT1 - SERCOM5 - connected to EXT2 and EXT3 Programming and Debugging ************************* The SAM L21 Xplained Pro comes with a Atmel Embedded Debugger (EDBG). This provides a debug interface to the SAML21 chip and is supported by OpenOCD. Flashing ======== #. Build the Zephyr kernel and the ``hello_world`` sample application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: saml21_xpro :goals: build :compact: #. Connect the SAM L21 Xplained Pro to your host computer using the USB debug port. #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ picocom -b 115200 /dev/ttyACM0 - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. To flash an image: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: saml21_xpro :goals: flash :compact: You should see "Hello World! saml21_xpro" in your terminal. References ********** .. target-notes:: .. _Microchip website: path_to_url .. _SAM L21 Family Datasheet: path_to_url .. _SAM L21 Xplained Pro Schematic: path_to_url ```
/content/code_sandbox/boards/atmel/sam0/saml21_xpro/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,372
```ini source [find interface/cmsis-dap.cfg] transport select swd # chip name set CHIPNAME at91samr34j18 set ENDIAN little set CPUTAPID 0x0bc11477 source [find target/at91samdXX.cfg] reset_config trst_and_srst separate $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
123
```yaml identifier: samr34_xpro name: SAM R34 Xplained Pro type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 256 ram: 32 supported: - adc - counter - dma - gpio - i2c - pwm - spi - uart - usb_device - watchdog vendor: atmel ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/samr34_xpro.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
109
```cmake include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19
```unknown /* */ #include <dt-bindings/pinctrl/samd20jXab-pinctrl.h> &pinctrl { sercom2_i2c_default: sercom2_i2c_default { group1 { pinmux = <PA8D_SERCOM2_PAD0>, <PA9D_SERCOM2_PAD1>; }; }; sercom0_spi_default: sercom0_spi_default { group1 { pinmux = <PA4D_SERCOM0_PAD0>, <PA6D_SERCOM0_PAD2>, <PA7D_SERCOM0_PAD3>; }; }; sercom3_uart_default: sercom3_uart_default { group1 { pinmux = <PA25C_SERCOM3_PAD3>, <PA24C_SERCOM3_PAD2>; }; }; sercom4_uart_default: sercom4_uart_default { group1 { pinmux = <PB9D_SERCOM4_PAD1>, <PB8D_SERCOM4_PAD0>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/samd20_xpro-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
234
```unknown CONFIG_SOC_ATMEL_SAMD_XOSC32K=y CONFIG_SOC_ATMEL_SAMD_XOSC32K_AS_MAIN=y CONFIG_BUILD_OUTPUT_HEX=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y CONFIG_UART_INTERRUPT_DRIVEN=y ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/samd20_xpro_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56
```cmake # Suppress "unique_unit_address_if_enabled" to handle the following overlaps: # - /soc/pinmux@41004400 & /soc/gpio@41004400 # - /soc/pinmux@41004480 & /soc/gpio@41004480 list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/pre_dt_board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
74
```yaml identifier: samd20_xpro name: SAM D20 Xplained Pro type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 256 ram: 32 supported: - adc - flash - gpio - i2c - spi - uart - watchdog vendor: atmel ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/samd20_xpro.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
96
```yaml board: name: samd20_xpro vendor: atmel socs: - name: samd20j18 ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```unknown /* * */ /dts-v1/; #include <freq.h> #include <atmel/samd20.dtsi> #include <atmel/samx2xx18.dtsi> #include "samd20_xpro-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "SAM D20 Xplained Pro"; compatible = "samd20,xpro", "atmel,samd20j18", "atmel,samd20"; chosen { zephyr,console = &sercom3; zephyr,shell-uart = &sercom3; zephyr,sram = &sram0; zephyr,flash = &flash0; }; /* These aliases are provided for compatibility with samples */ aliases { led0 = &yellow_led; sw0 = &user_button; i2c-0 = &sercom2; }; leds { compatible = "gpio-leds"; yellow_led: led_0 { gpios = <&porta 14 GPIO_ACTIVE_LOW>; label = "LED0"; }; }; buttons { compatible = "gpio-keys"; user_button: button_0 { gpios = <&porta 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; label = "SW0"; zephyr,code = <INPUT_KEY_0>; }; }; }; &cpu0 { clock-frequency = <DT_FREQ_M(48)>; }; &sercom0 { status = "okay"; compatible = "atmel,sam0-spi"; dipo = <0>; dopo = <1>; #address-cells = <1>; #size-cells = <0>; cs-gpios = <&porta 5 GPIO_ACTIVE_LOW>; pinctrl-0 = <&sercom0_spi_default>; pinctrl-names = "default"; }; &sercom2 { status = "okay"; compatible = "atmel,sam0-i2c"; clock-frequency = <I2C_BITRATE_FAST>; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&sercom2_i2c_default>; pinctrl-names = "default"; }; &sercom3 { status = "okay"; compatible = "atmel,sam0-uart"; current-speed = <115200>; rxpo = <3>; txpo = <1>; pinctrl-0 = <&sercom3_uart_default>; pinctrl-names = "default"; }; &sercom4 { status = "okay"; compatible = "atmel,sam0-uart"; current-speed = <115200>; rxpo = <1>; txpo = <0>; pinctrl-0 = <&sercom4_uart_default>; pinctrl-names = "default"; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* * The final 16 KiB is reserved for the application. * Storage partition will be used by FCB/LittleFS/NVS * if enabled. */ storage_partition: partition@3c000 { label = "storage"; reg = <0x0003c000 0x00004000>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/samd20_xpro.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
747
```unknown config BOARD_SAMD20_XPRO select SOC_SAMD20J18 ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/Kconfig.samd20_xpro
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
18
```ini source [find interface/cmsis-dap.cfg] transport select swd # chip name set CHIPNAME at91samd20j18 set ENDIAN little set CPUTAPID 0x0bc11477 source [find target/at91samdXX.cfg] reset_config trst_and_srst separate $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
123
```restructuredtext .. _samr34_xpro: SAM R34 Xplained Pro Evaluation Kit ################################### Overview ******** The SAM R34 Xplained Pro evaluation kit is ideal for evaluation and prototyping with the SAM R34 Cortex-M0+ processor-based microcontrollers. The kit includes Atmels Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware. The SAMR34 and SAMR35 parts are produced as a System-in-Package (SiP), including both a SAML21 die, and a Semtech SX1276 LoRa radio die. This board is also referred to as DM320111. .. image:: img/atsamr34-xpro.jpg :align: center :alt: SAMR34-XPRO Hardware ******** - SAMR34J18 ARM Cortex-M0+ processor at 48 MHz - 32.768 kHz crystal oscillator - 256 KiB flash memory, 32 KiB of SRAM, 8KB Low Power SRAM - One yellow user LED - One mechanical user push button - One reset button - On-board USB based EDBG unit with serial console Supported Features ================== The samr34_xpro board configuration supports the following hardware features: .. list-table:: :header-rows: 1 * - Interface - Controller - Driver / Component * - NVIC - on-chip - nested vector interrupt controller * - Flash - on-chip - Can be used with LittleFS to store files * - SYSTICK - on-chip - systick * - WDT - on-chip - Watchdog * - GPIO - on-chip - I/O ports * - PWM - on-chip - Pulse Width Modulation * - USART - on-chip - Serial ports * - I2C - on-chip - I2C ports * - SPI - on-chip - Serial Peripheral Interface ports * - TRNG - on-chip - True Random Number Generator The following hardware features are supported by Zephyr, but not yet fully supported by the SOC: .. list-table:: :header-rows: 1 * - Interface - Controller - Driver / Component * - LoRa Radio - on-chip - Internal SX1276 LoRa Radio Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam0/samr34_xpro/samr34_xpro_defconfig`. Pin Mapping =========== The SAM R34 Xplained Pro evaluation kit has 3 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc. For more details please refer to `SAM R34 Family Datasheet`_ and the `SAM R34 Xplained Pro Schematic`_. .. image:: img/atsamr34-xpro-pinout.jpg :align: center :alt: SAMR34-XPRO-pinout Default Zephyr Peripheral Mapping: ---------------------------------- - SERCOM0 UART TX : PA04 - SERCOM0 UART RX : PA05 - SERCOM1 I2C SDA : PA16 - SERCOM1 I2C SCL : PA17 - SERCOM4 SPI MISO : PC19 - SERCOM4 SPI MOSI : PB30 - SERCOM4 SPI SCK : PC18 - SERCOM4 GPIO CS : PB31 - SERCOM5 SPI MISO : PB02 - SERCOM5 SPI MOSI : PB22 - SERCOM5 SPI SCK : PB23 - SERCOM5 GPIO CS0 : PA23 - SERCOM5 GPIO CS1 : PA14 - USB DP : PA25 - USB DM : PA24 - GPIO/PWM LED0 : PA19 System Clock ============ The SAMR34 MCU is configured to use the 32.768 kHz external oscillator with the on-chip PLL generating the 48 MHz system clock. Serial Port =========== The SAMR34 MCU has six SERCOM based USARTs with one configured as USART in this BSP. SERCOM0 is the default Zephyr console. - SERCOM0 115200 8n1 - connected to the onboard Atmel Embedded Debugger (EDBG) PWM === The SAMR34 MCU has 3 TCC based PWM units with up to 4 outputs each and a period of 24 bits or 16 bits. If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is driven by TCC0 instead of by GPIO. SPI Port ======== The SAMR34 MCU has 6 SERCOM based SPIs, with two configured as SPI in this BSP. - SERCOM4 - connected to the internal LoRa radio - SERCOM5 - connected to EXT1 and EXT3 Programming and Debugging ************************* The SAM R34 Xplained Pro comes with a Atmel Embedded Debugger (EDBG). This provides a debug interface to the SAMR34 chip and is supported by OpenOCD. Flashing ======== #. Build the Zephyr kernel and the ``hello_world`` sample application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: samr34_xpro :goals: build :compact: #. Connect the SAM R34 Xplained Pro to your host computer using the USB debug port. #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ picocom -b 115200 /dev/ttyACM0 - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. To flash an image: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: samr34_xpro :goals: flash :compact: You should see "Hello World! samr34_xpro" in your terminal. References ********** .. target-notes:: .. _Microchip website: path_to_url .. _SAM L21 Family Datasheet: path_to_url .. _SAM R34 Family Datasheet: path_to_url .. _SAM R34 Xplained Pro Schematic: path_to_url .. _Semtech SX1276: path_to_url ```
/content/code_sandbox/boards/atmel/sam0/samr34_xpro/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,479
```restructuredtext .. _samd20_xpro: SAM D20 Xplained Pro Evaluation Kit ################################### Overview ******** The SAM D20 Xplained Pro evaluation kit is ideal for evaluation and prototyping with the SAM D20 Cortex-M0+ processor-based microcontrollers. The kit includes Atmels Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware. .. figure:: img/atsamd20_xpro.jpg :width: 500px :align: center :alt: SAMD20-XPRO SAMD20-XPRO (Credit: `Microchip Technology`_) Hardware ******** - SAMD20J18 ARM Cortex-M0+ processor at 48 MHz - 32.768 kHz crystal oscillator - 256 KiB flash memory and 32 KiB of RAM - One yellow user LED - One mechanical user push button - One reset button - On-board USB based EDBG unit with serial console Supported Features ================== The samd20_xpro board configuration supports the following hardware features: .. list-table:: :header-rows: 1 * - Interface - Controller - Driver / Component * - NVIC - on-chip - nested vector interrupt controller * - Flash - on-chip - Can be used with LittleFS to store files * - SYSTICK - on-chip - systick * - WDT - on-chip - Watchdog * - ADC - on-chip - Analog to Digital Converter * - GPIO - on-chip - I/O ports * - USART - on-chip - Serial ports * - I2C - on-chip - I2C ports * - SPI - on-chip - Serial Peripheral Interface ports Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam0/samd20_xpro/samd20_xpro_defconfig`. Connections and IOs =================== The `Microchip website`_ has detailed information about board connections. Download the `SAM D20 Xplained Pro Schematic`_ for more detail. System Clock ============ The SAMD20 MCU is configured to use the 32.768 kHz external oscillator with the on-chip PLL generating the 48 MHz system clock. Serial Port =========== The SAMD20 MCU has 6 SERCOM based USARTs. One of the USARTs (SERCOM3) is connected to the onboard Atmel Embedded Debugger (EDBG). SERCOM4 is available on the EXT1 connector. SPI Port ======== The SAMD20 MCU has 6 SERCOM based SPIs. On the SAM D20 Xplained Pro, SERCOM0 is available on the EXT1 connector. Programming and Debugging ************************* The SAM D20 Xplained Pro comes with a Atmel Embedded Debugger (EDBG). This provides a debug interface to the SAMD20 chip and is supported by OpenOCD. Flashing ======== #. Build the Zephyr kernel and the :ref:`hello_world` sample application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: samd20_xpro :goals: build :compact: #. Connect the SAM D20 Xplained Pro to your host computer using the USB debug port. #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ minicom -D /dev/ttyACM0 -o The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows: - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. To flash an image: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: samd20_xpro :goals: flash :compact: You should see "Hello World! samd20_xpro" in your terminal. References ********** .. target-notes:: .. _Microchip Technology: path_to_url .. _Microchip website: path_to_url .. _SAM D20 Xplained Pro Schematic: path_to_url ```
/content/code_sandbox/boards/atmel/sam0/samd20_xpro/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,002
```unknown config BOARD_SAM4E_XPRO select SOC_SAM4E16E ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/Kconfig.sam4e_xpro
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
20
```unknown /* */ #include <dt-bindings/pinctrl/sam4eXe-pinctrl.h> &pinctrl { afec0_default: afec0_default { group1 { pinmux = <PA17X_AFEC0_AD0>, <PC13X_AFEC0_AD6>; }; }; afec1_default: afec1_default { group1 { pinmux = <PB2X_AFEC1_AD0>, <PB3X_AFEC1_AD1>; }; }; gmac_mii: gmac_mii { group1 { pinmux = <PD0A_GMAC_GTXCK>, <PD1A_GMAC_GTXEN>, <PD2A_GMAC_GTX0>, <PD3A_GMAC_GTX1>, <PD15A_GMAC_GTX2>, <PD16A_GMAC_GTX3>, <PD4A_GMAC_GRXDV>, <PD5A_GMAC_GRX0>, <PD6A_GMAC_GRX1>, <PD11A_GMAC_GRX2>, <PD12A_GMAC_GRX3>, <PD7A_GMAC_GRXER>, <PD14A_GMAC_GRXCK>, <PD13A_GMAC_GCOL>, <PD10A_GMAC_GCRS>; }; }; mdio_default: mdio_default { group1 { pinmux = <PD8A_GMAC_GMDC>, <PD9A_GMAC_GMDIO>; }; }; spi0_default: spi0_default { group1 { pinmux = <PA12A_SPI_MISO>, <PA13A_SPI_MOSI>, <PA14A_SPI_SPCK>, <PB14A_SPI_NPCS1>, <PD23_GPIO>, <PD30_GPIO>; }; }; twi0_default: twi0_default { group1 { pinmux = <PA4A_TWI0_TWCK>, <PA3A_TWI0_TWD>; }; }; uart0_default: uart0_default { group1 { pinmux = <PA9A_UART0_RXD>, <PA10A_UART0_TXD>; }; }; uart1_default: uart1_default { group1 { pinmux = <PA5C_UART1_RXD>, <PA6C_UART1_TXD>; }; }; usart1_default: usart1_default { group1 { pinmux = <PA21A_USART1_RXD>, <PA24A_USART1_RTS>; bias-pull-up; }; group2 { pinmux = <PA22A_USART1_TXD>, <PA25A_USART1_CTS>; }; }; pwm0_default: pwm0_default { group1 { pinmux = <PD20A_PWM_PWMH0>, <PD24A_PWM_PWML0>; }; }; hsmci_default: hsmci_default { group1 { pinmux = <PA28C_HSMCI_MCCDA>, <PA29C_HSMCI_MCCK>, <PA30C_HSMCI_MCDA0>, <PA31C_HSMCI_MCDA1>, <PA26C_HSMCI_MCDA2>, <PA27C_HSMCI_MCDA3>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/sam4e_xpro-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
767
```cmake board_runner_args(openocd --cmd-post-verify "at91sam4 gpnvm set 1") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake) ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
59
```yaml identifier: sam4e_xpro name: SAM4E Xplained Pro type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 1024 ram: 128 supported: - adc - counter - gpio - hwinfo - i2c - netif:eth - pwm - sdhc - spi - uart - watchdog - xpro_gpio - xpro_i2c - xpro_serial - xpro_spi vendor: atmel ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/sam4e_xpro.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
144
```yaml board: name: sam4e_xpro vendor: atmel socs: - name: sam4e16e ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```unknown if NETWORKING config NET_L2_ETHERNET default y endif # NETWORKING ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
22
```unknown CONFIG_BUILD_OUTPUT_HEX=y CONFIG_ARM_MPU=y CONFIG_HW_STACK_PROTECTION=y CONFIG_WDT_DISABLE_AT_BOOT=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
42
```unknown /* * */ /dts-v1/; #include <atmel/sam4e16e.dtsi> #include "sam4e_xpro-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "Atmel SAM4E Xplained Pro Board with an Atmel SAM4E16E SoC"; compatible = "atmel,sam4e_xpro", "atmel,sam4e16e", "atmel,sam4e"; aliases { i2c-0 = &twi0; pwm-0 = &pwm0; led0 = &yellow_led_1; sw0 = &user_button; wdog = &wdt; watchdog0 = &wdt; sdhc0 = &hsmci; }; chosen { zephyr,console = &uart0; zephyr,shell-uart = &uart0; zephyr,sram = &sram0; zephyr,flash = &flash0; }; leds { compatible = "gpio-leds"; yellow_led_1: led_1 { gpios = <&piod 22 GPIO_ACTIVE_LOW>; label = "LED 1"; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button_1 { label = "User Button"; gpios = <&pioa 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; zephyr,code = <INPUT_KEY_0>; }; }; ext1_header: xplained-pro-connector1 { compatible = "atmel-xplained-pro-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &piob 2 0>, /* AFE AD0 */ <1 0 &piob 3 0>, /* AFE AD1 */ <2 0 &pioa 24 0>, /* GPIO */ <3 0 &pioa 25 0>, /* GPIO */ <4 0 &pioa 15 0>, /* TIOA1 */ <5 0 &pioa 16 0>, /* TIOB1 */ <6 0 &pioa 11 0>, /* WKUP7 */ <7 0 &piod 25 0>, /* GPIO */ <8 0 &pioa 3 0>, /* TWD0 EXTx */ <9 0 &pioa 4 0>, /* TWCK0 EXTx */ <10 0 &pioa 21 0>, /* RXD1 */ <11 0 &pioa 22 0>, /* TXD1 */ <12 0 &piob 14 0>, /* SPI(NPCS1) */ <13 0 &pioa 13 0>, /* SPI(MOSI) EXTx */ <14 0 &pioa 12 0>, /* SPI(MISO) EXTx */ <15 0 &pioa 14 0>; /* SPI(SCK) EXTx */ /* GND */ /* +3.3V */ }; ext2_header: xplained-pro-connector2 { compatible = "atmel-xplained-pro-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = /*<0 0 - - 0>, - */ /*<1 0 - - 0>, - */ <2 0 &pioe 2 0>, /* GPIO EBDG */ <3 0 &piob 5 0>, /* GPIO EDBG */ <4 0 &piod 21 0>, /* PWMHI1 */ /*<5 0 - - 0>, - */ <6 0 &piod 29 0>, /* GPIO ETH */ <7 0 &piob 4 0>, /* GPIO */ <8 0 &pioa 3 0>, /* TWD0 EXTx */ <9 0 &pioa 4 0>, /* TWCK0 EXTx */ <10 0 &pioa 5 0>, /* URXD1 EXT3 */ <11 0 &pioa 6 0>, /* UTXD1 EXT3 */ <12 0 &piod 23 0>, /* GPIO */ <13 0 &pioa 13 0>, /* SPI(MOSI) EXTx */ <14 0 &pioa 12 0>, /* SPI(MISO) EXTx */ <15 0 &pioa 14 0>; /* SPI(SCK) EXTx */ /* GND */ /* +3.3V */ }; ext3_header: xplained-pro-connector3 { compatible = "atmel-xplained-pro-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &pioa 17 0>, /* AFE AD0 */ <1 0 &pioc 13 0>, /* AFE AD6 */ <2 0 &piod 28 0>, /* GPIO */ <3 0 &piod 17 0>, /* GPIO */ <4 0 &piod 20 0>, /* PWMH0 */ <5 0 &piod 24 0>, /* PWML0 */ <6 0 &pioe 1 0>, /* GPIO */ <7 0 &piod 26 0>, /* GPIO */ <8 0 &pioa 3 0>, /* TWD0 EXTx */ <9 0 &pioa 4 0>, /* TWCK0 EXTx */ <10 0 &pioa 5 0>, /* URXD1 EXT2 */ <11 0 &pioa 6 0>, /* UTXD1 EXT2 */ <12 0 &piod 30 0>, /* GPIO */ <13 0 &pioa 13 0>, /* SPI(MOSI) EXTx */ <14 0 &pioa 12 0>, /* SPI(MISO) EXTx */ <15 0 &pioa 14 0>; /* SPI(SCK) EXTx */ /* GND */ /* +3.3V */ }; }; &cpu0 { clock-frequency = <120000000>; }; &afec0 { status = "okay"; pinctrl-0 = <&afec0_default>; pinctrl-names = "default"; }; &afec1 { status = "okay"; pinctrl-0 = <&afec1_default>; pinctrl-names = "default"; }; &twi0 { status = "okay"; pinctrl-0 = <&twi0_default>; pinctrl-names = "default"; }; &spi0 { status = "okay"; pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&piob 14 GPIO_ACTIVE_LOW>, <&piod 23 GPIO_ACTIVE_LOW>, <&piod 30 GPIO_ACTIVE_LOW>; }; &uart0 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&uart0_default>; pinctrl-names = "default"; }; &uart1 { pinctrl-0 = <&uart1_default>; pinctrl-names = "default"; }; &usart1 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&usart1_default>; pinctrl-names = "default"; }; &gmac { status = "okay"; pinctrl-0 = <&gmac_mii>; pinctrl-names = "default"; zephyr,random-mac-address; phy-handle = <&phy>; }; &mdio { status = "okay"; pinctrl-0 = <&mdio_default>; pinctrl-names = "default"; phy: ethernet-phy@0 { compatible = "ethernet-phy"; status = "okay"; reg = <0>; }; }; &pwm0 { status = "okay"; pinctrl-0 = <&pwm0_default>; pinctrl-names = "default"; }; &hsmci { status = "okay"; pinctrl-0 = <&hsmci_default>; pinctrl-names = "default"; mmc { compatible = "zephyr,sdmmc-disk"; status = "okay"; }; }; &wdt { status = "okay"; }; ext1_spi: &spi0 { }; ext1_i2c: &twi0 { }; ext1_serial: &usart1 { }; ext2_spi: &spi0 { }; ext2_i2c: &twi0 { }; ext2_serial: &uart1 { }; ext3_spi: &spi0 { }; ext3_i2c: &twi0 { }; ext3_serial: &uart1 { }; ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/sam4e_xpro.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,290
```restructuredtext .. _sam4e_xpro: SAM4E Xplained Pro ################### Overview ******** The SAM4E Xplained Pro evaluation kit is a development platform to evaluate the Atmel SAM4E series microcontrollers. .. image:: img/sam4e_xpro.jpg :align: center :alt: SAM4E Xplained Pro Hardware ******** - ATSAM4E16E ARM Cortex-M4F Processor - 12 MHz crystal oscillator - internal 32.768 kHz crystal oscillator - 2 x IS61WV5128BLL 4Mb SRAM - MT29F2G08ABAEAWP 2Gb NAND - SD card connector - CAN-bus (TLE7250GVIOXUMA1 CAN Transceiver) - Ethernet port (KSZ8081MNXIA phy) - Micro-AB USB device - Micro-AB USB debug interface supporting CMSIS-DAP, Virtual COM Port and Data Gateway Interface (DGI) - One reset and one user pushbutton - 1 yellow user LEDs Supported Features ================== The sam4e_xpro board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ | NVIC | on-chip | nested vector interrupt controller | +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | AFEC | on-chip | adc | +-----------+------------+-------------------------------------+ | COUNTER | on-chip | counter | +-----------+------------+-------------------------------------+ | ETHERNET | on-chip | ethernet | +-----------+------------+-------------------------------------+ | HWINFO | on-chip | hwinfo | +-----------+------------+-------------------------------------+ | HSMCI | on-chip | sdhc | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | UART | on-chip | serial port | +-----------+------------+-------------------------------------+ | USART | on-chip | serial port | +-----------+------------+-------------------------------------+ | WATCHDOG | on-chip | watchdog | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig`. Connections and IOs =================== The `SAM4E Xplained Pro User Guide`_ has detailed information about board connections. Download the `SAM4E Xplained Pro documentation`_ for more detail. System Clock ============ The SAM4E MCU is configured to use the 12 MHz internal oscillator on the board with the on-chip PLL to generate an 120 MHz system clock. Serial Port =========== The ATSAM4E16E MCU has 2 UARTs and 2 USARTs. One of the UARTs (UART0) is configured for the console and is available as a Virtual COM Port by EDBG USB chip. Programming and Debugging ************************* Flashing the Zephyr project onto SAM4E MCU requires the `OpenOCD tool`_. By default a factory new SAM4E chip will boot SAM-BA boot loader located in the ROM, not the flashed image. This is determined by the value of GPNVM1 (General-Purpose NVM bit 1). The flash procedure will ensure that GPNVM1 is set to 1 changing the default behavior to boot from Flash. If your chip has a security bit GPNVM0 set you will be unable to program flash memory or connect to it via a debug interface. The only way to clear GPNVM0 is to perform a chip erase procedure that will erase all GPNVM bits and the full contents of the SAM4E flash memory: - With the board power off, set a jumper on the J304 header. - Turn the board power on. The jumper can be removed soon after the power is on (flash erasing procedure is started when the erase line is asserted for at least 230ms) Flashing ======== For flash the board Zephyr provides two paths. One uses the default OpenOCD tool and the second one uses :ref:`atmel_sam_ba_bootloader`. Using OpenOCD ------------- #. Connect the SAM4E Xplained Pro board to your host computer using the USB debug port. Then build and flash the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam4e_xpro :goals: build flash Using SAM-BA bootloader ----------------------- #. Close the ``ERASE`` jumper on the SAM4E Xplained Pro board. Power on the board for 10s. #. Open the ``ERASE`` jumper. #. Connect the SAM4E Xplained Pro board to your host computer using the SoC USB port. Then build and flash the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam4e_xpro :goals: build .. code-block:: console $ west flash -r bossac Visualizing the message ----------------------- #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ minicom -D /dev/ttyACM0 -o The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows: - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. Press reset button You should see "Hello World! sam4e_xpro" in your terminal. Debugging ========= You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam4e_xpro :maybe-skip-config: :goals: debug References ********** .. target-notes:: .. _SAM4E Xplained Pro User Guide: path_to_url .. _SAM4E Xplained Pro documentation: path_to_url .. _OpenOCD tool: path_to_url .. _SAM-BA: path_to_url ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,540
```ini if {[info exists env(OPENOCD_INTERFACE)]} { set INTERFACE $env(OPENOCD_INTERFACE) } else { # By default connect over Debug USB port using the EDBG chip set INTERFACE "cmsis-dap" } source [find interface/$INTERFACE.cfg] transport select swd set CHIPNAME atsam4e16e source [find target/at91sam4sXX.cfg] reset_config srst_only $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/atmel/sam/sam4e_xpro/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
146
```cmake board_runner_args(openocd --cmd-post-verify "atsamv gpnvm set 1") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
41
```unknown CONFIG_BUILD_OUTPUT_HEX=y CONFIG_ARM_MPU=y CONFIG_CACHE_MANAGEMENT=y CONFIG_HW_STACK_PROTECTION=y CONFIG_WDT_DISABLE_AT_BOOT=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
48
```unknown config BOARD_SAM_V71_XULT select SOC_SAMV71Q21 if BOARD_SAM_V71_XULT_SAMV71Q21 select SOC_SAMV71Q21B if BOARD_SAM_V71_XULT_SAMV71Q21B ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/Kconfig.sam_v71_xult
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
59
```unknown CONFIG_BUILD_OUTPUT_HEX=y CONFIG_ARM_MPU=y CONFIG_CACHE_MANAGEMENT=y CONFIG_HW_STACK_PROTECTION=y CONFIG_WDT_DISABLE_AT_BOOT=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
48
```yaml identifier: sam_v71_xult/samv71q21b name: SAM V71 Xplained Ultra (Revision B) type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 2048 ram: 384 supported: - adc - arduino_gpio - arduino_i2c - arduino_spi - can - counter - dac - dma - hwinfo - gpio - i2s - pwm - netif:eth - spi - usb - usb_device - watchdog - xpro_gpio - xpro_i2c - xpro_serial - xpro_spi vendor: atmel ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
186
```cmake # Suppress "unique_unit_address_if_enabled" to handle the following overlaps: # - /soc/ethernet@40050000 & /soc/mdio@40050000 list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/pre_dt_board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
55
```unknown /* * */ /dts-v1/; #include <atmel/samv71q21b.dtsi> #include "sam_v71_xult-common.dtsi" / { model = "Atmel SAM V71B Xplained Ultra board"; compatible = "atmel,sam_v71_xult", "atmel,samv71q21b", "atmel,samv71b"; }; ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
88
```yaml board: name: sam_v71_xult vendor: atmel socs: - name: samv71q21 - name: samv71q21b ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
43
```unknown /* * */ /dts-v1/; #include <atmel/samv71q21.dtsi> #include "sam_v71_xult-common.dtsi" / { model = "Atmel SAM V71 Xplained Ultra board"; compatible = "atmel,sam_v71_xult", "atmel,samv71q21", "atmel,samv71"; }; ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
84
```unknown /* */ #include <dt-bindings/pinctrl/samv71q-pinctrl.h> &pinctrl { afec0_default: afec0_default { group1 { pinmux = <PD30X_AFE0_AD0>, <PA19X_AFE0_AD8>; }; }; afec1_default: afec1_default { group1 { pinmux = <PC13X_AFE1_AD1>, <PC31X_AFE1_AD6>; }; }; can1_default: can1_default { group1 { pinmux = <PC12C_CAN1_RX>, <PC14C_CAN1_TX>; }; }; gmac_rmii: gmac_rmii { group1 { pinmux = <PD0A_GMAC_GTXCK>, <PD1A_GMAC_GTXEN>, <PD2A_GMAC_GTX0>, <PD3A_GMAC_GTX1>, <PD4A_GMAC_GRXDV>, <PD5A_GMAC_GRX0>, <PD6A_GMAC_GRX1>, <PD7A_GMAC_GRXER>; }; }; mdio_default: mdio_default { group1 { pinmux = <PD8A_GMAC_GMDC>, <PD9A_GMAC_GMDIO>; }; }; pwm_default: pwm_default { group1 { pinmux = <PA0A_PWMC0_PWMH0>, <PC19B_PWMC0_PWMH2>, <PD26A_PWMC0_PWML2>, <PA23B_PWMC0_PWMH0>; }; }; spi0_default: spi0_default { group1 { pinmux = <PD20B_SPI0_MISO>, <PD21B_SPI0_MOSI>, <PD22B_SPI0_SPCK>, <PD25B_SPI0_NPCS1>, <PD27B_SPI0_NPCS3>; }; }; ssc_default: ssc_default { group1 { pinmux = <PD24B_SSC_RF>, <PA22A_SSC_RK>, <PA10C_SSC_RD>, <PB0D_SSC_TF>, <PB1D_SSC_TK>, <PB5D_SSC_TD>; }; }; twihs0_default: twihs0_default { group1 { pinmux = <PA4A_TWI0_TWCK>, <PA3A_TWI0_TWD>; }; }; twihs2_default: twihs2_default { group1 { pinmux = <PD28C_TWI2_TWCK>, <PD27C_TWI2_TWD>; }; }; uart3_default: uart3_default { group1 { pinmux = <PD28A_UART3_RXD>, <PD30A_UART3_TXD>; }; }; uart4_default: uart4_default { group1 { pinmux = <PD19C_UART4_TXD>, <PD18C_UART4_RXD>; }; }; usart0_default: usart0_default { group1 { pinmux = <PB0C_USART0_RXD>, <PB1C_USART0_TXD>; }; }; usart0_hw_ctrl_flow: usart0_hw_ctrl_flow { group1 { pinmux = <PB0C_USART0_RXD>, <PB3C_USART0_RTS>; bias-pull-up; }; group2 { pinmux = <PB1C_USART0_TXD>, <PB2C_USART0_CTS>; }; }; usart1_default: usart1_default { group1 { pinmux = <PA21A_USART1_RXD>, <PB4D_USART1_TXD>; }; }; usart1_hw_ctrl_flow: usart1_hw_ctrl_flow { group1 { pinmux = <PA21A_USART1_RXD>, <PA24A_USART1_RTS>; bias-pull-up; }; group2 { pinmux = <PB4D_USART1_TXD>, <PA25A_USART1_CTS>; }; }; usart2_default: usart2_default { group1 { pinmux = <PD15B_USART2_RXD>, <PD16B_USART2_TXD>; }; }; usart2_hw_ctrl_flow: usart2_hw_ctrl_flow_clk { group1 { pinmux = <PD15B_USART2_RXD>, <PD18B_USART2_RTS>; bias-pull-up; }; group2 { pinmux = <PD16B_USART2_TXD>, <PD19B_USART2_CTS>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/sam_v71_xult-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,095
```unknown # Atmel SMART SAM V71 Xplained Board configuration if ETH_SAM_GMAC # Read MAC address from AT24MAC402 EEPROM config ETH_SAM_GMAC_MAC_I2C_EEPROM default y select I2C config ETH_SAM_GMAC_MAC_I2C_INT_ADDRESS default 0x9A config ETH_SAM_GMAC_MAC_I2C_INT_ADDRESS_SIZE default 1 endif # ETH_SAM_GMAC if NETWORKING config NET_L2_ETHERNET default y endif # NETWORKING ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
119
```yaml identifier: sam_v71_xult/samv71q21 name: SAM V71 Xplained Ultra type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 2048 ram: 384 supported: - adc - arduino_gpio - arduino_i2c - arduino_spi - can - counter - dac - dma - hwinfo - gpio - i2s - pwm - netif:eth - spi - usb - usb_device - watchdog - xpro_gpio - xpro_i2c - xpro_serial - xpro_spi vendor: atmel ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
182
```ini if {[info exists env(OPENOCD_INTERFACE)]} { set INTERFACE $env(OPENOCD_INTERFACE) } else { # By default connect over Debug USB port using the EDBG chip set INTERFACE "cmsis-dap" } source [find interface/$INTERFACE.cfg] transport select swd set CHIPNAME atsamv71q21 source [find target/atsamv.cfg] reset_config srst_only $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
144
```unknown /* * */ #include "sam_v71_xult-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { aliases { i2c-0 = &twihs0; i2c-1 = &twihs2; led0 = &yellow_led1; pwm-led0 = &pwm_led0; pwm-0 = &pwm0; sw0 = &sw0_user_button; sw1 = &sw1_user_button; watchdog0 = &wdt; }; chosen { zephyr,console = &usart1; zephyr,shell-uart = &usart1; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,code-partition = &slot0_partition; zephyr,canbus = &can1; }; leds { compatible = "gpio-leds"; yellow_led0: led_0 { gpios = <&pioa 23 GPIO_ACTIVE_LOW>; label = "User LED 0"; status = "disabled"; }; yellow_led1: led_1 { gpios = <&pioc 9 GPIO_ACTIVE_LOW>; label = "User LED 1"; }; }; pwmleds { compatible = "pwm-leds"; pwm_led0: pwm_led_0 { pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>; }; }; gpio_keys { compatible = "gpio-keys"; /* The switch is labeled SW300/301 in the schematic, and * labeled SW0 on the board, and labeled ERASE User Button * on docs */ sw0_user_button: button_1 { label = "User Button 0"; gpios = <&pioa 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; zephyr,code = <INPUT_KEY_0>; }; sw1_user_button: button_2 { label = "User Button 1"; gpios = <&piob 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; zephyr,code = <INPUT_KEY_1>; }; }; ext1_header: xplained-pro-connector1 { compatible = "atmel-xplained-pro-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &pioc 31 0>, /* AFE1 AD6 */ <1 0 &pioa 19 0>, /* AFE0 AD8 */ <2 0 &piob 3 0>, /* RTS0 */ <3 0 &piob 2 0>, /* CTS0 */ <4 0 &pioa 0 0>, /* PWMC0_H0 */ <5 0 &pioc 30 0>, /* TIOB5 */ <6 0 &piod 28 0>, /* WKUP5 */ <7 0 &pioa 5 0>, /* GPIO */ <8 0 &pioa 3 0>, /* TWD0 EXT2 */ <9 0 &pioa 4 0>, /* TWCK0 EXT2 */ <10 0 &piob 0 0>, /* RXD0 */ <11 0 &piob 1 0>, /* TXD0 */ <12 0 &piod 25 0>, /* SPI0(NPCS1) */ <13 0 &piod 21 0>, /* SPI0(MOSI) EXT2 */ <14 0 &piod 20 0>, /* SPI0(MISO) EXT2 */ <15 0 &piod 22 0>; /* SPI0(SCK) EXT2 */ /* GND */ /* +3.3V */ }; ext2_header: xplained-pro-connector2 { compatible = "atmel-xplained-pro-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &piod 30 0>, /* AFE0 AD0 */ <1 0 &pioc 13 0>, /* AFE1 AD1 */ <2 0 &pioa 6 0>, /* GPIO */ <3 0 &piod 11 0>, /* GPIO */ <4 0 &pioc 19 0>, /* PWMC0_H2 */ <5 0 &piod 26 0>, /* PWMC0_L2 */ <6 0 &pioa 2 0>, /* WKUP2 */ <7 0 &pioa 24 0>, /* GPIO */ <8 0 &pioa 3 0>, /* TWD0 EXT1 */ <9 0 &pioa 4 0>, /* TWCK0 EXT1 */ <10 0 &pioa 21 0>, /* RXD1 */ <11 0 &piob 4 0>, /* TXD1 */ <12 0 &piod 27 0>, /* SPI0(NPCS3) */ <13 0 &piod 21 0>, /* SPI0(MOSI) EXT1 */ <14 0 &piod 20 0>, /* SPI0(MISO) EXT1 */ <15 0 &piod 22 0>; /* SPI0(SCK) EXT1 */ /* GND */ /* +3.3V */ }; arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &piod 26 0>, /* A0-TD */ <1 0 &pioc 31 0>, /* A1-AFE1 AD6 y */ <2 0 &pioa 19 0>, /* A2-AFE0 AD8 y */ <3 0 &piod 30 0>, /* A3-AFE0 AD0 y */ <4 0 &pioc 13 0>, /* A4-AFE1 AD1 y */ <5 0 &pioe 0 0>, /* A5-AFE1 AD11 */ <6 0 &piod 28 0>, /* D0-URXD3 */ <7 0 &piod 30 0>, /* D1-UTXD3 */ <8 0 &pioa 0 0>, /* D2-PWMC0_H0 */ <9 0 &pioa 6 0>, /* D3-GPIO */ <10 0 &piod 27 0>, /* D4-SPI0_NPCS3 y */ <11 0 &piod 11 0>, /* D5-PWMC0_H0 */ <12 0 &pioc 19 0>, /* D6-PWMC0_H2 */ <13 0 &pioa 2 0>, /* D7-PWMC0_H1 */ <14 0 &pioa 5 0>, /* D8-PWMC1_PWML3 */ <15 0 &pioc 9 0>, /* D9-TIOB7 */ <16 0 &piod 25 0>, /* D10-SPI0_NPCS1 y */ <17 0 &piod 21 0>, /* D11-SPI0_MOSI y */ <18 0 &piod 20 0>, /* D12-SPI0_MISO y */ <19 0 &piod 22 0>, /* D13-SPI0_SPCK y */ <20 0 &pioa 3 0>, /* D14-TWD0 y */ <21 0 &pioa 4 0>; /* D15-TWCK0 y */ }; }; &cpu0 { clock-frequency = <300000000>; }; &afec0 { status = "okay"; pinctrl-0 = <&afec0_default>; pinctrl-names = "default"; }; &afec1 { status = "okay"; pinctrl-0 = <&afec1_default>; pinctrl-names = "default"; }; &dacc { status = "okay"; }; &twihs0 { status = "okay"; pinctrl-0 = <&twihs0_default>; pinctrl-names = "default"; eeprom: eeprom@5f { compatible = "atmel,24mac402"; reg = <0x5f>; }; }; &twihs2 { status = "okay"; pinctrl-0 = <&twihs2_default>; pinctrl-names = "default"; }; &spi0 { status = "okay"; pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&piod 25 GPIO_ACTIVE_LOW>, <&piod 27 GPIO_ACTIVE_LOW>; dmas = <&xdmac 1 DMA_PERID_SPI0_TX>, <&xdmac 2 DMA_PERID_SPI0_RX>; dma-names = "tx", "rx"; }; &usart1 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&usart1_default>; pinctrl-names = "default"; }; &uart3 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&uart3_default>; pinctrl-names = "default"; }; &wdt { status = "okay"; }; zephyr_udc0: &usbhs { status = "okay"; }; &gmac { status = "okay"; pinctrl-0 = <&gmac_rmii>; pinctrl-names = "default"; mac-eeprom = <&eeprom>; phy-handle = <&phy>; }; &mdio { status = "okay"; pinctrl-0 = <&mdio_default>; pinctrl-names = "default"; phy: ethernet-phy@0 { compatible = "ethernet-phy"; status = "okay"; reg = <0>; }; }; &pwm0 { status = "okay"; pinctrl-0 = <&pwm_default>; pinctrl-names = "default"; }; &pioa { status = "okay"; }; &piob { status = "okay"; }; &pioc { status = "okay"; }; &piod { status = "okay"; }; &pioe { status = "okay"; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* * The first half of sector 0 (64 kbytes) * is reserved for the bootloader */ boot_partition: partition@0 { label = "mcuboot"; reg = <0x0 0x00010000>; read-only; }; /* From sector 1 to sector 7 (included): slot0 (896 kbytes) */ slot0_partition: partition@20000 { label = "image-0"; reg = <0x00020000 0x000e0000>; }; /* From sector 8 to sector 14 (included): slot1 (896 kbytes) */ slot1_partition: partition@100000 { label = "image-1"; reg = <0x00100000 0x000e0000>; }; /* Sector 15: scratch (128 kbytes) */ scratch_partition: partition@1e0000 { label = "image-scratch"; reg = <0x001e0000 0x00020000>; }; }; }; &ssc { status = "okay"; pinctrl-0 = <&ssc_default>; pinctrl-names = "default"; dma-names = "rx", "tx"; dmas = <&xdmac 22 DMA_PERID_SSC_RX>, <&xdmac 23 DMA_PERID_SSC_TX>; }; &can1 { status = "okay"; pinctrl-0 = <&can1_default>; pinctrl-names = "default"; can-transceiver { max-bitrate = <5000000>; }; }; ext1_spi: &spi0 { }; ext1_i2c: &twihs0 { }; ext1_serial: &usart0 { }; ext2_spi: &spi0 { }; ext2_i2c: &twihs0 { }; ext2_serial: &usart1 { }; arduino_spi: &spi0 { }; arduino_i2c: &twihs0 { }; arduino_serial: &uart3 { }; ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/sam_v71_xult-common.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,174
```restructuredtext .. _sam_v71_xplained_ultra: SAM V71(B) Xplained Ultra ######################### Overview ******** The SAM V71 Xplained Ultra evaluation kit is a development platform to evaluate the Atmel SAM V71 series microcontrollers. The current version allows to use both IC variations ATSAMV71Q21A(B). .. image:: img/sam_v71_xult.jpg :align: center :alt: SAM V71 Xplained Ultra Hardware ******** - ATSAMV71Q21A(B) ARM Cortex-M7 Processor - 12 MHz crystal oscillator - 32.768 kHz crystal oscillator - Supercap backup - AT24MAC402 EEPROM - IS42S16100E 16 Mb SDRAM - S25FL116K 16 Mb QSPI - WM8904 low power stereo audio codec - ATA6561 CAN Transceiver - SD card connector with SDIO support - Camera interface connector - MediaLB connector - Ethernet port - Micro-AB USB device - Micro-AB USB debug interface supporting CMSIS-DAP, Virtual COM Port and Data Gateway Interface (DGI) - JTAG interface connector - One reset and two user pushbuttons - Two yellow user LEDs Supported Features ================== The sam_v71_xplained_ultra board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ | NVIC | on-chip | nested vector interrupt controller | +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ | AFEC | on-chip | adc | +-----------+------------+-------------------------------------+ | CAN FD | on-chip | can | +-----------+------------+-------------------------------------+ | COUNTER | on-chip | counter | +-----------+------------+-------------------------------------+ | ETHERNET | on-chip | ethernet | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | DAC | on-chip | dac | +-----------+------------+-------------------------------------+ | HWINFO | on-chip | Unique device serial number | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | I2S | on-chip | i2s | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | UART | on-chip | serial port | +-----------+------------+-------------------------------------+ | USART | on-chip | serial port | +-----------+------------+-------------------------------------+ | USB | on-chip | USB device | +-----------+------------+-------------------------------------+ | WATCHDOG | on-chip | watchdog | +-----------+------------+-------------------------------------+ | XDMAC | on-chip | dma | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21_defconfig`. Connections and IOs =================== The `SAMV71-XULT User Guide`_ has detailed information about board connections. System Clock ============ The SAM V71 MCU is configured to use the 12 MHz external oscillator on the board with the on-chip PLL to generate a 300 MHz system clock. Serial Port =========== The ATSAMV71Q21 MCU has five UARTs and three USARTs. USART1 is configured for the console and is available as a Virtual COM Port via EDBG USB chip. Programming and Debugging ************************* Flashing the Zephyr project onto SAM V71 MCU requires the `OpenOCD tool`_. By default a factory new SAM V71 chip will boot the `SAM-BA`_ boot loader located in the ROM, not the flashed image. This is determined by the value of GPNVM1 (General-Purpose NVM bit 1). The flash procedure will ensure that GPNVM1 is set to 1 changing the default behavior to boot from Flash. If your chip has a security bit GPNVM0 set you will be unable to program flash memory or connect to it via a debug interface. The only way to clear GPNVM0 is to perform a chip erase procedure that will erase all GPNVM bits and the full contents of the SAM V71 flash memory: - With the board power off, set a jumper on the J200 header. - Turn the board power on. The jumper can be removed soon after the power is on (flash erasing procedure is started when the erase line is asserted for at least 230ms) Flashing ======== #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ minicom -D /dev/ttyACM0 -o The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows: - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. Connect the SAM V71 Xplained Ultra board to your host computer using the USB debug port. Then build and flash the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam_v71_xult/samv71q21 :goals: build flash You should see "Hello World! sam_v71_xult" in your terminal. #. To use the SoC variation B IC, you need type "sam_v71_xult/samv71q21b". .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam_v71_xult/samv71q21b :goals: build flash You should see "Hello World! sam_v71_xult" in your terminal. You can flash the image using an external debug adapter such as J-Link or ULINK, connected to the 20-pin JTAG header. Supply the name of the debug adapter (e.g., ``jlink``) via an OPENOCD_INTERFACE environment variable. OpenOCD will look for the appropriate interface configuration in an ``interface/$(OPENOCD_INTERFACE).cfg`` file on its internal search path. Debugging ========= You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam_v71_xult/samv71q21 :maybe-skip-config: :goals: debug References ********** SAM V71 Product Page: path_to_url .. _SAMV71-XULT User Guide: path_to_url .. _OpenOCD tool: path_to_url .. _SAM-BA: path_to_url ```
/content/code_sandbox/boards/atmel/sam/sam_v71_xult/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,636
```unknown /* */ /dts-v1/; #include <atmel/sam4s16c.dtsi> #include "sam4s_xplained-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "Atmel SAM4S Xplained Board with an Atmel SAM4S16C SoC"; compatible = "atmel,sam4s_xplained", "atmel,sam4s16c", "atmel,sam4s"; aliases { i2c-0 = &twi0; i2c-1 = &twi1; pwm-0 = &pwm0; led0 = &yellow_led_1; led1 = &yellow_led_2; sw0 = &user_button; watchdog0 = &wdt; }; chosen { zephyr,console = &uart0; zephyr,shell-uart = &uart0; zephyr,sram = &sram0; zephyr,flash = &flash0; }; sram1: sram@60000000 { compatible = "zephyr,memory-region", "mmio-sram"; device_type = "memory"; reg = <0x60000000 DT_SIZE_K(512)>; zephyr,memory-region = "SRAM1"; }; sram2: sram@61000000 { compatible = "zephyr,memory-region", "mmio-sram"; device_type = "memory"; reg = <0x61000000 DT_SIZE_K(512)>; zephyr,memory-region = "SRAM2"; }; leds { compatible = "gpio-leds"; yellow_led_1: led_1 { gpios = <&pioc 10 GPIO_ACTIVE_LOW>; label = "LED 1"; }; yellow_led_2: led_2 { gpios = <&pioc 17 GPIO_ACTIVE_LOW>; label = "LED 2"; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button_1 { label = "User Button"; gpios = <&pioa 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; zephyr,code = <INPUT_KEY_0>; }; }; xplained1_header: xplained-connector1 { compatible = "atmel-xplained-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &pioa 3 0>, /* TWD0 y */ <1 0 &pioa 4 0>, /* TWCK0 y */ <2 0 &piob 2 0>, /* URXD1 */ <3 0 &piob 3 0>, /* UTXD1 */ <4 0 &pioa 31 0>, /* SPI(CS) */ <5 0 &pioa 13 0>, /* SPI(MOSI) y */ <6 0 &pioa 12 0>, /* SPI(MISO) y */ <7 0 &pioa 14 0>; /* SPI(SCK) y */ /* GND */ /* +3.3V */ }; xplained2_header: xplained-connector2 { compatible = "atmel-xplained-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &pioa 22 0>, /* GPIO */ <1 0 &pioc 12 0>, /* GPIO */ <2 0 &piob 0 0>, /* GPIO */ <3 0 &piob 1 0>, /* GPIO */ <4 0 &pioa 17 0>, /* GPIO */ <5 0 &pioa 21 0>, /* GPIO */ <6 0 &pioc 13 0>, /* GPIO */ <7 0 &pioc 15 0>; /* GPIO */ /* GND */ /* +3.3V */ }; xplained3_header: xplained-connector3 { compatible = "atmel-xplained-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &pioa 20 0>, /* GPIO */ <1 0 &pioa 11 0>, /* GPIO */ <2 0 &pioa 23 0>, /* GPIO */ <3 0 &pioa 18 0>, /* GPIO */ <4 0 &pioa 15 0>, /* GPIO */ <5 0 &pioa 16 0>, /* GPIO */ <6 0 &pioa 2 0>, /* GPIO */ <7 0 &pioc 2 0>; /* GPIO */ /* GND */ /* +3.3V */ }; xplained4_header: xplained-connector4 { compatible = "atmel-xplained-header"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; /* Shared */ gpio-map = <0 0 &pioa 3 0>, /* TWD0 y */ <1 0 &pioa 4 0>, /* TWCK0 y */ <2 0 &piob 2 0>, /* URXD1 */ <3 0 &piob 3 0>, /* UTXD1 */ <4 0 &pioa 30 0>, /* SPI(CS) */ <5 0 &pioa 13 0>, /* SPI(MOSI) y */ <6 0 &pioa 12 0>, /* SPI(MISO) y */ <7 0 &pioa 14 0>; /* SPI(SCK) y */ /* GND */ /* +3.3V */ }; }; &cpu0 { clock-frequency = <120000000>; }; &twi0 { status = "okay"; pinctrl-0 = <&twi0_default>; pinctrl-names = "default"; }; &spi0 { status = "okay"; pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&pioa 31 GPIO_ACTIVE_LOW>, <&pioa 30 GPIO_ACTIVE_LOW>; }; &uart0 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&uart0_default>; pinctrl-names = "default"; }; &uart1 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&uart1_default>; pinctrl-names = "default"; }; &pwm0 { status = "okay"; pinctrl-0 = <&pwm0_default>; pinctrl-names = "default"; }; &adc0 { status = "okay"; pinctrl-0 = <&adc0_default>; pinctrl-names = "default"; prescaler = <9>; startup-time = <64>; settling-time = <3>; tracking-time = <2>; }; &wdt { status = "okay"; }; xplained1_i2c: &twi0 { }; xplained1_spi: &spi0 { }; xplained1_serial: &uart1 { }; xplained4_i2c: &twi0 { }; xplained4_spi: &spi0 { }; xplained4_serial: &uart1 { }; &smc { status = "okay"; pinctrl-0 = <&smc_default>; pinctrl-names = "default"; is66wv51216dbll@0 { reg = <0>; atmel,smc-write-mode = "nwe"; atmel,smc-read-mode = "nrd"; atmel,smc-setup-timing = <1 1 1 1>; atmel,smc-pulse-timing = <6 6 6 6>; atmel,smc-cycle-timing = <7 7>; }; is66wv51216dbll@1 { reg = <1>; atmel,smc-write-mode = "nwe"; atmel,smc-read-mode = "nrd"; atmel,smc-setup-timing = <1 1 1 1>; atmel,smc-pulse-timing = <6 6 6 6>; atmel,smc-cycle-timing = <7 7>; }; }; ```
/content/code_sandbox/boards/atmel/sam/sam4s_xplained/sam4s_xplained.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,146
```cmake board_runner_args(jlink "--device=atsam4s16c" "--speed=4000") include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake) ```
/content/code_sandbox/boards/atmel/sam/sam4s_xplained/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56
```unknown CONFIG_ARM_MPU=y CONFIG_HW_STACK_PROTECTION=y CONFIG_WDT_DISABLE_AT_BOOT=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y CONFIG_MEMC=y ```
/content/code_sandbox/boards/atmel/sam/sam4s_xplained/sam4s_xplained_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
41
```unknown config BOARD_SAM4S_XPLAINED select SOC_SAM4S16C ```
/content/code_sandbox/boards/atmel/sam/sam4s_xplained/Kconfig.sam4s_xplained
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
21
```yaml board: name: sam4s_xplained vendor: atmel socs: - name: sam4s16c ```
/content/code_sandbox/boards/atmel/sam/sam4s_xplained/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```yaml identifier: sam4s_xplained name: SAM4S Xplained type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 1024 ram: 128 supported: - adc - counter - gpio - hwinfo - memc - pwm - spi - watchdog - xplained_gpio - xplained_i2c - xplained_serial - xplained_spi vendor: atmel ```
/content/code_sandbox/boards/atmel/sam/sam4s_xplained/sam4s_xplained.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
131
```unknown /* */ #include <dt-bindings/pinctrl/sam4sXc-pinctrl.h> &pinctrl { spi0_default: spi0_default { group1 { pinmux = <PA12A_SPI_MISO>, <PA13A_SPI_MOSI>, <PA14A_SPI_SPCK>, <PA31A_SPI_NPCS1>, <PA30B_SPI_NPCS2>; }; }; twi0_default: twi0_default { group1 { pinmux = <PA4A_TWI0_TWCK>, <PA3A_TWI0_TWD>; }; }; uart0_default: uart0_default { group1 { pinmux = <PA9A_UART0_RXD>, <PA10A_UART0_TXD>; }; }; uart1_default: uart1_default { group1 { pinmux = <PB2A_UART1_RXD>, <PB3A_UART1_TXD>; }; }; usart1_default: usart1_default { group1 { pinmux = <PA21A_USART1_RXD>, <PA22A_USART1_TXD>; }; }; pwm0_default: pwm0_default { group1 { pinmux = <PA12B_PWM_PWMH1>, <PA13B_PWM_PWMH2>, <PA14B_PWM_PWMH3>; }; }; adc0_default: adc0_default { group1 { pinmux = <PB0X_ADC_AD4>, <PB1X_ADC_AD5>; }; }; smc_default: smc_default { group1 { pinmux = <PC18A_EBI_A0>, <PC19A_EBI_A1>, <PC20A_EBI_A2>, <PC21A_EBI_A3>, <PC22A_EBI_A4>, <PC23A_EBI_A5>, <PC24A_EBI_A6>, <PC25A_EBI_A7>, <PC26A_EBI_A8>, <PC27A_EBI_A9>, <PC28A_EBI_A10>, <PC29A_EBI_A11>, <PC30A_EBI_A12>, <PC31A_EBI_A13>, <PA18C_EBI_A14>, <PA19C_EBI_A15>, <PA20C_EBI_A16>, <PA0C_EBI_A17>, <PA1C_EBI_A18>, <PC0A_EBI_D0>, <PC1A_EBI_D1>, <PC2A_EBI_D2>, <PC3A_EBI_D3>, <PC4A_EBI_D4>, <PC5A_EBI_D5>, <PC6A_EBI_D6>, <PC7A_EBI_D7>, <PC14A_EBI_NCS0>, <PC15A_EBI_NCS1>, <PC11A_EBI_NRD>, <PC8A_EBI_NWE>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam/sam4s_xplained/sam4s_xplained-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
694
```cmake board_runner_args(jlink "--device=atsam4lc4c") board_runner_args(jlink "--speed=4000") board_runner_args(jlink "--reset-after-load") include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) ```
/content/code_sandbox/boards/atmel/sam/sam4l_ek/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
54
```unknown CONFIG_ARM_MPU=y CONFIG_HW_STACK_PROTECTION=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y ```
/content/code_sandbox/boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
28
```unknown /* */ /dts-v1/; #include <atmel/sam4lx4.dtsi> #include "sam4l_ek-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "Atmel SAM4L-EK Board with an Atmel SAM4LC4C SoC"; compatible = "atmel,sam4l_ek"; aliases { i2c-0 = &twim0; led0 = &user_led; sw0 = &sw0_dfu; }; chosen { zephyr,console = &usart2; zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; }; leds { compatible = "gpio-leds"; user_led: led_0 { gpios = <&gpioc 10 GPIO_ACTIVE_HIGH>; label = "LED_0"; }; }; gpio_keys { compatible = "gpio-keys"; sw0_dfu: button_1 { label = "SW0_DFU"; gpios = <&gpioc 3 GPIO_ACTIVE_LOW>; zephyr,code = <INPUT_KEY_0>; }; }; }; &cpu0 { clock-frequency = <48000000>; }; &usart2 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&usart2_default>; pinctrl-names = "default"; }; &spi0 { status = "okay"; pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&gpioa 2 GPIO_ACTIVE_LOW>, <&gpioc 0 GPIO_ACTIVE_LOW>; }; &tc0 { clk = <4>; status = "okay"; }; &twim0 { status = "okay"; pinctrl-0 = <&twi0_default>; pinctrl-names = "default"; std-clk-slew-lim = <0>; std-clk-strength-low = "0.5"; std-data-slew-lim = <0>; std-data-strength-low = "0.5"; hs-clk-slew-lim = <0>; hs-clk-strength-high = "0.5"; hs-clk-strength-low = "0.5"; hs-data-slew-lim = <0>; hs-data-strength-low = "0.5"; hs-master-code = <0>; }; zephyr_udc0: &usbc { status = "okay"; pinctrl-0 = <&usbc_default>; pinctrl-names = "default"; }; ```
/content/code_sandbox/boards/atmel/sam/sam4l_ek/sam4l_ek.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
593
```unknown config BOARD_SAM4L_EK select SOC_SAM4LC4C ```
/content/code_sandbox/boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
20
```yaml board: name: sam4l_ek vendor: atmel socs: - name: sam4lc4c ```
/content/code_sandbox/boards/atmel/sam/sam4l_ek/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```unknown /* */ #include <dt-bindings/pinctrl/sam4lcXc-pinctrl.h> &pinctrl { spi0_default: spi0_default { group1 { pinmux = <PC4A_SPI_MISO>, <PC5A_SPI_MOSI>, <PC6A_SPI_SCK>, <PA2B_SPI_NPCS0>, <PC0A_SPI_NPCS2>; }; }; twi0_default: twi0_default { group1 { pinmux = <PA24B_TWIMS0_TWCK>, <PA23B_TWIMS0_TWD>; }; }; usart0_default: usart0_default { group1 { pinmux = <PC2C_USART0_RXD>, <PA7B_USART0_TXD>; }; }; usart0_hw_ctrl_flow: usart0_hw_ctrl_flow { group1 { pinmux = <PC2C_USART0_RXD>, <PC7B_USART2_RTS>; bias-pull-up; }; group2 { pinmux = <PA7B_USART0_TXD>, <PC8E_USART2_CTS>; }; }; usart2_default: usart2_default { group1 { pinmux = <PC11B_USART2_RXD>, <PC12B_USART2_TXD>; }; }; usbc_default: usbc_default { group1 { pinmux = <PA25A_USBC_DM>, <PA26A_USBC_DP>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam/sam4l_ek/sam4l_ek-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
352
```yaml identifier: sam4l_ek name: SAM4L-EK type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 256 ram: 32 supported: - counter - gpio - entropy - hwinfo - i2c - spi - uart - usb - usb_device vendor: atmel ```
/content/code_sandbox/boards/atmel/sam/sam4l_ek/sam4l_ek.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
104
```restructuredtext .. _sam4s_xplained: SAM4S Xplained ############## Overview ******** The SAM4S Xplained evaluation kit is a development platform to evaluate the Atmel SAM4S series microcontrollers. .. image:: img/sam4s_xplained.jpg :align: center :alt: SAM4S Xplained Hardware ******** - ATSAM4S16C ARM Cortex-M4 Processor - 12 MHz crystal oscillator - internal 32.768 kHz crystal oscillator - IS66WV51216DALL 8 Mb SRAM - Micro-AB USB device - Micro-AB USB debug interface supporting SEGGER OB and Virtual COM Port and Data - One reset and one user pushbutton - 2 yellow user LEDs - IC pads for external flash chip Supported Features ================== The sam4s_xplained board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ | NVIC | on-chip | nested vector interrupt controller | +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ | ADC | on-chip | adc | +-----------+------------+-------------------------------------+ | COUNTER | on-chip | counter | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | HWINFO | on-chip | Unique device serial number | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | SMC | on-chip | memc (PSRAM) | +-----------+------------+-------------------------------------+ | UART | on-chip | serial port | +-----------+------------+-------------------------------------+ | USART | on-chip | serial port | +-----------+------------+-------------------------------------+ | WATCHDOG | on-chip | watchdog | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam/sam4s_xplained/sam4s_xplained_defconfig`. Connections and IOs =================== Download the `SAM4S Xplained Design Files`_ for more information. It has full schematic and gerbers files. System Clock ============ The SAM4S MCU is configured to use the 12 MHz internal oscillator on the board with the on-chip PLL to generate an 84 MHz system clock. Serial Port =========== The ATSAM4S16C MCU has 2 UARTs and 2 USARTs. One of the UARTs (UART0) is connected to the Segger J-Link OB chip (the AT91SAM3U4 is programmed to be Segger J-Link OB). Segger J-Link OB brings the UART out as a virtual COM port. The section flashing uses the UART from the Segger USB debug connection. Programming and Debugging ************************* The SAM4S Xplained board comes with Segger `J-Link OB <path_to_url`_. This provides a debug interface to the SAM4S16C chip. You can use Ozone or JLink to communicate with the SAM4S16C. Flashing ======== For flash the board Zephyr provides two paths. One uses the default JLink tool and the second one uses :ref:`atmel_sam_ba_bootloader`. Using JLink ------------- #. Download JLink from the Segger `JLink Downloads Page`_. Go to the section "J-Link Software and Documentation Pack" and install the "J-Link Software and Documentation pack for Linux". The application JLinkExe needs to be accessible from your path. #. Connect the SAM4S Xplained board to your host computer using the USB debug port. Then build and flash the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam4s_xplained :goals: build flash Using SAM-BA bootloader ----------------------- #. Close the ``J25`` jumper on the SAM4S Xplained board. Power on the board for 10s. #. Open the ``J25`` jumper. #. Connect the SAM4S Xplained board to your host computer using the SoC USB port. Then build and flash the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam4s_xplained :goals: build .. code-block:: console $ west flash -r bossac Visualizing the message ----------------------- #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ minicom -D /dev/ttyACM0 -o The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows: - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. Press reset button You should see "Hello World! sam4s_xplained" in your terminal. Debugging ========= You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam4s_xplained :maybe-skip-config: :goals: debug References ********** .. target-notes:: .. _SAM4S Xplained Online User Guide: path_to_url .. _JLink Downloads Page: path_to_url .. _SAM4S Xplained Design Files: path_to_url ```
/content/code_sandbox/boards/atmel/sam/sam4s_xplained/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,385
```restructuredtext .. _sam4l_ek: SAM4L-EK ######## Overview ******** The SAM4L series embeds picoPower technology for ultra-low power consumption. Combined power control techniques are used to bring active current consumption down to 90A/MHz. The device allows a wide range of configurations giving the user the ability to balance between the lowest possible power consumption and the feature set selected for the application. The WAIT and RETENTION modes provide full logic and RAM retention, associated with fast wake-up capability (<1.5s) and a very low consumption of, respectively, 3 A and 1.5 A. In addition, WAIT mode supports SleepWalking features. In BACKUP mode, CPU, peripherals and RAM are powered off consuming less than 0.9A with external interrupt wake-up support. The SAM4L-EK is a full featured design to develop for Atmel SAM4L SoC series. The kit is equipped with a rich set of peripherals that make the ATSAM4L-EK a perfect evaluation platform. Download the `SAM4L-EK Online User Guide`_ for more details. .. image:: img/atmel-sam4l-ek-callouts.jpg :align: center :alt: SAM4L-EK Hardware ******** - ATSAM4LC4C ARM Cortex-M4 Processor - 12 MHz crystal oscillator - 32.768 kHz crystal oscillator - 1 Micro-AB USB OTG host/device - 1 AT86RF2xx IEEE 802.15.4 transceiver connector - 1 RS-485 full duplex interface - 1 Sensor Xplained board connector - 1 Audio Jack connector 3.5mm - 1 Dedicated Board Monitor MCU - Power measurement (VDDIN, VDDIO, VDDANA) - 1 OLED Display (128x64) - 5 LEDs - 1 Joystick - 1 USART - 1 TWI - 1 40x4 LCD Segment Display - 1 user touch button and One user pushbutton - 1 user LED - 1 QTouch Slider - 1 QTouch Button - 1 TEMT6000 Light Sensor - 1 AT25DF641A Serial NOR Flash Supported Features ================== The sam4l_ek board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ | MPU | on-chip | arch/arm | +-----------+------------+-------------------------------------+ | NVIC | on-chip | arch/arm | +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ | COUNTER | on-chip | counter | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | HWINFO | on-chip | Unique 120 bit serial number | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | TRNG | on-chip | entropy | +-----------+------------+-------------------------------------+ | TWIM | on-chip | i2c master port-interrupt | +-----------+------------+-------------------------------------+ | USART | on-chip | serial port | +-----------+------------+-------------------------------------+ | USB | on-chip | usb device | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig`. Connections and IOs =================== The `SAM4L-EK Design Documentation`_ has detailed information about board connections. Download the `SAM4L-EK Design Documentation`_ for more details. System Clock ============ The SAM4L MCU is configured to use the 12 MHz internal oscillator on the board with the on-chip PLL to generate an 48 MHz system clock. Serial Port =========== The ATSAM4LC4C MCU has 4 USARTs. One of the USARTs (USART2) is connected on the embedded debug unit and can works as a console. The USART0 is shared between all others headers and RS-485 port. Programming and Debugging ************************* The SAM4L-EK board have a Segger Embedded Debugger Unit `J-Link OB <path_to_url`_. This provides a debug interface to the SAM4LC4C chip. You can use Ozone or JLink to communicate with the SAM4LC4C. Flashing ======== #. Download JLink from the Segger `JLink Downloads Page`_. Go to the section "J-Link Software and Documentation Pack" and install the "J-Link Software and Documentation pack for Linux". The application JLinkExe needs to be accessible from your path. #. Run your favorite terminal program to listen for output. Under Linux the terminal should be :code:`/dev/ttyACM0`. For example: .. code-block:: console $ minicom -D /dev/ttyACM0 -o The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows: - Speed: 115200 - Data: 8 bits - Parity: None - Stop bits: 1 #. Connect the SAM4L-EK board to your host computer using the USB debug port. Then build and flash the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam4l_ek :goals: build flash You should see "Hello World! sam4l_ek" in your terminal. Debugging ========= You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam4l_ek :maybe-skip-config: :goals: debug References ********** .. target-notes:: .. _SAM4L-EK Online User Guide: path_to_url .. _SAM4L-EK Design Documentation: path_to_url .. _JLink Downloads Page: path_to_url ```
/content/code_sandbox/boards/atmel/sam/sam4l_ek/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,446
```unknown /* */ #include <dt-bindings/pinctrl/same70q-pinctrl.h> &pinctrl { afec0_default: afec0_default { /* ADCL - J502 */ group1 { pinmux = <PD30X_AFE0_AD0>, <PA19X_AFE0_AD8>, <PA17X_AFE0_AD6>; }; }; afec1_default: afec1_default { /* ADCH - J504 */ group1 { pinmux = <PC31X_AFE1_AD6>; }; }; can0_default: can0_default { group1 { pinmux = <PB3A_CAN0_RX>, <PB2A_CAN0_TX>; }; }; gmac_rmii: gmac_rmii { group1 { pinmux = <PD0A_GMAC_GTXCK>, <PD1A_GMAC_GTXEN>, <PD2A_GMAC_GTX0>, <PD3A_GMAC_GTX1>, <PD4A_GMAC_GRXDV>, <PD5A_GMAC_GRX0>, <PD6A_GMAC_GRX1>, <PD7A_GMAC_GRXER>; }; }; mdio_default: mdio_default { group1 { pinmux = <PD8A_GMAC_GMDC>, <PD9A_GMAC_GMDIO>; }; }; pwm_default: pwm_default { group1 { pinmux = <PA0A_PWMC0_PWMH0>, <PC19B_PWMC0_PWMH2>, <PD26A_PWMC0_PWML2>; }; }; spi0_default: spi0_default { group1 { pinmux = <PD20B_SPI0_MISO>, <PD21B_SPI0_MOSI>, <PD22B_SPI0_SPCK>, <PD25B_SPI0_NPCS1>, <PD27B_SPI0_NPCS3>; }; }; ssc_default: ssc_default { group1 { pinmux = <PD24B_SSC_RF>, <PA22A_SSC_RK>, <PA10C_SSC_RD>, <PB0D_SSC_TF>, <PB1D_SSC_TK>, <PB5D_SSC_TD>; }; }; qdec0_default: qdec0_default { group1 { pinmux = <PA0B_TC0_TIOA0>, <PA1B_TC0_TIOB0>; }; }; qdec1_default: qdec1_default { group1 { pinmux = <PC23B_TC1_TIOA3>, <PC24B_TC1_TIOB3>; }; }; qdec2_default: qdec2_default { group1 { pinmux = <PC5B_TC2_TIOA6>, <PC6B_TC2_TIOB6>; }; }; qdec3_default: qdec3_default { group1 { pinmux = <PE0B_TC3_TIOA9>, <PE1B_TC3_TIOB9>; }; }; twihs0_default: twihs0_default { group1 { pinmux = <PA4A_TWI0_TWCK>, <PA3A_TWI0_TWD>; }; }; twihs2_default: twihs2_default { group1 { pinmux = <PD28C_TWI2_TWCK>, <PD27C_TWI2_TWD>; }; }; uart3_default: uart3_default { group1 { pinmux = <PD28A_UART3_RXD>, <PD30A_UART3_TXD>; }; }; uart4_default: uart4_default { group1 { pinmux = <PD19C_UART4_TXD>, <PD18C_UART4_RXD>; }; }; usart0_default: usart0_default { group1 { pinmux = <PB0C_USART0_RXD>, <PB1C_USART0_TXD>; }; }; usart0_hw_ctrl_flow_clk: usart0_hw_ctrl_flow_clk { group1 { pinmux = <PB0C_USART0_RXD>, <PB3C_USART0_RTS>; bias-pull-up; }; group2 { pinmux = <PB1C_USART0_TXD>, <PB2C_USART0_CTS>, <PB13C_USART0_SCK>; }; }; usart1_default: usart1_default { group1 { pinmux = <PA21A_USART1_RXD>, <PB4D_USART1_TXD>; }; }; usart1_hw_ctrl_flow: usart1_hw_ctrl_flow { group1 { pinmux = <PA21A_USART1_RXD>, <PA24A_USART1_RTS>; bias-pull-up; }; group2 { pinmux = <PB4D_USART1_TXD>, <PA25A_USART1_CTS>; }; }; usart2_default: usart2_default { group1 { pinmux = <PD15B_USART2_RXD>, <PD16B_USART2_TXD>; }; }; usart2_hw_ctrl_flow_clk: usart2_hw_ctrl_flow_clk { group1 { pinmux = <PD15B_USART2_RXD>, <PD18B_USART2_RTS>; bias-pull-up; }; group2 { pinmux = <PD16B_USART2_TXD>, <PD19B_USART2_CTS>, <PD17B_USART2_SCK>; }; }; }; ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained-pinctrl.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,309
```unknown CONFIG_BUILD_OUTPUT_HEX=y CONFIG_ARM_MPU=y CONFIG_CACHE_MANAGEMENT=y CONFIG_HW_STACK_PROTECTION=y CONFIG_WDT_DISABLE_AT_BOOT=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
48
```unknown /* * */ /dts-v1/; #include <atmel/same70q21.dtsi> #include "sam_e70_xplained-common.dtsi" / { model = "Atmel SAM E70 Xplained board"; compatible = "atmel,sam_e70_xplained", "atmel,same70q21", "atmel,same70"; }; ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
82
```cmake board_runner_args(openocd --cmd-post-verify "atsamv gpnvm set 1") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
41
```unknown /* * */ #include "sam_e70_xplained-pinctrl.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { aliases { i2c-0 = &twihs0; i2c-1 = &twihs2; led0 = &green_led; sw0 = &sw0_user_button; watchdog0 = &wdt; }; chosen { zephyr,console = &usart1; zephyr,shell-uart = &usart1; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,code-partition = &slot0_partition; zephyr,canbus = &can0; }; leds { compatible = "gpio-leds"; green_led: led_0 { gpios = <&pioc 8 GPIO_ACTIVE_LOW>; label = "User LED"; }; }; gpio_keys { compatible = "gpio-keys"; /* The switch is labeled SW300 in the schematic, and labeled * SW0 on the board, and labeld SW1 User Button on docs */ sw0_user_button: button_1 { label = "User Button"; gpios = <&pioa 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; zephyr,code = <INPUT_KEY_0>; }; }; }; &cpu0 { clock-frequency = <300000000>; }; &afec0 { status = "okay"; pinctrl-0 = <&afec0_default>; pinctrl-names = "default"; }; &afec1 { status = "okay"; pinctrl-0 = <&afec1_default>; pinctrl-names = "default"; }; &dacc { status = "okay"; }; &twihs0 { status = "okay"; pinctrl-0 = <&twihs0_default>; pinctrl-names = "default"; eeprom: eeprom@5f { compatible = "atmel,24mac402"; reg = <0x5f>; }; }; &twihs2 { status = "okay"; pinctrl-0 = <&twihs2_default>; pinctrl-names = "default"; }; &spi0 { status = "okay"; pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&piod 25 GPIO_ACTIVE_LOW>, <&piod 27 GPIO_ACTIVE_LOW>; dmas = <&xdmac 1 DMA_PERID_SPI0_TX>, <&xdmac 2 DMA_PERID_SPI0_RX>; dma-names = "tx", "rx"; }; &usart1 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&usart1_default>; pinctrl-names = "default"; }; &wdt { status = "okay"; }; zephyr_udc0: &usbhs { status = "okay"; }; &gmac { status = "okay"; pinctrl-0 = <&gmac_rmii>; pinctrl-names = "default"; mac-eeprom = <&eeprom>; phy-handle = <&phy>; }; &mdio { status = "okay"; pinctrl-0 = <&mdio_default>; pinctrl-names = "default"; phy: ethernet-phy@0 { compatible = "ethernet-phy"; status = "okay"; reg = <0>; }; }; &pwm0 { status = "okay"; pinctrl-0 = <&pwm_default>; pinctrl-names = "default"; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* * The first half of sector 0 (64 kbytes) * is reserved for the bootloader */ boot_partition: partition@0 { label = "mcuboot"; reg = <0x0 0x00010000>; read-only; }; /* From sector 1 to sector 7 (included): slot0 (896 kbytes) */ slot0_partition: partition@20000 { label = "image-0"; reg = <0x00020000 0x000e0000>; }; /* From sector 8 to sector 14 (included): slot1 (896 kbytes) */ slot1_partition: partition@100000 { label = "image-1"; reg = <0x00100000 0x000e0000>; }; /* Sector 15: scratch (128 kbytes) */ scratch_partition: partition@1e0000 { label = "image-scratch"; reg = <0x001e0000 0x00020000>; }; }; }; &ssc { status = "okay"; pinctrl-0 = <&ssc_default>; pinctrl-names = "default"; dma-names = "rx", "tx"; dmas = <&xdmac 22 DMA_PERID_SSC_RX>, <&xdmac 23 DMA_PERID_SSC_TX>; }; &xdmac { status = "okay"; }; &can0 { status = "okay"; pinctrl-0 = <&can0_default>; pinctrl-names = "default"; can-transceiver { max-bitrate = <5000000>; }; }; &tc0 { qdec0: qdec { pinctrl-0 = <&qdec0_default>; pinctrl-names = "default"; }; }; &tc1 { qdec1: qdec { pinctrl-0 = <&qdec1_default>; pinctrl-names = "default"; }; }; &tc2 { qdec2: qdec { pinctrl-0 = <&qdec2_default>; pinctrl-names = "default"; }; }; &tc3 { qdec3: qdec { pinctrl-0 = <&qdec3_default>; pinctrl-names = "default"; }; }; ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained-common.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,366
```cmake # Suppress "unique_unit_address_if_enabled" to handle the following overlaps: # - /soc/ethernet@40050000 & /soc/mdio@40050000 list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/pre_dt_board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
55
```unknown /* * */ /dts-v1/; #include <atmel/same70q21b.dtsi> #include "sam_e70_xplained-common.dtsi" / { model = "Atmel SAM E70B Xplained board"; compatible = "atmel,sam_e70b_xplained", "atmel,same70q21b", "atmel,same70b"; }; ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
87
```yaml board: name: sam_e70_xplained vendor: atmel socs: - name: same70q21 - name: same70q21b ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
42
```yaml identifier: sam_e70_xplained/same70q21 name: SAM E70 Xplained type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 2048 ram: 384 supported: - adc - can - counter - dac - dma - gpio - hwinfo - i2s - pwm - netif:eth - spi - usb - usb_device - watchdog vendor: atmel ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
135
```unknown # Atmel SMART SAM E70 Xplained Board configuration if ETH_SAM_GMAC # Read MAC address from AT24MAC402 EEPROM config ETH_SAM_GMAC_MAC_I2C_INT_ADDRESS default 0x9A config ETH_SAM_GMAC_MAC_I2C_INT_ADDRESS_SIZE default 1 config ETH_SAM_GMAC_MAC_I2C_EEPROM default y select I2C endif # ETH_SAM_GMAC if NETWORKING config NET_L2_ETHERNET default y endif # NETWORKING ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
119
```unknown config BOARD_SAM_E70_XPLAINED select SOC_SAME70Q21 if BOARD_SAM_E70_XPLAINED_SAME70Q21 select SOC_SAME70Q21B if BOARD_SAM_E70_XPLAINED_SAME70Q21B ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/Kconfig.sam_e70_xplained
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
58
```unknown CONFIG_BUILD_OUTPUT_HEX=y CONFIG_ARM_MPU=y CONFIG_CACHE_MANAGEMENT=y CONFIG_HW_STACK_PROTECTION=y CONFIG_WDT_DISABLE_AT_BOOT=y CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
48
```ini if {[info exists env(OPENOCD_INTERFACE)]} { set INTERFACE $env(OPENOCD_INTERFACE) } else { # By default connect over Debug USB port using the EDBG chip set INTERFACE "cmsis-dap" } source [find interface/$INTERFACE.cfg] transport select swd set CHIPNAME atsame70q21 source [find target/atsamv.cfg] reset_config srst_only $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
143
```yaml identifier: sam_e70_xplained/same70q21b name: SAM E70 Xplained (Revision B) type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools flash: 2048 ram: 384 supported: - adc - can - counter - dac - dma - gpio - hwinfo - i2s - pwm - netif:eth - spi - usb - usb_device - watchdog vendor: atmel ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
139
```restructuredtext .. _boards-st: STMicroelectronics ################## .. toctree:: :maxdepth: 1 :glob: **/* ```
/content/code_sandbox/boards/st/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```cmake board_runner_args(jlink "--device=STM32L031K6" "--speed=4000") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_l031k6/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56
```unknown config BOARD_NUCLEO_L031K6 select SOC_STM32L031XX ```
/content/code_sandbox/boards/st/nucleo_l031k6/Kconfig.nucleo_l031k6
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
22