Skip to content

Commit 25638e5

Browse files
authored
Merge pull request #14 from shaoziyang/master
add PybNano V2 baord
2 parents 65fd893 + d51cb8b commit 25638e5

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

boards/pybnanov2/board.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#ifndef BOARD_H
2+
#define BOARD_H
3+
4+
#include "../../pins.h"
5+
6+
#define OSC_FREQ 8
7+
#define USBDEVICESTRING "PYB Nano v2"
8+
#define USBMFGSTRING "pybCN"
9+
#define BOARD_FLASH_SECTORS 8
10+
#define BOARD_FLASH_SIZE (512 * 1024)
11+
12+
13+
#ifdef DEFINE_CONFIGDATA
14+
__attribute__((section(".config"))) __attribute__((used)) //
15+
const uint32_t configData[] = {
16+
/* CF2 START */
17+
513675505, 539130489, // magic
18+
32, 100, // used entries, total entries
19+
CFG_PIN_LED1, 0, // PA_0 red
20+
CFG_PIN_LED2, 1, // PA_1 green
21+
CFG_PIN_LED3, 2, // PA_2 orange
22+
CFG_PIN_LED4, 3, // PA_3 blue
23+
CFG_PIN_BTN_A, 0x2D, // PC_13
24+
204, 0x80000, // FLASH_BYTES = 0x80000
25+
205, 0x18000, // RAM_BYTES = 0x18000
26+
208, 0x2d89a8a6, // BOOTLOADER_BOARD_ID = 0x2d89a8a6
27+
209, 0x57755a57, // UF2_FAMILY = STM32F401
28+
210, 0x10, // PINS_PORT_SIZE = PA_16
29+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
30+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
32+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
33+
0, 0, 0, 0, 0, 0, 0, 0,
34+
/* CF2 END */
35+
};
36+
#endif
37+
38+
#endif /* BOARD_H */

0 commit comments

Comments
 (0)