All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
board.h File Reference

Board specific configuration for the Seeed Studio XIAO nRF52840. More...

Detailed Description

Board specific configuration for the Seeed Studio XIAO nRF52840.

Author
Mikolai Gütschow mikol.nosp@m.ai.g.nosp@m.uetsc.nosp@m.how@.nosp@m.tu-dr.nosp@m.esde.nosp@m.n.de

Definition in file board.h.

#include "cpu.h"
#include "board_common.h"
#include "periph/gpio.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MTD_0   mtd_dev_get(0)
 Default MTD device.
 

LED pin configuration

#define LED0_PIN   GPIO_PIN(0, 26)
 
#define LED1_PIN   GPIO_PIN(0, 30)
 
#define LED2_PIN   GPIO_PIN(0, 6)
 
#define LED_PORT   (NRF_P0)
 
#define LED0_MASK   (1 << 26)
 
#define LED1_MASK   (1 << 30)
 
#define LED2_MASK   (1 << 6)
 
#define LED_MASK   (LED0_MASK | LED1_MASK | LED2_MASK)
 
#define LED0_ON   (LED_PORT->OUTCLR = LED0_MASK)
 
#define LED0_OFF   (LED_PORT->OUTSET = LED0_MASK)
 
#define LED0_TOGGLE   (LED_PORT->OUT ^= LED0_MASK)
 
#define LED1_ON   (LED_PORT->OUTCLR = LED1_MASK)
 
#define LED1_OFF   (LED_PORT->OUTSET = LED1_MASK)
 
#define LED1_TOGGLE   (LED_PORT->OUT ^= LED1_MASK)
 
#define LED2_ON   (LED_PORT->OUTCLR = LED2_MASK)
 
#define LED2_OFF   (LED_PORT->OUTSET = LED2_MASK)
 
#define LED2_TOGGLE   (LED_PORT->OUT ^= LED2_MASK)
 

SPI NOR flash hardware configuration

A 2MB P25Q16H flash is present on the board.

See also
https://files.seeedstudio.com/wiki/github_weiruanexample/Flash_P25Q16H-UXH-IR_Datasheet.pdf
#define XIAO_NRF52840_NOR_PAGE_SIZE   (256)
 
#define XIAO_NRF52840_NOR_PAGES_PER_SECTOR   (16)
 
#define XIAO_NRF52840_NOR_SECTOR_COUNT   (512)
 
#define XIAO_NRF52840_NOR_FLAGS    (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K | SPI_NOR_F_SECT_64K)
 
#define XIAO_NRF52840_NOR_SPI_DEV   SPI_DEV(1)
 
#define XIAO_NRF52840_NOR_SPI_CLK   SPI_CLK_10MHZ
 
#define XIAO_NRF52840_NOR_SPI_CS   GPIO_PIN(0, 25)
 
#define XIAO_NRF52840_NOR_SPI_WP   GPIO_PIN(0, 22)
 
#define XIAO_NRF52840_NOR_SPI_HOLD   GPIO_PIN(0, 23)
 
#define XIAO_NRF52840_NOR_SPI_MODE   SPI_MODE_0
 

ztimer configuration values

#define CONFIG_ZTIMER_USEC_ADJUST_SET   7
 
#define CONFIG_ZTIMER_USEC_ADJUST_SLEEP   22
 

Macro Definition Documentation

◆ CONFIG_ZTIMER_USEC_ADJUST_SET

#define CONFIG_ZTIMER_USEC_ADJUST_SET   7

Definition at line 86 of file board.h.

◆ CONFIG_ZTIMER_USEC_ADJUST_SLEEP

#define CONFIG_ZTIMER_USEC_ADJUST_SLEEP   22

Definition at line 87 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 26)

Definition at line 39 of file board.h.

◆ LED0_OFF

#define LED0_OFF   (LED_PORT->OUTSET = LED0_MASK)

Definition at line 45 of file board.h.

◆ LED0_ON

#define LED0_ON   (LED_PORT->OUTCLR = LED0_MASK)

Definition at line 44 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(0, 26)

Definition at line 34 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   (LED_PORT->OUT ^= LED0_MASK)

Definition at line 46 of file board.h.

◆ LED1_MASK

#define LED1_MASK   (1 << 30)

Definition at line 40 of file board.h.

◆ LED1_OFF

#define LED1_OFF   (LED_PORT->OUTSET = LED1_MASK)

Definition at line 49 of file board.h.

◆ LED1_ON

#define LED1_ON   (LED_PORT->OUTCLR = LED1_MASK)

Definition at line 48 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(0, 30)

Definition at line 35 of file board.h.

◆ LED1_TOGGLE

#define LED1_TOGGLE   (LED_PORT->OUT ^= LED1_MASK)

Definition at line 50 of file board.h.

◆ LED2_MASK

#define LED2_MASK   (1 << 6)

Definition at line 41 of file board.h.

◆ LED2_OFF

#define LED2_OFF   (LED_PORT->OUTSET = LED2_MASK)

Definition at line 53 of file board.h.

◆ LED2_ON

#define LED2_ON   (LED_PORT->OUTCLR = LED2_MASK)

Definition at line 52 of file board.h.

◆ LED2_PIN

#define LED2_PIN   GPIO_PIN(0, 6)

Definition at line 36 of file board.h.

◆ LED2_TOGGLE

#define LED2_TOGGLE   (LED_PORT->OUT ^= LED2_MASK)

Definition at line 54 of file board.h.

◆ LED_MASK

#define LED_MASK   (LED0_MASK | LED1_MASK | LED2_MASK)

Definition at line 42 of file board.h.

◆ LED_PORT

#define LED_PORT   (NRF_P0)

Definition at line 38 of file board.h.

◆ MTD_0

#define MTD_0   mtd_dev_get(0)

Default MTD device.

Definition at line 80 of file board.h.

◆ XIAO_NRF52840_NOR_FLAGS

#define XIAO_NRF52840_NOR_FLAGS    (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K | SPI_NOR_F_SECT_64K)

Definition at line 69 of file board.h.

◆ XIAO_NRF52840_NOR_PAGE_SIZE

#define XIAO_NRF52840_NOR_PAGE_SIZE   (256)

Definition at line 66 of file board.h.

◆ XIAO_NRF52840_NOR_PAGES_PER_SECTOR

#define XIAO_NRF52840_NOR_PAGES_PER_SECTOR   (16)

Definition at line 67 of file board.h.

◆ XIAO_NRF52840_NOR_SECTOR_COUNT

#define XIAO_NRF52840_NOR_SECTOR_COUNT   (512)

Definition at line 68 of file board.h.

◆ XIAO_NRF52840_NOR_SPI_CLK

#define XIAO_NRF52840_NOR_SPI_CLK   SPI_CLK_10MHZ

Definition at line 72 of file board.h.

◆ XIAO_NRF52840_NOR_SPI_CS

#define XIAO_NRF52840_NOR_SPI_CS   GPIO_PIN(0, 25)

Definition at line 73 of file board.h.

◆ XIAO_NRF52840_NOR_SPI_DEV

#define XIAO_NRF52840_NOR_SPI_DEV   SPI_DEV(1)

Definition at line 71 of file board.h.

◆ XIAO_NRF52840_NOR_SPI_HOLD

#define XIAO_NRF52840_NOR_SPI_HOLD   GPIO_PIN(0, 23)

Definition at line 75 of file board.h.

◆ XIAO_NRF52840_NOR_SPI_MODE

#define XIAO_NRF52840_NOR_SPI_MODE   SPI_MODE_0

Definition at line 76 of file board.h.

◆ XIAO_NRF52840_NOR_SPI_WP

#define XIAO_NRF52840_NOR_SPI_WP   GPIO_PIN(0, 22)

Definition at line 74 of file board.h.