Wirepas SDK
board.h
Go to the documentation of this file.
1/* Copyright 2023 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
13#ifndef BOARD_PCA20049_BOARD_H_
14#define BOARD_PCA20049_BOARD_H_
15
16// Thingy91+ modem initialization AT commands to define antenna path.
17// BOARD_AT_COMMANDS is list of AT commands, where
18// each AT command is separated by null character ('\0'), and
19// end of the list is indicated with double null characters ("\0\0")
20#define BOARD_AT_COMMANDS "AT%XMIPIRFFEDEV=1,4,71,198,248\0" \
21 "AT%XMIPIRFFECTRL=1,0,1,28,248\0" \
22 "AT%XMIPIRFFECTRL=1,1,1,28,56,13,0,0,8,8,715,4,4,770,12,12,829,11,11,863,130,130,892,1,1,939,129,129,978,26,26,1042,8,8,1118,4,4,1270,12,12,1386,14,14,1523,130,130,2200\0" \
23 "AT%XMIPIRFFECTRL=1,2,1,28,184\0" \
24 "AT%XMIPIRFFECTRL=1,3,1,28,184\0" \
25 "AT+CFUN=0\0"
26
27// NRF_GPIO is mapped to NRF_P0 , for pins P0.00 ... P0.31
28// With nrf_gpio.h, use SW_pin (logical pins, port-aware)
29
67// Serial port pins
68#define BOARD_USART_TX_PIN 0 // P0.00
69#define BOARD_USART_RX_PIN 1 // P0.01
70#define BOARD_USART_CTS_PIN 2 // P0.02. For USE_USART_HW_FLOW_CONTROL
71#define BOARD_USART_RTS_PIN 3 // P0.03. For USE_USART_HW_FLOW_CONTROL
72
73// List of GPIO pins
74#define BOARD_GPIO_PIN_LIST {29, /* P0.29 */\
75 30, /* P0.30 */\
76 31, /* P0.31 */\
77 26, /* P0.26 */\
78 1, /* P0.01. required by the dual_mcu app. usart wakeup pin (= BOARD_USART_RX) */\
79 10} /* P0.10. required by the dual_mcu app (indication signal) */
80
81// User friendly name for GPIOs (IDs mapped to the BOARD_GPIO_PIN_LIST table)
82#define BOARD_GPIO_ID_LED1 0 // mapped to pin P0.29
83#define BOARD_GPIO_ID_LED2 1 // mapped to pin P0.30
84#define BOARD_GPIO_ID_LED3 2 // mapped to pin P0.31
85#define BOARD_GPIO_ID_BUTTON1 3 // mapped to pin P0.26
86#define BOARD_GPIO_ID_USART_WAKEUP 4 // mapped to usart rx pin
87#define BOARD_GPIO_ID_UART_IRQ 5 // mapped to pin P0.10
88
89// List of LED IDs mapped to GPIO IDs: LED 1 to LED 6
90#define BOARD_LED_ID_LIST {BOARD_GPIO_ID_LED1, BOARD_GPIO_ID_LED2, BOARD_GPIO_ID_LED3}
91
92// List of button IDs mapped to GPIO IDs
93#define BOARD_BUTTON_ID_LIST {BOARD_GPIO_ID_BUTTON1}
94
95// Active low polarity for LEDs
96#define BOARD_LED_ACTIVE_LOW false
97
98// Active low polarity for buttons
99#define BOARD_BUTTON_ACTIVE_LOW true
100
101// Active internal pull-up for buttons
102#define BOARD_BUTTON_INTERNAL_PULL true
103
104// The board supports DCDC (#define BOARD_SUPPORT_DCDC)
105// Since SDK v1.2 (bootloader > v7) this option has been move to
106// board/<board_name>/config.mk. Set board_hw_dcdc to yes to enable DCDC.
107#ifdef BOARD_SUPPORT_DCDC
108#error This option has been moved to board/<board_name>/config.mk
109#endif
110
111// External Flash Memory using Wirepas designed flex-PCB
112#define EXT_FLASH_SPI_SCK 13 // P0.13 TP34
113#define EXT_FLASH_SPI_MOSI 14 // P0.14 TP35
114#define EXT_FLASH_SPI_MISO 15 // P0.15 TP36
115#define EXT_FLASH_CS 12 // P0.12 TP33
116#define EXT_FLASH_SPIM_P NRF_SPIM1
117// Enable external flash memory debugging using LEDs.
118#define EXT_FLASH_DRIVER_DEBUG_LED
119
120// I2C Port pin
121#define USE_I2C2
122#define BOARD_I2C_SCL_PIN 8 // P0.08
123#define BOARD_I2C_SDA_PIN 9 // P0.09
124
125// The I2C address for environment sensor
126#define BME688_I2C_ADDRESS 0x76
127
128// The I2C address for accelerometer
129#define ADXL367_I2C_ADDRESS 0x1D
130
131// Not defined as there are no free GPIO pins to use with Thingy91
132//#define HAL_DBG_MCU_PIN ?? // P0.??
133//#define HAL_DBG_TASK_MGMT_PIN ?? // P0.??
134//#define HAL_DBG_TASK_ROUTE_PIN ?? // P0.??
135//#define HAL_DBG_TASK_WAPS_PIN ?? // P0.??
136//#define HAL_DBG_TASK_MAC_PIN ?? // P0.??
137//#define HAL_DBG_IRQ_USART_PIN ?? // P0.??
138//#define HAL_DBG_RADIO_CRC_PIN ?? // P0.??
139//#define HAL_DBG_IRQ_RTC_PIN ?? // P0.??
140//#define HAL_DBG_IRQ_RADIO_PIN ?? // P0.??
141//#define HAL_DBG_RADIO_TX_PIN ?? // P0.??
142//#define HAL_DBG_RADIO_RX_PIN ?? // P0.??
143//#define HAL_DBG_ASSERT_PIN ?? // P0.??
144
145#endif /* BOARD_PCA20035_BOARD_H_ */