Loading...
Searching...
No Matches
board.h File Reference

Board configuration for the nRF5340DK-app board. More...

Detailed Description

Board configuration for the nRF5340DK-app board.

Author
Dylan Laduranty dylan.nosp@m..lad.nosp@m.urant.nosp@m.y@me.nosp@m.sotic.nosp@m..com

Definition in file board.h.

#include "cpu.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.

#define CLOCK_CORECLOCK   MHZ(128)
 System core clock speed, for all NRF53 Application core.
 

Clock configuration

#define CLOCK_HFCLK   (CLOCK_HFCLKSRC_SRC_HFXO)
 HFCLK Source selection.
 
#define CLOCK_LFCLK   (CLOCK_LFCLKSRC_SRC_LFXO)
 LFCLK Source.
 

LED pin configuration

#define LED0_PIN   GPIO_PIN(0, 28)
 LED0 pin definition.
 
#define LED1_PIN   GPIO_PIN(0, 29)
 LED1 pin definition.
 
#define LED2_PIN   GPIO_PIN(0, 30)
 LED2 pin definition.
 
#define LED3_PIN   GPIO_PIN(0, 31)
 LED3 pin definition.
 
#define LED0_MASK   (1 << 28)
 LED0 PORT bitmask.
 
#define LED1_MASK   (1 << 29)
 LED1 PORT bitmask.
 
#define LED2_MASK   (1 << 30)
 LED2 PORT bitmask.
 
#define LED3_MASK   (1 << 31)
 LED3 PORT bitmask.
 
#define LED_PORT   (NRF_P0_S)
 Default LED PORT.
 
#define LED0_ON   (LED_PORT->OUTCLR = LED0_MASK)
 LED0 ON macro.
 
#define LED0_OFF   (LED_PORT->OUTSET = LED0_MASK)
 LED0 OFF macro.
 
#define LED0_TOGGLE   (LED_PORT->OUT ^= LED0_MASK)
 LED0 toggle macro.
 
#define LED1_ON   (LED_PORT->OUTCLR = LED1_MASK)
 LED1 ON macro.
 
#define LED1_OFF   (LED_PORT->OUTSET = LED1_MASK)
 LED1 OFF macro.
 
#define LED1_TOGGLE   (LED_PORT->OUT ^= LED1_MASK)
 LED1 toggle macro.
 
#define LED2_ON   (LED_PORT->OUTCLR = LED2_MASK)
 LED2 ON macro.
 
#define LED2_OFF   (LED_PORT->OUTSET = LED2_MASK)
 LED2 OFF macro.
 
#define LED2_TOGGLE   (LED_PORT->OUT ^= LED2_MASK)
 LED2 toggle macro.
 
#define LED3_ON   (LED_PORT->OUTCLR = LED3_MASK)
 LED3 ON macro.
 
#define LED3_OFF   (LED_PORT->OUTSET = LED3_MASK)
 LED3 OFF macro.
 
#define LED3_TOGGLE   (LED_PORT->OUT ^= LED3_MASK)
 LED3 toggle macro.
 

Button pin configuration

#define BTN0_PIN   GPIO_PIN(0, 23)
 BTN0 pin definition.
 
#define BTN0_MODE   GPIO_IN_PU
 BTN0 default mode.
 
#define BTN1_PIN   GPIO_PIN(0, 24)
 BTN1 pin definition.
 
#define BTN1_MODE   GPIO_IN_PU
 BTN1 default mode.
 
#define BTN2_PIN   GPIO_PIN(0, 8)
 BTN2 pin definition.
 
#define BTN2_MODE   GPIO_IN_PU
 BTN2 default mode.
 
#define BTN3_PIN   GPIO_PIN(0, 9)
 BTN3 pin definition.
 
#define BTN3_MODE   GPIO_IN_PU
 BTN3 default mode.
 

MTD configuration

#define MTD_0   mtd_dev_get(0)
 
#define BOARD_QSPI_PIN_CS   GPIO_PIN(0, 18)
 SPI Flash Chip Select.
 
#define BOARD_QSPI_PIN_WP   GPIO_PIN(0, 15)
 SPI Flash Write Protect.
 
#define BOARD_QSPI_PIN_HOLD   GPIO_PIN(0, 16)
 SPI Flash Hold pin.
 

Macro Definition Documentation

◆ BOARD_QSPI_PIN_CS

#define BOARD_QSPI_PIN_CS   GPIO_PIN(0, 18)

SPI Flash Chip Select.

Definition at line 104 of file board.h.

◆ BOARD_QSPI_PIN_HOLD

#define BOARD_QSPI_PIN_HOLD   GPIO_PIN(0, 16)

SPI Flash Hold pin.

Definition at line 106 of file board.h.

◆ BOARD_QSPI_PIN_WP

#define BOARD_QSPI_PIN_WP   GPIO_PIN(0, 15)

SPI Flash Write Protect.

Definition at line 105 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

BTN0 default mode.

Definition at line 89 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(0, 23)

BTN0 pin definition.

Definition at line 88 of file board.h.

◆ BTN1_MODE

#define BTN1_MODE   GPIO_IN_PU

BTN1 default mode.

Definition at line 91 of file board.h.

◆ BTN1_PIN

#define BTN1_PIN   GPIO_PIN(0, 24)

BTN1 pin definition.

Definition at line 90 of file board.h.

◆ BTN2_MODE

#define BTN2_MODE   GPIO_IN_PU

BTN2 default mode.

Definition at line 93 of file board.h.

◆ BTN2_PIN

#define BTN2_PIN   GPIO_PIN(0, 8)

BTN2 pin definition.

Definition at line 92 of file board.h.

◆ BTN3_MODE

#define BTN3_MODE   GPIO_IN_PU

BTN3 default mode.

Definition at line 95 of file board.h.

◆ BTN3_PIN

#define BTN3_PIN   GPIO_PIN(0, 9)

BTN3 pin definition.

Definition at line 94 of file board.h.

◆ CLOCK_CORECLOCK

#define CLOCK_CORECLOCK   MHZ(128)

System core clock speed, for all NRF53 Application core.

Definition at line 31 of file board.h.

◆ CLOCK_HFCLK

#define CLOCK_HFCLK   (CLOCK_HFCLKSRC_SRC_HFXO)

HFCLK Source selection.

Definition at line 42 of file board.h.

◆ CLOCK_LFCLK

#define CLOCK_LFCLK   (CLOCK_LFCLKSRC_SRC_LFXO)

LFCLK Source.

Definition at line 48 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 28)

LED0 PORT bitmask.

Definition at line 60 of file board.h.

◆ LED0_OFF

#define LED0_OFF   (LED_PORT->OUTSET = LED0_MASK)

LED0 OFF macro.

Definition at line 68 of file board.h.

◆ LED0_ON

#define LED0_ON   (LED_PORT->OUTCLR = LED0_MASK)

LED0 ON macro.

Definition at line 67 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(0, 28)

LED0 pin definition.

Definition at line 55 of file board.h.

◆ LED0_TOGGLE

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

LED0 toggle macro.

Definition at line 69 of file board.h.

◆ LED1_MASK

#define LED1_MASK   (1 << 29)

LED1 PORT bitmask.

Definition at line 61 of file board.h.

◆ LED1_OFF

#define LED1_OFF   (LED_PORT->OUTSET = LED1_MASK)

LED1 OFF macro.

Definition at line 72 of file board.h.

◆ LED1_ON

#define LED1_ON   (LED_PORT->OUTCLR = LED1_MASK)

LED1 ON macro.

Definition at line 71 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(0, 29)

LED1 pin definition.

Definition at line 56 of file board.h.

◆ LED1_TOGGLE

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

LED1 toggle macro.

Definition at line 73 of file board.h.

◆ LED2_MASK

#define LED2_MASK   (1 << 30)

LED2 PORT bitmask.

Definition at line 62 of file board.h.

◆ LED2_OFF

#define LED2_OFF   (LED_PORT->OUTSET = LED2_MASK)

LED2 OFF macro.

Definition at line 76 of file board.h.

◆ LED2_ON

#define LED2_ON   (LED_PORT->OUTCLR = LED2_MASK)

LED2 ON macro.

Definition at line 75 of file board.h.

◆ LED2_PIN

#define LED2_PIN   GPIO_PIN(0, 30)

LED2 pin definition.

Definition at line 57 of file board.h.

◆ LED2_TOGGLE

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

LED2 toggle macro.

Definition at line 77 of file board.h.

◆ LED3_MASK

#define LED3_MASK   (1 << 31)

LED3 PORT bitmask.

Definition at line 63 of file board.h.

◆ LED3_OFF

#define LED3_OFF   (LED_PORT->OUTSET = LED3_MASK)

LED3 OFF macro.

Definition at line 80 of file board.h.

◆ LED3_ON

#define LED3_ON   (LED_PORT->OUTCLR = LED3_MASK)

LED3 ON macro.

Definition at line 79 of file board.h.

◆ LED3_PIN

#define LED3_PIN   GPIO_PIN(0, 31)

LED3 pin definition.

Definition at line 58 of file board.h.

◆ LED3_TOGGLE

#define LED3_TOGGLE   (LED_PORT->OUT ^= LED3_MASK)

LED3 toggle macro.

Definition at line 81 of file board.h.

◆ LED_PORT

#define LED_PORT   (NRF_P0_S)

Default LED PORT.

Definition at line 65 of file board.h.

◆ MTD_0

#define MTD_0   mtd_dev_get(0)

Definition at line 102 of file board.h.