Skip to content

Commit 9875d7d

Browse files
alextricalfpistm
authored andcommitted
variant: add BTT EBB42 v1.1 board
1 parent ae6aaa4 commit 9875d7d

File tree

4 files changed

+349
-0
lines changed

4 files changed

+349
-0
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
603603
| :green_heart: | STM32F401VE | [STEVAL-3DP001V1](https://www.st.com/en/evaluation-tools/steval-3dp001v1.html) | *1.6.0* | |
604604
| :green_heart: | STM32F446RE | [VAkE v1.0](https://www.facebook.com/pages/category/Product-Service/VAkE-Board-2290066274575218/) | *1.6.0* | |
605605
| :green_heart: | STM32F446VE | [FYSETC_S6](https://wiki.fysetc.com/FYSETC_S6/) | *1.9.0* | |
606+
| :yellow_heart: | STM32G0B1CB | [BTT EBB42 CAN V1.1](https://github.com/bigtreetech/EBB/tree/master/EBB%20CAN%20V1.1%20(STM32G0B1)/EBB42%20CAN%20V1.1) | **2.4.0** | |
606607

607608
### [Blues Wireless](https://blues.io/) boards
608609

Diff for: boards.txt

+12
Original file line numberDiff line numberDiff line change
@@ -8323,6 +8323,18 @@ GenWL.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg
83238323
3dprinter.menu.pnum.ARMED_V1.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
83248324
3dprinter.menu.pnum.ARMED_V1.build.cmsis_lib_gcc=arm_cortexM4lf_math
83258325

8326+
# Big Tree Tech EBB42_V1_1 board
8327+
3dprinter.menu.pnum.EBB42_V1_1=Big Tree Tech EBB42 V1.1
8328+
3dprinter.menu.pnum.EBB42_V1_1.upload.maximum_size=131072
8329+
3dprinter.menu.pnum.EBB42_V1_1.upload.maximum_data_size=147456
8330+
3dprinter.menu.pnum.EBB42_V1_1.build.mcu=cortex-m0plus
8331+
3dprinter.menu.pnum.EBB42_V1_1.build.board=EBB42_V1_1
8332+
3dprinter.menu.pnum.EBB42_V1_1.build.series=STM32G0xx
8333+
3dprinter.menu.pnum.EBB42_V1_1.build.product_line=STM32G0B1xx
8334+
3dprinter.menu.pnum.EBB42_V1_1.build.variant=STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)
8335+
3dprinter.menu.pnum.EBB42_V1_1.build.cmsis_lib_gcc=arm_cortexM0l_math
8336+
3dprinter.menu.pnum.EBB42_V1_1.build.st_extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} -D__CORTEX_SC=0
8337+
83268338
# REMRAM_V1 board
83278339
3dprinter.menu.pnum.REMRAM_V1=RemRam v1
83288340
3dprinter.menu.pnum.REMRAM_V1.upload.maximum_size=2097152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2021, STMicroelectronics
4+
* All rights reserved.
5+
*
6+
* This software component is licensed by ST under BSD 3-Clause license,
7+
* the "License"; You may not use this file except in compliance with the
8+
* License. You may obtain a copy of the License at:
9+
* opensource.org/licenses/BSD-3-Clause
10+
*
11+
*******************************************************************************
12+
*/
13+
14+
#if defined(ARDUINO_EBB42_V1_1)
15+
#include "pins_arduino.h"
16+
17+
// Pin number
18+
const PinName digitalPin[] = {
19+
PA_0, // D0/A0
20+
PA_1, // D1/A1
21+
PA_2, // D2/A2
22+
PA_3, // D3/A3
23+
PA_4, // D4/A4
24+
PA_5, // D5/A5
25+
PA_6, // D6/A6
26+
PA_7, // D7/A7
27+
PA_8, // D8
28+
PA_9, // D9
29+
PA_10, // D10
30+
PA_11, // D11
31+
PA_12, // D12
32+
PA_13, // D13
33+
PA_14, // D14
34+
PA_15, // D15
35+
PB_0, // D16/A8
36+
PB_1, // D17/A9
37+
PB_2, // D18/A10
38+
PB_3, // D19
39+
PB_4, // D20
40+
PB_5, // D21
41+
PB_6, // D22
42+
PB_7, // D23
43+
PB_8, // D24
44+
PB_9, // D25
45+
PB_10, // D26/A11
46+
PB_11, // D27/A12
47+
PB_12, // D28/A13
48+
PB_13, // D29
49+
PB_14, // D30
50+
PB_15, // D31
51+
PC_6, // D32
52+
PC_7, // D33
53+
PC_13, // D34
54+
PC_14, // D35
55+
PC_15, // D36
56+
PD_0, // D37
57+
PD_1, // D38
58+
PD_2, // D39
59+
PD_3, // D40
60+
PF_0, // D41
61+
PF_1, // D42
62+
PF_2, // D43
63+
PA_9_R, // D44
64+
PA_10_R // D45
65+
};
66+
67+
// Analog (Ax) pin number array
68+
const uint32_t analogInputPin[] = {
69+
0, // A0, PA0
70+
1, // A1, PA1
71+
2, // A2, PA2
72+
3, // A3, PA3
73+
4, // A4, PA4
74+
5, // A5, PA5
75+
6, // A6, PA6
76+
7, // A7, PA7
77+
16, // A8, PB0
78+
17, // A9, PB1
79+
18, // A10, PB2
80+
26, // A11, PB10
81+
27, // A12, PB11
82+
28 // A13, PB12
83+
};
84+
85+
// ----------------------------------------------------------------------------
86+
87+
#ifdef __cplusplus
88+
extern "C" {
89+
#endif
90+
91+
/**
92+
* @brief System Clock Configuration
93+
* @param None
94+
* @retval None
95+
*/
96+
WEAK void SystemClock_Config(void)
97+
{
98+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
99+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
100+
101+
/** Configure the main internal regulator output voltage
102+
*/
103+
HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);
104+
105+
/** Initializes the RCC Oscillators according to the specified parameters
106+
* in the RCC_OscInitTypeDef structure.
107+
*/
108+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_HSI48;
109+
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
110+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
111+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
112+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
113+
RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1;
114+
RCC_OscInitStruct.PLL.PLLN = 16;
115+
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
116+
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
117+
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
118+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
119+
Error_Handler();
120+
}
121+
122+
/** Initializes the CPU, AHB and APB buses clocks
123+
*/
124+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
125+
| RCC_CLOCKTYPE_PCLK1;
126+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
127+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
128+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
129+
130+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) {
131+
Error_Handler();
132+
}
133+
}
134+
135+
#ifdef __cplusplus
136+
}
137+
#endif
138+
#endif /* ARDUINO_EBB42_V1_1 */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2020, STMicroelectronics
4+
* All rights reserved.
5+
*
6+
* This software component is licensed by ST under BSD 3-Clause license,
7+
* the "License"; You may not use this file except in compliance with the
8+
* License. You may obtain a copy of the License at:
9+
* opensource.org/licenses/BSD-3-Clause
10+
*
11+
*******************************************************************************
12+
*/
13+
#pragma once
14+
15+
/*----------------------------------------------------------------------------
16+
* STM32 pins number
17+
*----------------------------------------------------------------------------*/
18+
#define PA0 PIN_A0
19+
#define PA1 PIN_A1
20+
#define PA2 PIN_A2
21+
#define PA3 PIN_A3
22+
#define PA4 PIN_A4
23+
#define PA5 PIN_A5
24+
#define PA6 PIN_A6
25+
#define PA7 PIN_A7
26+
#define PA8 8
27+
#define PA9 9
28+
#define PA10 10
29+
#define PA11 11
30+
#define PA12 12
31+
#define PA13 13
32+
#define PA14 14
33+
#define PA15 15
34+
#define PB0 PIN_A8
35+
#define PB1 PIN_A9
36+
#define PB2 PIN_A10
37+
#define PB3 19
38+
#define PB4 20
39+
#define PB5 21
40+
#define PB6 22
41+
#define PB7 23
42+
#define PB8 24
43+
#define PB9 25
44+
#define PB10 PIN_A11
45+
#define PB11 PIN_A12
46+
#define PB12 PIN_A13
47+
#define PB13 29
48+
#define PB14 30
49+
#define PB15 31
50+
#define PC6 32
51+
#define PC7 33
52+
#define PC13 34
53+
#define PC14 35
54+
#define PC15 36
55+
#define PD0 37
56+
#define PD1 38
57+
#define PD2 39
58+
#define PD3 40
59+
#define PF0 41
60+
#define PF1 42
61+
#define PF2 43
62+
#define PA9_R 44
63+
#define PA10_R 45
64+
65+
// Alternate pins number
66+
#define PA1_ALT1 (PA1 | ALT1)
67+
#define PA2_ALT1 (PA2 | ALT1)
68+
#define PA3_ALT1 (PA3 | ALT1)
69+
#define PA4_ALT1 (PA4 | ALT1)
70+
#define PA6_ALT1 (PA6 | ALT1)
71+
#define PA6_ALT2 (PA6 | ALT2)
72+
#define PA7_ALT1 (PA7 | ALT1)
73+
#define PA7_ALT2 (PA7 | ALT2)
74+
#define PA7_ALT3 (PA7 | ALT3)
75+
#define PA9_ALT1 (PA9 | ALT1)
76+
#define PA9_R_ALT1 (PA9_R | ALT1)
77+
#define PA10_ALT1 (PA10 | ALT1)
78+
#define PA10_R_ALT1 (PA10_R | ALT1)
79+
#define PA14_ALT1 (PA14 | ALT1)
80+
#define PA15_ALT1 (PA15 | ALT1)
81+
#define PB0_ALT1 (PB0 | ALT1)
82+
#define PB1_ALT1 (PB1 | ALT1)
83+
#define PB1_ALT2 (PB1 | ALT2)
84+
#define PB3_ALT1 (PB3 | ALT1)
85+
#define PB4_ALT1 (PB4 | ALT1)
86+
#define PB5_ALT1 (PB5 | ALT1)
87+
#define PB6_ALT1 (PB6 | ALT1)
88+
#define PB6_ALT2 (PB6 | ALT2)
89+
#define PB7_ALT1 (PB7 | ALT1)
90+
#define PB8_ALT1 (PB8 | ALT1)
91+
#define PB9_ALT1 (PB9 | ALT1)
92+
#define PB13_ALT1 (PB13 | ALT1)
93+
#define PB14_ALT1 (PB14 | ALT1)
94+
#define PB15_ALT1 (PB15 | ALT1)
95+
#define PB15_ALT2 (PB15 | ALT2)
96+
#define PC6_ALT1 (PC6 | ALT1)
97+
#define PC7_ALT1 (PC7 | ALT1)
98+
99+
#define NUM_DIGITAL_PINS 46
100+
#define NUM_REMAP_PINS 2
101+
#define NUM_ANALOG_INPUTS 14
102+
103+
// On-board LED pin number
104+
#ifndef LED_BUILTIN
105+
#define LED_BUILTIN PNUM_NOT_DEFINED
106+
#endif
107+
108+
// On-board user button
109+
#ifndef USER_BTN
110+
#define USER_BTN PNUM_NOT_DEFINED
111+
#endif
112+
113+
// SPI definitions
114+
#ifndef PIN_SPI_SS
115+
#define PIN_SPI_SS PA4
116+
#endif
117+
#ifndef PIN_SPI_SS1
118+
#define PIN_SPI_SS1 PA15
119+
#endif
120+
#ifndef PIN_SPI_SS2
121+
#define PIN_SPI_SS2 PB0
122+
#endif
123+
#ifndef PIN_SPI_SS3
124+
#define PIN_SPI_SS3 PNUM_NOT_DEFINED
125+
#endif
126+
#ifndef PIN_SPI_MOSI
127+
#define PIN_SPI_MOSI PA2
128+
#endif
129+
#ifndef PIN_SPI_MISO
130+
#define PIN_SPI_MISO PA6
131+
#endif
132+
#ifndef PIN_SPI_SCK
133+
#define PIN_SPI_SCK PA1
134+
#endif
135+
136+
// I2C definitions
137+
#ifndef PIN_WIRE_SDA
138+
#define PIN_WIRE_SDA PA6
139+
#endif
140+
#ifndef PIN_WIRE_SCL
141+
#define PIN_WIRE_SCL PA7
142+
#endif
143+
144+
// Timer Definitions
145+
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
146+
#ifndef TIMER_TONE
147+
#define TIMER_TONE TIM6
148+
#endif
149+
#ifndef TIMER_SERVO
150+
#define TIMER_SERVO TIM7
151+
#endif
152+
153+
// UART Definitions
154+
#ifndef SERIAL_UART_INSTANCE
155+
#define SERIAL_UART_INSTANCE 4
156+
#endif
157+
158+
// Default pin used for generic 'Serial' instance
159+
// Mandatory for Firmata
160+
#ifndef PIN_SERIAL_RX
161+
#define PIN_SERIAL_RX PA1
162+
#endif
163+
#ifndef PIN_SERIAL_TX
164+
#define PIN_SERIAL_TX PA0
165+
#endif
166+
167+
// Extra HAL modules
168+
#if !defined(HAL_DAC_MODULE_DISABLED)
169+
#define HAL_DAC_MODULE_ENABLED
170+
#endif
171+
172+
/*----------------------------------------------------------------------------
173+
* Arduino objects - C++ only
174+
*----------------------------------------------------------------------------*/
175+
176+
#ifdef __cplusplus
177+
// These serial port names are intended to allow libraries and architecture-neutral
178+
// sketches to automatically default to the correct port name for a particular type
179+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
180+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
181+
//
182+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
183+
//
184+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
185+
//
186+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
187+
//
188+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
189+
//
190+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
191+
// pins are NOT connected to anything by default.
192+
#ifndef SERIAL_PORT_MONITOR
193+
#define SERIAL_PORT_MONITOR Serial
194+
#endif
195+
#ifndef SERIAL_PORT_HARDWARE
196+
#define SERIAL_PORT_HARDWARE Serial
197+
#endif
198+
#endif

0 commit comments

Comments
 (0)