led-board v1.0
This commit is contained in:
17
.vscode/tasks.json
vendored
Normal file
17
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "PlatformIO",
|
||||||
|
"task": "Build",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$platformio"
|
||||||
|
],
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
},
|
||||||
|
"label": "PlatformIO: Build"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
45
boards/stm32l031k6.json
Normal file
45
boards/stm32l031k6.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"cpu": "cortex-m0plus",
|
||||||
|
"extra_flags": "-DSTM32L031xx",
|
||||||
|
"f_cpu": "32000000L",
|
||||||
|
"mcu": "stm32l031k6t6",
|
||||||
|
"product_line": "STM32L031xx",
|
||||||
|
"variant": "STM32L031K6",
|
||||||
|
"variants_dir": "../variants"
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"default_tools": [
|
||||||
|
"stlink"
|
||||||
|
],
|
||||||
|
"jlink_device": "STM32L031K6",
|
||||||
|
"onboard_tools": [
|
||||||
|
"stlink"
|
||||||
|
],
|
||||||
|
"openocd_target": "stm32l0",
|
||||||
|
"svd_path": "STM32L0x1.svd"
|
||||||
|
},
|
||||||
|
"frameworks": [
|
||||||
|
"arduino",
|
||||||
|
"cmsis",
|
||||||
|
"mbed",
|
||||||
|
"stm32cube",
|
||||||
|
"libopencm3"
|
||||||
|
],
|
||||||
|
"name": "ST Nucleo L031K6",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 8192,
|
||||||
|
"maximum_size": 32768,
|
||||||
|
"protocol": "stlink",
|
||||||
|
"protocols": [
|
||||||
|
"jlink",
|
||||||
|
"cmsis-dap",
|
||||||
|
"stlink",
|
||||||
|
"blackmagic",
|
||||||
|
"mbed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"url": "https://developer.mbed.org/platforms/ST-Nucleo-L031K6/",
|
||||||
|
"vendor": "ST"
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
19930193115923276
|
19830934935799875
|
||||||
Battery
|
Battery
|
||||||
BatteryHolder_Bulgin_BX0036_1xC
|
BatteryHolder_Bulgin_BX0036_1xC
|
||||||
Bulgin Battery Holder, BX0036, Battery Type C (https://www.bulgin.com/products/pub/media/bulgin/data/Battery_holders.pdf)
|
Bulgin Battery Holder, BX0036, Battery Type C (https://www.bulgin.com/products/pub/media/bulgin/data/Battery_holders.pdf)
|
||||||
@@ -50714,97 +50714,6 @@ One digit LED 7 segment SA39-11 SC39-11 SA39-12 SC39-12
|
|||||||
0
|
0
|
||||||
10
|
10
|
||||||
10
|
10
|
||||||
ESP8266
|
|
||||||
ESP-01
|
|
||||||
Module, ESP-8266, ESP-01, 8 pin
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
8
|
|
||||||
8
|
|
||||||
ESP8266
|
|
||||||
ESP-03
|
|
||||||
Module, ESP-8266, ESP-03, 14 pad, SMD
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
14
|
|
||||||
14
|
|
||||||
ESP8266
|
|
||||||
ESP-06
|
|
||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
20
|
|
||||||
20
|
|
||||||
ESP8266
|
|
||||||
ESP-07S
|
|
||||||
Module, ESP-8266, ESP-07S, 14 pad, SMD
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
16
|
|
||||||
16
|
|
||||||
ESP8266
|
|
||||||
ESP-07v2
|
|
||||||
Module, ESP-8266, ESP-07v2, 16 pad, SMD
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
16
|
|
||||||
16
|
|
||||||
ESP8266
|
|
||||||
ESP-12
|
|
||||||
Module, ESP-8266, ESP-12, 16 pad, SMD
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
16
|
|
||||||
16
|
|
||||||
ESP8266
|
|
||||||
ESP-12E
|
|
||||||
Module, ESP-8266, ESP-12, 16 pad, SMD
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
22
|
|
||||||
22
|
|
||||||
ESP8266
|
|
||||||
ESP-12E_SMD
|
|
||||||
Module, ESP-8266, ESP-12, 16 pad, SMD
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
22
|
|
||||||
22
|
|
||||||
ESP8266
|
|
||||||
ESP-13-WROOM-02
|
|
||||||
Module, ESP-8266, ESP-13-WROOM-02, 18 pad, SMD
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
19
|
|
||||||
19
|
|
||||||
ESP8266
|
|
||||||
ESP-201
|
|
||||||
Module, ESP-8266, ESP-201, 26 pin, through hole, 0.1 inch
|
|
||||||
Module ESP-8266 ESP8266
|
|
||||||
0
|
|
||||||
26
|
|
||||||
26
|
|
||||||
ESP8266
|
|
||||||
ESP12F-Devkit-V3
|
|
||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
30
|
|
||||||
30
|
|
||||||
ESP8266
|
|
||||||
NodeMCU-LoLinV3
|
|
||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
30
|
|
||||||
30
|
|
||||||
ESP8266
|
|
||||||
NodeMCU1.0(12-E)
|
|
||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
30
|
|
||||||
30
|
|
||||||
Ferrite_THT
|
Ferrite_THT
|
||||||
LairdTech_28C0236-0JW-10
|
LairdTech_28C0236-0JW-10
|
||||||
Ferrite, vertical, LairdTech 28C0236-0JW-10, https://assets.lairdtech.com/home/brandworld/files/28C0236-0JW-10.pdf, JW Miller core https://www.bourns.com/products/magnetic-products/j.w.-miller-through-hole-ferrite-beads-emi-filters
|
Ferrite, vertical, LairdTech 28C0236-0JW-10, https://assets.lairdtech.com/home/brandworld/files/28C0236-0JW-10.pdf, JW Miller core https://www.bourns.com/products/magnetic-products/j.w.-miller-through-hole-ferrite-beads-emi-filters
|
||||||
@@ -58757,48 +58666,6 @@ Mounting 4.5mm 9774100982
|
|||||||
0
|
0
|
||||||
8
|
8
|
||||||
1
|
1
|
||||||
MySymbols
|
|
||||||
3,5mm_straight_circular
|
|
||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
3
|
|
||||||
3
|
|
||||||
MySymbols
|
|
||||||
428-202569-MG01
|
|
||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
2
|
|
||||||
2
|
|
||||||
MySymbols
|
|
||||||
TestPoint_SMD_R
|
|
||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
1
|
|
||||||
1
|
|
||||||
MySymbols
|
|
||||||
Toggle_Switch_100SP1T1B4M2QE
|
|
||||||
http://spec_sheets.e-switch.com/specs/T111597.pdf
|
|
||||||
|
|
||||||
0
|
|
||||||
3
|
|
||||||
3
|
|
||||||
MySymbols
|
|
||||||
USB_Micro_B_Female
|
|
||||||
https://cdn.amphenol-icc.com/media/wysiwyg/files/drawing/10103594.pdf
|
|
||||||
|
|
||||||
0
|
|
||||||
11
|
|
||||||
6
|
|
||||||
MySymbols
|
|
||||||
slids_switch_spdt
|
|
||||||
|
|
||||||
|
|
||||||
0
|
|
||||||
5
|
|
||||||
4
|
|
||||||
NetTie
|
NetTie
|
||||||
NetTie-2_SMD_Pad0.5mm
|
NetTie-2_SMD_Pad0.5mm
|
||||||
Net tie, 2 pin, 0.5mm square SMD pads
|
Net tie, 2 pin, 0.5mm square SMD pads
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1165,12 +1165,12 @@ Connection ~ 4600 2250
|
|||||||
$Comp
|
$Comp
|
||||||
L Connector:TestPoint BOOT0
|
L Connector:TestPoint BOOT0
|
||||||
U 1 1 603CA33B
|
U 1 1 603CA33B
|
||||||
P 4700 1650
|
P 3950 900
|
||||||
F 0 "BOOT0" V 4800 1900 50 0000 C CNN
|
F 0 "BOOT0" V 4050 1150 50 0000 C CNN
|
||||||
F 1 "TestPoint" V 4700 2000 50 0000 C CNN
|
F 1 "TestPoint" V 3950 1250 50 0000 C CNN
|
||||||
F 2 "MySymbols:TestPoint_SMD_R" H 4900 1650 50 0001 C CNN
|
F 2 "MySymbols:TestPoint_SMD_R" H 4150 900 50 0001 C CNN
|
||||||
F 3 "~" H 4900 1650 50 0001 C CNN
|
F 3 "~" H 4150 900 50 0001 C CNN
|
||||||
1 4700 1650
|
1 3950 900
|
||||||
0 -1 -1 0
|
0 -1 -1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
Wire Wire Line
|
Wire Wire Line
|
||||||
@@ -1243,4 +1243,39 @@ Wire Wire Line
|
|||||||
9500 5350 9500 5650
|
9500 5350 9500 5650
|
||||||
Wire Wire Line
|
Wire Wire Line
|
||||||
10550 5400 10550 5650
|
10550 5400 10550 5650
|
||||||
|
Text GLabel 4200 900 2 50 Input ~ 0
|
||||||
|
BOOT0
|
||||||
|
Text GLabel 4700 1650 0 50 Input ~ 0
|
||||||
|
BOOT0
|
||||||
|
$Comp
|
||||||
|
L Device:R R16
|
||||||
|
U 1 1 6053E837
|
||||||
|
P 4050 1100
|
||||||
|
F 0 "R16" H 4120 1146 50 0000 L CNN
|
||||||
|
F 1 "10K" H 4120 1055 50 0000 L CNN
|
||||||
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 3980 1100 50 0001 C CNN
|
||||||
|
F 3 "~" H 4050 1100 50 0001 C CNN
|
||||||
|
1 4050 1100
|
||||||
|
1 0 0 -1
|
||||||
|
$EndComp
|
||||||
|
Wire Wire Line
|
||||||
|
3950 900 4050 900
|
||||||
|
Wire Wire Line
|
||||||
|
4050 900 4050 950
|
||||||
|
Wire Wire Line
|
||||||
|
4200 900 4050 900
|
||||||
|
Connection ~ 4050 900
|
||||||
|
$Comp
|
||||||
|
L power:GND #PWR0125
|
||||||
|
U 1 1 6055083D
|
||||||
|
P 4050 1350
|
||||||
|
F 0 "#PWR0125" H 4050 1100 50 0001 C CNN
|
||||||
|
F 1 "GND" H 4055 1177 50 0000 C CNN
|
||||||
|
F 2 "" H 4050 1350 50 0001 C CNN
|
||||||
|
F 3 "" H 4050 1350 50 0001 C CNN
|
||||||
|
1 4050 1350
|
||||||
|
1 0 0 -1
|
||||||
|
$EndComp
|
||||||
|
Wire Wire Line
|
||||||
|
4050 1350 4050 1250
|
||||||
$EndSCHEMATC
|
$EndSCHEMATC
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ U 1 1 60220E3E
|
|||||||
P 4450 5100
|
P 4450 5100
|
||||||
F 0 "U2" H 4450 5403 60 0000 C CNN
|
F 0 "U2" H 4450 5403 60 0000 C CNN
|
||||||
F 1 "MCP73832T-2ACI_OT" H 4450 5297 60 0000 C CNN
|
F 1 "MCP73832T-2ACI_OT" H 4450 5297 60 0000 C CNN
|
||||||
F 2 "digikey-footprints:SOT-753" H 4650 5300 60 0001 L CNN
|
F 2 "Package_TO_SOT_SMD:SOT-23-5_HandSoldering" H 4650 5300 60 0001 L CNN
|
||||||
F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf" H 4650 5400 60 0001 L CNN
|
F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf" H 4650 5400 60 0001 L CNN
|
||||||
F 4 "MCP73832T-2ACI/OTCT-ND" H 4650 5500 60 0001 L CNN "Digi-Key_PN"
|
F 4 "MCP73832T-2ACI/OTCT-ND" H 4650 5500 60 0001 L CNN "Digi-Key_PN"
|
||||||
F 5 "MCP73832T-2ACI/OT" H 4650 5600 60 0001 L CNN "MPN"
|
F 5 "MCP73832T-2ACI/OT" H 4650 5600 60 0001 L CNN "MPN"
|
||||||
@@ -208,7 +208,7 @@ U 1 1 6024E7D0
|
|||||||
P 8650 2850
|
P 8650 2850
|
||||||
F 0 "R2" V 8857 2850 50 0000 C CNN
|
F 0 "R2" V 8857 2850 50 0000 C CNN
|
||||||
F 1 "105E" V 8766 2850 50 0000 C CNN
|
F 1 "105E" V 8766 2850 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" V 8580 2850 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 8580 2850 50 0001 C CNN
|
||||||
F 3 "~" H 8650 2850 50 0001 C CNN
|
F 3 "~" H 8650 2850 50 0001 C CNN
|
||||||
1 8650 2850
|
1 8650 2850
|
||||||
0 -1 -1 0
|
0 -1 -1 0
|
||||||
@@ -219,7 +219,7 @@ U 1 1 6024F4D7
|
|||||||
P 8650 1600
|
P 8650 1600
|
||||||
F 0 "R1" V 8857 1600 50 0000 C CNN
|
F 0 "R1" V 8857 1600 50 0000 C CNN
|
||||||
F 1 "105E" V 8766 1600 50 0000 C CNN
|
F 1 "105E" V 8766 1600 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" V 8580 1600 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 8580 1600 50 0001 C CNN
|
||||||
F 3 "~" H 8650 1600 50 0001 C CNN
|
F 3 "~" H 8650 1600 50 0001 C CNN
|
||||||
1 8650 1600
|
1 8650 1600
|
||||||
0 1 -1 0
|
0 1 -1 0
|
||||||
@@ -230,7 +230,7 @@ U 1 1 6024FF14
|
|||||||
P 8650 4200
|
P 8650 4200
|
||||||
F 0 "R3" V 8443 4200 50 0000 C CNN
|
F 0 "R3" V 8443 4200 50 0000 C CNN
|
||||||
F 1 "105E" V 8534 4200 50 0000 C CNN
|
F 1 "105E" V 8534 4200 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" V 8580 4200 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 8580 4200 50 0001 C CNN
|
||||||
F 3 "~" H 8650 4200 50 0001 C CNN
|
F 3 "~" H 8650 4200 50 0001 C CNN
|
||||||
1 8650 4200
|
1 8650 4200
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
@@ -304,7 +304,7 @@ U 1 1 6025CE8E
|
|||||||
P 8650 3850
|
P 8650 3850
|
||||||
F 0 "R6" V 8443 3850 50 0000 C CNN
|
F 0 "R6" V 8443 3850 50 0000 C CNN
|
||||||
F 1 "10K" V 8534 3850 50 0000 C CNN
|
F 1 "10K" V 8534 3850 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" V 8580 3850 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 8580 3850 50 0001 C CNN
|
||||||
F 3 "~" H 8650 3850 50 0001 C CNN
|
F 3 "~" H 8650 3850 50 0001 C CNN
|
||||||
1 8650 3850
|
1 8650 3850
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
@@ -315,7 +315,7 @@ U 1 1 6025DA85
|
|||||||
P 8650 2500
|
P 8650 2500
|
||||||
F 0 "R5" V 8443 2500 50 0000 C CNN
|
F 0 "R5" V 8443 2500 50 0000 C CNN
|
||||||
F 1 "10K" V 8534 2500 50 0000 C CNN
|
F 1 "10K" V 8534 2500 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" V 8580 2500 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 8580 2500 50 0001 C CNN
|
||||||
F 3 "~" H 8650 2500 50 0001 C CNN
|
F 3 "~" H 8650 2500 50 0001 C CNN
|
||||||
1 8650 2500
|
1 8650 2500
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
@@ -326,7 +326,7 @@ U 1 1 6025E6DF
|
|||||||
P 8650 1250
|
P 8650 1250
|
||||||
F 0 "R4" V 8443 1250 50 0000 C CNN
|
F 0 "R4" V 8443 1250 50 0000 C CNN
|
||||||
F 1 "10K" V 8534 1250 50 0000 C CNN
|
F 1 "10K" V 8534 1250 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" V 8580 1250 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 8580 1250 50 0001 C CNN
|
||||||
F 3 "~" H 8650 1250 50 0001 C CNN
|
F 3 "~" H 8650 1250 50 0001 C CNN
|
||||||
1 8650 1250
|
1 8650 1250
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
@@ -487,7 +487,7 @@ U 1 1 60299759
|
|||||||
P 3750 5650
|
P 3750 5650
|
||||||
F 0 "R7" H 3820 5696 50 0000 L CNN
|
F 0 "R7" H 3820 5696 50 0000 L CNN
|
||||||
F 1 "3K3" H 3820 5605 50 0000 L CNN
|
F 1 "3K3" H 3820 5605 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0603" V 3680 5650 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 3680 5650 50 0001 C CNN
|
||||||
F 3 "~" H 3750 5650 50 0001 C CNN
|
F 3 "~" H 3750 5650 50 0001 C CNN
|
||||||
1 3750 5650
|
1 3750 5650
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -557,7 +557,7 @@ U 1 1 602AE2E0
|
|||||||
P 6050 5000
|
P 6050 5000
|
||||||
F 0 "R10" V 5843 5000 50 0000 C CNN
|
F 0 "R10" V 5843 5000 50 0000 C CNN
|
||||||
F 1 "470E" V 5934 5000 50 0000 C CNN
|
F 1 "470E" V 5934 5000 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" V 5980 5000 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 5980 5000 50 0001 C CNN
|
||||||
F 3 "~" H 6050 5000 50 0001 C CNN
|
F 3 "~" H 6050 5000 50 0001 C CNN
|
||||||
1 6050 5000
|
1 6050 5000
|
||||||
-1 0 0 1
|
-1 0 0 1
|
||||||
@@ -568,7 +568,7 @@ U 1 1 602AF25A
|
|||||||
P 5100 5200
|
P 5100 5200
|
||||||
F 0 "R11" V 4893 5200 50 0000 C CNN
|
F 0 "R11" V 4893 5200 50 0000 C CNN
|
||||||
F 1 "470E" V 4984 5200 50 0000 C CNN
|
F 1 "470E" V 4984 5200 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" V 5030 5200 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 5030 5200 50 0001 C CNN
|
||||||
F 3 "~" H 5100 5200 50 0001 C CNN
|
F 3 "~" H 5100 5200 50 0001 C CNN
|
||||||
1 5100 5200
|
1 5100 5200
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
@@ -599,7 +599,7 @@ U 1 1 602E1D33
|
|||||||
P 4900 1200
|
P 4900 1200
|
||||||
F 0 "R9" H 4970 1246 50 0000 L CNN
|
F 0 "R9" H 4970 1246 50 0000 L CNN
|
||||||
F 1 "1K" H 4970 1155 50 0000 L CNN
|
F 1 "1K" H 4970 1155 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0603" V 4830 1200 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 4830 1200 50 0001 C CNN
|
||||||
F 3 "~" H 4900 1200 50 0001 C CNN
|
F 3 "~" H 4900 1200 50 0001 C CNN
|
||||||
1 4900 1200
|
1 4900 1200
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -630,7 +630,7 @@ U 1 1 602F7127
|
|||||||
P 7100 1300
|
P 7100 1300
|
||||||
F 0 "C8" H 7215 1346 50 0000 L CNN
|
F 0 "C8" H 7215 1346 50 0000 L CNN
|
||||||
F 1 "100nF" H 7215 1255 50 0000 L CNN
|
F 1 "100nF" H 7215 1255 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0603" H 7138 1150 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0603_1608Metric" H 7138 1150 50 0001 C CNN
|
||||||
F 3 "~" H 7100 1300 50 0001 C CNN
|
F 3 "~" H 7100 1300 50 0001 C CNN
|
||||||
1 7100 1300
|
1 7100 1300
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -660,7 +660,7 @@ U 1 1 603022A1
|
|||||||
P 4200 3650
|
P 4200 3650
|
||||||
F 0 "C5" H 4315 3696 50 0000 L CNN
|
F 0 "C5" H 4315 3696 50 0000 L CNN
|
||||||
F 1 "100nF" H 4315 3605 50 0000 L CNN
|
F 1 "100nF" H 4315 3605 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0603" H 4238 3500 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0603_1608Metric" H 4238 3500 50 0001 C CNN
|
||||||
F 3 "~" H 4200 3650 50 0001 C CNN
|
F 3 "~" H 4200 3650 50 0001 C CNN
|
||||||
1 4200 3650
|
1 4200 3650
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -671,7 +671,7 @@ U 1 1 603026D2
|
|||||||
P 4700 3650
|
P 4700 3650
|
||||||
F 0 "C6" H 4815 3696 50 0000 L CNN
|
F 0 "C6" H 4815 3696 50 0000 L CNN
|
||||||
F 1 "100nF" H 4815 3605 50 0000 L CNN
|
F 1 "100nF" H 4815 3605 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0603" H 4738 3500 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0603_1608Metric" H 4738 3500 50 0001 C CNN
|
||||||
F 3 "~" H 4700 3650 50 0001 C CNN
|
F 3 "~" H 4700 3650 50 0001 C CNN
|
||||||
1 4700 3650
|
1 4700 3650
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -682,7 +682,7 @@ U 1 1 603063AF
|
|||||||
P 3800 3650
|
P 3800 3650
|
||||||
F 0 "C4" H 3918 3696 50 0000 L CNN
|
F 0 "C4" H 3918 3696 50 0000 L CNN
|
||||||
F 1 "1uF" H 3918 3605 50 0000 L CNN
|
F 1 "1uF" H 3918 3605 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0805" H 3838 3500 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0805_2012Metric" H 3838 3500 50 0001 C CNN
|
||||||
F 3 "~" H 3800 3650 50 0001 C CNN
|
F 3 "~" H 3800 3650 50 0001 C CNN
|
||||||
1 3800 3650
|
1 3800 3650
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -781,7 +781,7 @@ U 1 1 603CA5B8
|
|||||||
P 3750 1750
|
P 3750 1750
|
||||||
F 0 "C2" V 3498 1750 50 0000 C CNN
|
F 0 "C2" V 3498 1750 50 0000 C CNN
|
||||||
F 1 "4,3pF" V 3589 1750 50 0000 C CNN
|
F 1 "4,3pF" V 3589 1750 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" H 3788 1600 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0603_1608Metric" H 3788 1600 50 0001 C CNN
|
||||||
F 3 "~" H 3750 1750 50 0001 C CNN
|
F 3 "~" H 3750 1750 50 0001 C CNN
|
||||||
1 3750 1750
|
1 3750 1750
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
@@ -792,7 +792,7 @@ U 1 1 603CB8C0
|
|||||||
P 3750 2250
|
P 3750 2250
|
||||||
F 0 "C3" V 3498 2250 50 0000 C CNN
|
F 0 "C3" V 3498 2250 50 0000 C CNN
|
||||||
F 1 "4,3pF" V 3589 2250 50 0000 C CNN
|
F 1 "4,3pF" V 3589 2250 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0603" H 3788 2100 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0603_1608Metric" H 3788 2100 50 0001 C CNN
|
||||||
F 3 "~" H 3750 2250 50 0001 C CNN
|
F 3 "~" H 3750 2250 50 0001 C CNN
|
||||||
1 3750 2250
|
1 3750 2250
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
@@ -833,7 +833,7 @@ U 1 1 603F8E75
|
|||||||
P 4600 2000
|
P 4600 2000
|
||||||
F 0 "R8" H 4670 2046 50 0000 L CNN
|
F 0 "R8" H 4670 2046 50 0000 L CNN
|
||||||
F 1 "1M" H 4670 1955 50 0000 L CNN
|
F 1 "1M" H 4670 1955 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0603" V 4530 2000 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 4530 2000 50 0001 C CNN
|
||||||
F 3 "~" H 4600 2000 50 0001 C CNN
|
F 3 "~" H 4600 2000 50 0001 C CNN
|
||||||
1 4600 2000
|
1 4600 2000
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -853,7 +853,7 @@ U 1 1 60403C7A
|
|||||||
P 6950 4900
|
P 6950 4900
|
||||||
F 0 "R13" H 7020 4946 50 0000 L CNN
|
F 0 "R13" H 7020 4946 50 0000 L CNN
|
||||||
F 1 "100K" H 7020 4855 50 0000 L CNN
|
F 1 "100K" H 7020 4855 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0603" V 6880 4900 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 6880 4900 50 0001 C CNN
|
||||||
F 3 "~" H 6950 4900 50 0001 C CNN
|
F 3 "~" H 6950 4900 50 0001 C CNN
|
||||||
1 6950 4900
|
1 6950 4900
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -864,7 +864,7 @@ U 1 1 6040529B
|
|||||||
P 6950 4450
|
P 6950 4450
|
||||||
F 0 "R12" H 7020 4496 50 0000 L CNN
|
F 0 "R12" H 7020 4496 50 0000 L CNN
|
||||||
F 1 "220K" H 7020 4405 50 0000 L CNN
|
F 1 "220K" H 7020 4405 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0603" V 6880 4450 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 6880 4450 50 0001 C CNN
|
||||||
F 3 "~" H 6950 4450 50 0001 C CNN
|
F 3 "~" H 6950 4450 50 0001 C CNN
|
||||||
1 6950 4450
|
1 6950 4450
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -914,7 +914,7 @@ U 1 1 6043A641
|
|||||||
P 5100 5650
|
P 5100 5650
|
||||||
F 0 "C7" H 5218 5696 50 0000 L CNN
|
F 0 "C7" H 5218 5696 50 0000 L CNN
|
||||||
F 1 "4,7uF" H 5218 5605 50 0000 L CNN
|
F 1 "4,7uF" H 5218 5605 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0805" H 5138 5500 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0805_2012Metric" H 5138 5500 50 0001 C CNN
|
||||||
F 3 "~" H 5100 5650 50 0001 C CNN
|
F 3 "~" H 5100 5650 50 0001 C CNN
|
||||||
1 5100 5650
|
1 5100 5650
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -935,7 +935,7 @@ U 1 1 60446C89
|
|||||||
P 3000 5500
|
P 3000 5500
|
||||||
F 0 "C1" H 3118 5546 50 0000 L CNN
|
F 0 "C1" H 3118 5546 50 0000 L CNN
|
||||||
F 1 "4,7uF" H 3118 5455 50 0000 L CNN
|
F 1 "4,7uF" H 3118 5455 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0805" H 3038 5350 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0805_2012Metric" H 3038 5350 50 0001 C CNN
|
||||||
F 3 "~" H 3000 5500 50 0001 C CNN
|
F 3 "~" H 3000 5500 50 0001 C CNN
|
||||||
1 3000 5500
|
1 3000 5500
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -998,7 +998,7 @@ U 1 1 604D4EA0
|
|||||||
P 9500 5050
|
P 9500 5050
|
||||||
F 0 "U3" H 9500 5375 50 0000 C CNN
|
F 0 "U3" H 9500 5375 50 0000 C CNN
|
||||||
F 1 "LM3671MF-3.3" H 9500 5284 50 0000 C CNN
|
F 1 "LM3671MF-3.3" H 9500 5284 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:SOT-753" H 9550 4800 50 0001 L CNN
|
F 2 "Package_TO_SOT_SMD:SOT-23-5_HandSoldering" H 9550 4800 50 0001 L CNN
|
||||||
F 3 "http://www.ti.com/lit/ds/symlink/lm3670.pdf" H 9250 4700 50 0001 C CNN
|
F 3 "http://www.ti.com/lit/ds/symlink/lm3670.pdf" H 9250 4700 50 0001 C CNN
|
||||||
1 9500 5050
|
1 9500 5050
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -1031,7 +1031,7 @@ U 1 1 604EE10C
|
|||||||
P 10100 4950
|
P 10100 4950
|
||||||
F 0 "L1" V 10290 4950 50 0000 C CNN
|
F 0 "L1" V 10290 4950 50 0000 C CNN
|
||||||
F 1 "2,2uH" V 10199 4950 50 0000 C CNN
|
F 1 "2,2uH" V 10199 4950 50 0000 C CNN
|
||||||
F 2 "digikey-footprints:0805" H 10100 4950 50 0001 C CNN
|
F 2 "Inductor_SMD:L_0805_2012Metric" H 10100 4950 50 0001 C CNN
|
||||||
F 3 "~" H 10100 4950 50 0001 C CNN
|
F 3 "~" H 10100 4950 50 0001 C CNN
|
||||||
1 10100 4950
|
1 10100 4950
|
||||||
0 -1 -1 0
|
0 -1 -1 0
|
||||||
@@ -1066,7 +1066,7 @@ U 1 1 60506A3D
|
|||||||
P 10550 5250
|
P 10550 5250
|
||||||
F 0 "C9" H 10668 5296 50 0000 L CNN
|
F 0 "C9" H 10668 5296 50 0000 L CNN
|
||||||
F 1 "4,7uF" H 10668 5205 50 0000 L CNN
|
F 1 "4,7uF" H 10668 5205 50 0000 L CNN
|
||||||
F 2 "digikey-footprints:0805" H 10588 5100 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0805_2012Metric" H 10588 5100 50 0001 C CNN
|
||||||
F 3 "~" H 10550 5250 50 0001 C CNN
|
F 3 "~" H 10550 5250 50 0001 C CNN
|
||||||
1 10550 5250
|
1 10550 5250
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
@@ -1165,12 +1165,12 @@ Connection ~ 4600 2250
|
|||||||
$Comp
|
$Comp
|
||||||
L Connector:TestPoint BOOT0
|
L Connector:TestPoint BOOT0
|
||||||
U 1 1 603CA33B
|
U 1 1 603CA33B
|
||||||
P 4700 1650
|
P 3950 900
|
||||||
F 0 "BOOT0" V 4800 1900 50 0000 C CNN
|
F 0 "BOOT0" V 4050 1150 50 0000 C CNN
|
||||||
F 1 "TestPoint" V 4700 2000 50 0000 C CNN
|
F 1 "TestPoint" V 3950 1250 50 0000 C CNN
|
||||||
F 2 "MySymbols:TestPoint_SMD_R" H 4900 1650 50 0001 C CNN
|
F 2 "MySymbols:TestPoint_SMD_R" H 4150 900 50 0001 C CNN
|
||||||
F 3 "~" H 4900 1650 50 0001 C CNN
|
F 3 "~" H 4150 900 50 0001 C CNN
|
||||||
1 4700 1650
|
1 3950 900
|
||||||
0 -1 -1 0
|
0 -1 -1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
Wire Wire Line
|
Wire Wire Line
|
||||||
@@ -1199,10 +1199,10 @@ R7 \n3k3 = 220mA\n2k = 500mA
|
|||||||
Text Notes 4050 7050 0 50 ~ 0
|
Text Notes 4050 7050 0 50 ~ 0
|
||||||
v1.1\n- updated stat LED\n- Updated R12 to 220K (e-series resistor value)\n- Updated R7 to 3K3 (charger Iset to 220mA)\n- Updated U3 Enable pin topo\n- Updated D1 & D2 footprint\n- Updated SW1, SW2, SW3 footprint
|
v1.1\n- updated stat LED\n- Updated R12 to 220K (e-series resistor value)\n- Updated R7 to 3K3 (charger Iset to 220mA)\n- Updated U3 Enable pin topo\n- Updated D1 & D2 footprint\n- Updated SW1, SW2, SW3 footprint
|
||||||
$Comp
|
$Comp
|
||||||
L Device:R R?
|
L Device:R R15
|
||||||
U 1 1 6061107D
|
U 1 1 6061107D
|
||||||
P 8800 5100
|
P 8800 5100
|
||||||
F 0 "R?" H 8870 5146 50 0000 L CNN
|
F 0 "R15" H 8870 5146 50 0000 L CNN
|
||||||
F 1 "100K" H 8870 5055 50 0000 L CNN
|
F 1 "100K" H 8870 5055 50 0000 L CNN
|
||||||
F 2 "Resistor_SMD:R_0603_1608Metric" V 8730 5100 50 0001 C CNN
|
F 2 "Resistor_SMD:R_0603_1608Metric" V 8730 5100 50 0001 C CNN
|
||||||
F 3 "~" H 8800 5100 50 0001 C CNN
|
F 3 "~" H 8800 5100 50 0001 C CNN
|
||||||
@@ -1217,10 +1217,10 @@ Connection ~ 8800 4950
|
|||||||
Wire Wire Line
|
Wire Wire Line
|
||||||
8800 4950 9200 4950
|
8800 4950 9200 4950
|
||||||
$Comp
|
$Comp
|
||||||
L Device:C C?
|
L Device:C C10
|
||||||
U 1 1 60681778
|
U 1 1 60681778
|
||||||
P 8800 5450
|
P 8800 5450
|
||||||
F 0 "C?" H 8915 5496 50 0000 L CNN
|
F 0 "C10" H 8915 5496 50 0000 L CNN
|
||||||
F 1 "C" H 8915 5405 50 0000 L CNN
|
F 1 "C" H 8915 5405 50 0000 L CNN
|
||||||
F 2 "Capacitor_SMD:C_0603_1608Metric" H 8838 5300 50 0001 C CNN
|
F 2 "Capacitor_SMD:C_0603_1608Metric" H 8838 5300 50 0001 C CNN
|
||||||
F 3 "~" H 8800 5450 50 0001 C CNN
|
F 3 "~" H 8800 5450 50 0001 C CNN
|
||||||
@@ -1243,4 +1243,39 @@ Wire Wire Line
|
|||||||
9500 5350 9500 5650
|
9500 5350 9500 5650
|
||||||
Wire Wire Line
|
Wire Wire Line
|
||||||
10550 5400 10550 5650
|
10550 5400 10550 5650
|
||||||
|
Text GLabel 4200 900 2 50 Input ~ 0
|
||||||
|
BOOT0
|
||||||
|
Text GLabel 4700 1650 0 50 Input ~ 0
|
||||||
|
BOOT0
|
||||||
|
$Comp
|
||||||
|
L Device:R R?
|
||||||
|
U 1 1 6053E837
|
||||||
|
P 4050 1100
|
||||||
|
F 0 "R?" H 4120 1146 50 0000 L CNN
|
||||||
|
F 1 "10K" H 4120 1055 50 0000 L CNN
|
||||||
|
F 2 "" V 3980 1100 50 0001 C CNN
|
||||||
|
F 3 "~" H 4050 1100 50 0001 C CNN
|
||||||
|
1 4050 1100
|
||||||
|
1 0 0 -1
|
||||||
|
$EndComp
|
||||||
|
Wire Wire Line
|
||||||
|
3950 900 4050 900
|
||||||
|
Wire Wire Line
|
||||||
|
4050 900 4050 950
|
||||||
|
Wire Wire Line
|
||||||
|
4200 900 4050 900
|
||||||
|
Connection ~ 4050 900
|
||||||
|
$Comp
|
||||||
|
L power:GND #PWR?
|
||||||
|
U 1 1 6055083D
|
||||||
|
P 4050 1350
|
||||||
|
F 0 "#PWR?" H 4050 1100 50 0001 C CNN
|
||||||
|
F 1 "GND" H 4055 1177 50 0000 C CNN
|
||||||
|
F 2 "" H 4050 1350 50 0001 C CNN
|
||||||
|
F 3 "" H 4050 1350 50 0001 C CNN
|
||||||
|
1 4050 1350
|
||||||
|
1 0 0 -1
|
||||||
|
$EndComp
|
||||||
|
Wire Wire Line
|
||||||
|
4050 1350 4050 1250
|
||||||
$EndSCHEMATC
|
$EndSCHEMATC
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ board = nucleo_l031K6
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
upload_port = stlink
|
upload_port = stlink
|
||||||
debug_tool = stlink
|
debug_tool = stlink
|
||||||
|
boards_dir = boards
|
||||||
|
|
||||||
|
|
||||||
; [env:native]
|
; [env:native]
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
#ifndef UNIT_TEST
|
#ifndef UNIT_TEST
|
||||||
|
|
||||||
#define LED1 PB0 //D3
|
#define LED1 PB2 //D3
|
||||||
#define LED2 PB7 //D4
|
#define LED2 PB8 //D4
|
||||||
#define LED3 PB6 //D5
|
#define LED3 PB7 //D5
|
||||||
|
|
||||||
#define DETECT1 PA6 //A5
|
#define DETECT1 PA6 //A5
|
||||||
#define DETECT2 PA5 //A4
|
#define DETECT2 PA5 //A4
|
||||||
|
|||||||
196
variants/NUCLEO_L031K6/PeripheralPins.c
Normal file
196
variants/NUCLEO_L031K6/PeripheralPins.c
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
/*
|
||||||
|
*******************************************************************************
|
||||||
|
* Copyright (c) 2019, STMicroelectronics
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*******************************************************************************
|
||||||
|
* Automatically generated from STM32L031K(4-6)Tx.xml
|
||||||
|
*/
|
||||||
|
#include "Arduino.h"
|
||||||
|
#include "PeripheralPins.h"
|
||||||
|
|
||||||
|
/* =====
|
||||||
|
* Note: Commented lines are alternative possibilities which are not used per default.
|
||||||
|
* If you change them, you will have to know what you do
|
||||||
|
* =====
|
||||||
|
*/
|
||||||
|
|
||||||
|
//*** ADC ***
|
||||||
|
|
||||||
|
#ifdef HAL_ADC_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_ADC[] = {
|
||||||
|
{PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0
|
||||||
|
{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
|
||||||
|
// {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2 - Connected to STDIO_UART_TX
|
||||||
|
{PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3
|
||||||
|
{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4
|
||||||
|
{PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5
|
||||||
|
{PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6
|
||||||
|
{PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7
|
||||||
|
{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8
|
||||||
|
{PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//*** No DAC ***
|
||||||
|
|
||||||
|
//*** I2C ***
|
||||||
|
|
||||||
|
#ifdef HAL_I2C_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_I2C_SDA[] = {
|
||||||
|
{PA_10, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
|
||||||
|
{PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAL_I2C_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_I2C_SCL[] = {
|
||||||
|
{PA_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
|
||||||
|
{PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C1)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//*** PWM ***
|
||||||
|
|
||||||
|
#ifdef HAL_TIM_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_PWM[] = {
|
||||||
|
{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
|
||||||
|
{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
|
||||||
|
// {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
|
||||||
|
// {PA_2, TIM21, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM21, 1, 0)}, // TIM21_CH1
|
||||||
|
{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
|
||||||
|
// {PA_3, TIM21, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM21, 2, 0)}, // TIM21_CH2
|
||||||
|
{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM2, 1, 0)}, // TIM2_CH1
|
||||||
|
{PA_6, TIM22, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM22, 1, 0)}, // TIM22_CH1
|
||||||
|
{PA_7, TIM22, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM22, 2, 0)}, // TIM22_CH2
|
||||||
|
{PA_8, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM2, 1, 0)}, // TIM2_CH1
|
||||||
|
{PA_9, TIM22, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM22, 1, 0)}, // TIM22_CH1
|
||||||
|
{PA_10, TIM22, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM22, 2, 0)}, // TIM22_CH2
|
||||||
|
// {PA_11, TIM21, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM21, 2, 0)}, // TIM21_CH2
|
||||||
|
// {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM2, 1, 0)}, // TIM2_CH1
|
||||||
|
{PB_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM2, 3, 0)}, // TIM2_CH3
|
||||||
|
{PB_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM2, 4, 0)}, // TIM2_CH4
|
||||||
|
{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
|
||||||
|
{PB_4, TIM22, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM22, 1, 0)}, // TIM22_CH1
|
||||||
|
{PB_5, TIM22, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM22, 2, 0)}, // TIM22_CH2
|
||||||
|
// {PB_6, TIM21, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM21, 1, 0)}, // TIM21_CH1
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//*** SERIAL ***
|
||||||
|
|
||||||
|
#ifdef HAL_UART_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_UART_TX[] = {
|
||||||
|
// {PA_2, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_LPUART1)},
|
||||||
|
{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)}, // STLink TX
|
||||||
|
{PA_9, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
// {PA_14, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_LPUART1)},
|
||||||
|
{PA_14, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
{PB_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAL_UART_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_UART_RX[] = {
|
||||||
|
// {PA_3, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_LPUART1)},
|
||||||
|
{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
{PA_10, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
// {PA_13, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_LPUART1)},
|
||||||
|
{PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)}, // STLink RX
|
||||||
|
{PB_7, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAL_UART_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_UART_RTS[] = {
|
||||||
|
{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
{PA_12, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
{PB_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
// {PB_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_LPUART1)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAL_UART_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_UART_CTS[] = {
|
||||||
|
{PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
// {PA_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_LPUART1)},
|
||||||
|
{PA_7, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
{PA_11, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART2)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//*** SPI ***
|
||||||
|
|
||||||
|
#ifdef HAL_SPI_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_SPI_MOSI[] = {
|
||||||
|
{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{PA_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{PB_1, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI1)},
|
||||||
|
{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAL_SPI_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_SPI_MISO[] = {
|
||||||
|
{PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{PA_11, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{PB_0, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI1)},
|
||||||
|
{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAL_SPI_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_SPI_SCLK[] = {
|
||||||
|
{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAL_SPI_MODULE_ENABLED
|
||||||
|
WEAK const PinMap PinMap_SPI_SSEL[] = {
|
||||||
|
{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
// {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
|
||||||
|
{NC, NP, 0}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//*** No CAN ***
|
||||||
|
|
||||||
|
//*** No ETHERNET ***
|
||||||
|
|
||||||
|
//*** No QUADSPI ***
|
||||||
|
|
||||||
|
//*** No USB ***
|
||||||
25
variants/NUCLEO_L031K6/PinNamesVar.h
Normal file
25
variants/NUCLEO_L031K6/PinNamesVar.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/* SYS_WKUP */
|
||||||
|
#ifdef PWR_WAKEUP_PIN1
|
||||||
|
SYS_WKUP1 = PA_0,
|
||||||
|
#endif
|
||||||
|
#ifdef PWR_WAKEUP_PIN2
|
||||||
|
SYS_WKUP2 = NC,
|
||||||
|
#endif
|
||||||
|
#ifdef PWR_WAKEUP_PIN3
|
||||||
|
SYS_WKUP3 = PA_2,
|
||||||
|
#endif
|
||||||
|
#ifdef PWR_WAKEUP_PIN4
|
||||||
|
SYS_WKUP4 = NC,
|
||||||
|
#endif
|
||||||
|
#ifdef PWR_WAKEUP_PIN5
|
||||||
|
SYS_WKUP5 = NC,
|
||||||
|
#endif
|
||||||
|
#ifdef PWR_WAKEUP_PIN6
|
||||||
|
SYS_WKUP6 = NC,
|
||||||
|
#endif
|
||||||
|
#ifdef PWR_WAKEUP_PIN7
|
||||||
|
SYS_WKUP7 = NC,
|
||||||
|
#endif
|
||||||
|
#ifdef PWR_WAKEUP_PIN8
|
||||||
|
SYS_WKUP8 = NC,
|
||||||
|
#endif
|
||||||
188
variants/NUCLEO_L031K6/ldscript.ld
Normal file
188
variants/NUCLEO_L031K6/ldscript.ld
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
/*
|
||||||
|
*****************************************************************************
|
||||||
|
**
|
||||||
|
|
||||||
|
** File : LinkerScript.ld
|
||||||
|
**
|
||||||
|
** Abstract : Linker script for STM32L031K6Tx Device with
|
||||||
|
** 32KByte FLASH, 8KByte RAM
|
||||||
|
**
|
||||||
|
** Set heap size, stack size and stack location according
|
||||||
|
** to application requirements.
|
||||||
|
**
|
||||||
|
** Set memory bank area and size if external memory is used.
|
||||||
|
**
|
||||||
|
** Target : STMicroelectronics STM32
|
||||||
|
**
|
||||||
|
**
|
||||||
|
** Distribution: The file is distributed as is, without any warranty
|
||||||
|
** of any kind.
|
||||||
|
**
|
||||||
|
*****************************************************************************
|
||||||
|
** @attention
|
||||||
|
**
|
||||||
|
** <h2><center>© COPYRIGHT(c) 2014 Ac6</center></h2>
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
** are permitted provided that the following conditions are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer in the documentation
|
||||||
|
** and/or other materials provided with the distribution.
|
||||||
|
** 3. Neither the name of Ac6 nor the names of its contributors
|
||||||
|
** may be used to endorse or promote products derived from this software
|
||||||
|
** without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
**
|
||||||
|
*****************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Entry Point */
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
/* Highest address of the user mode stack */
|
||||||
|
_estack = 0x20002000; /* end of RAM */
|
||||||
|
/* Generate a link error if heap and stack don't fit into RAM */
|
||||||
|
_Min_Heap_Size = 0x200; /* required amount of heap */
|
||||||
|
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||||
|
|
||||||
|
/* Specify the memory areas */
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
|
||||||
|
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 32K
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Define output sections */
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* The startup code goes first into FLASH */
|
||||||
|
.isr_vector :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(.isr_vector)) /* Startup code */
|
||||||
|
. = ALIGN(4);
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/* The program code and other data goes into FLASH */
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.text) /* .text sections (code) */
|
||||||
|
*(.text*) /* .text* sections (code) */
|
||||||
|
*(.glue_7) /* glue arm to thumb code */
|
||||||
|
*(.glue_7t) /* glue thumb to arm code */
|
||||||
|
*(.eh_frame)
|
||||||
|
|
||||||
|
KEEP (*(.init))
|
||||||
|
KEEP (*(.fini))
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
_etext = .; /* define a global symbols at end of code */
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/* Constant data goes into FLASH */
|
||||||
|
.rodata :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||||
|
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||||
|
. = ALIGN(4);
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
|
||||||
|
.ARM : {
|
||||||
|
__exidx_start = .;
|
||||||
|
*(.ARM.exidx*)
|
||||||
|
__exidx_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
.preinit_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP (*(.preinit_array*))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
} >FLASH
|
||||||
|
.init_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array*))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
} >FLASH
|
||||||
|
.fini_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP (*(SORT(.fini_array.*)))
|
||||||
|
KEEP (*(.fini_array*))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/* used by the startup to initialize data */
|
||||||
|
_sidata = LOADADDR(.data);
|
||||||
|
|
||||||
|
/* Initialized data sections goes into RAM, load LMA copy after code */
|
||||||
|
.data :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sdata = .; /* create a global symbol at data start */
|
||||||
|
*(.data) /* .data sections */
|
||||||
|
*(.data*) /* .data* sections */
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = .; /* define a global symbol at data end */
|
||||||
|
} >RAM AT> FLASH
|
||||||
|
|
||||||
|
|
||||||
|
/* Uninitialized data section */
|
||||||
|
. = ALIGN(4);
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
/* This is used by the startup in order to initialize the .bss secion */
|
||||||
|
_sbss = .; /* define a global symbol at bss start */
|
||||||
|
__bss_start__ = _sbss;
|
||||||
|
*(.bss)
|
||||||
|
*(.bss*)
|
||||||
|
*(COMMON)
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
_ebss = .; /* define a global symbol at bss end */
|
||||||
|
__bss_end__ = _ebss;
|
||||||
|
} >RAM
|
||||||
|
|
||||||
|
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||||
|
._user_heap_stack :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
PROVIDE ( end = . );
|
||||||
|
PROVIDE ( _end = . );
|
||||||
|
. = . + _Min_Heap_Size;
|
||||||
|
. = . + _Min_Stack_Size;
|
||||||
|
. = ALIGN(8);
|
||||||
|
} >RAM
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Remove information from the standard libraries */
|
||||||
|
/DISCARD/ :
|
||||||
|
{
|
||||||
|
libc.a ( * )
|
||||||
|
libm.a ( * )
|
||||||
|
libgcc.a ( * )
|
||||||
|
}
|
||||||
|
|
||||||
|
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
123
variants/NUCLEO_L031K6/variant.cpp
Normal file
123
variants/NUCLEO_L031K6/variant.cpp
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
*******************************************************************************
|
||||||
|
* Copyright (c) 2017, STMicroelectronics
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pins_arduino.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Pin number
|
||||||
|
const PinName digitalPin[] = {
|
||||||
|
PA_10, //D0
|
||||||
|
PA_9, //D1
|
||||||
|
PA_12, //D2
|
||||||
|
PB_0, //D3
|
||||||
|
PB_7, //D4
|
||||||
|
PB_6, //D5
|
||||||
|
PB_1, //D6
|
||||||
|
PC_14, //D7
|
||||||
|
PC_15, //D8
|
||||||
|
PA_8, //D9
|
||||||
|
PA_11, //D10
|
||||||
|
PB_5, //D11
|
||||||
|
PB_4, //D12
|
||||||
|
PB_3, //D13 - LED
|
||||||
|
PA_0, //D14/A0
|
||||||
|
PA_1, //D15/A1
|
||||||
|
PA_3, //D16/A2
|
||||||
|
PA_4, //D17/A3
|
||||||
|
PA_5, //D18/A4
|
||||||
|
PA_6, //D19/A5
|
||||||
|
PA_7, //D20/A6
|
||||||
|
PA_2, //D21/A7 - STLink Tx
|
||||||
|
PA_15, //D22 - STLink Rx
|
||||||
|
PB_2, //D23
|
||||||
|
PB_8 //D24
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System Clock Configuration
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
WEAK void SystemClock_Config(void)
|
||||||
|
{
|
||||||
|
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||||
|
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||||
|
RCC_PeriphCLKInitTypeDef PeriphClkInit;
|
||||||
|
|
||||||
|
/* Configure the main internal regulator output voltage */
|
||||||
|
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||||
|
|
||||||
|
/* Initializes the CPU, AHB and APB buses clocks */
|
||||||
|
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
|
||||||
|
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
|
||||||
|
RCC_OscInitStruct.HSICalibrationValue = 16;
|
||||||
|
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||||
|
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
|
||||||
|
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLLMUL_4;
|
||||||
|
RCC_OscInitStruct.PLL.PLLDIV = RCC_PLLDIV_2;
|
||||||
|
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
|
||||||
|
_Error_Handler(__FILE__, __LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initializes the CPU, AHB and APB busses clocks */
|
||||||
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
|
||||||
|
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
||||||
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||||
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
||||||
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
|
||||||
|
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
|
||||||
|
|
||||||
|
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
|
||||||
|
_Error_Handler(__FILE__, __LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2;
|
||||||
|
PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
|
||||||
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {
|
||||||
|
_Error_Handler(__FILE__, __LINE__);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
120
variants/NUCLEO_L031K6/variant.h
Normal file
120
variants/NUCLEO_L031K6/variant.h
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
/*
|
||||||
|
*******************************************************************************
|
||||||
|
* Copyright (c) 2017, STMicroelectronics
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _VARIANT_ARDUINO_STM32_
|
||||||
|
#define _VARIANT_ARDUINO_STM32_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
* Pins
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#define PA10 0
|
||||||
|
#define PA9 1
|
||||||
|
#define PA12 2
|
||||||
|
#define PB0 3
|
||||||
|
#define PB7 4
|
||||||
|
#define PB6 5
|
||||||
|
#define PB1 6
|
||||||
|
#define PC14 7
|
||||||
|
#define PC15 8
|
||||||
|
#define PA8 9
|
||||||
|
#define PA11 10
|
||||||
|
#define PB5 11
|
||||||
|
#define PB4 12
|
||||||
|
#define PB3 13 // LED
|
||||||
|
#define PA0 14 // A0
|
||||||
|
#define PA1 15 // A1
|
||||||
|
#define PA3 16 // A2
|
||||||
|
#define PA4 17 // A3
|
||||||
|
#define PA5 18 // A4
|
||||||
|
#define PA6 19 // A5
|
||||||
|
#define PA7 20 // A6
|
||||||
|
#define PA2 21 // A7 - STLink Tx
|
||||||
|
#define PA15 22 // STLink Rx
|
||||||
|
#define PB2 23
|
||||||
|
#define PB8 24
|
||||||
|
|
||||||
|
// This must be a literal
|
||||||
|
#define NUM_DIGITAL_PINS 25
|
||||||
|
// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
|
||||||
|
#define NUM_ANALOG_INPUTS 7
|
||||||
|
#define NUM_ANALOG_FIRST 14
|
||||||
|
|
||||||
|
// On-board LED pin number
|
||||||
|
//#define LED_BUILTIN 13
|
||||||
|
//#define LED_GREEN LED_BUILTIN
|
||||||
|
|
||||||
|
// I2C Definitions
|
||||||
|
#define PIN_WIRE_SDA 4
|
||||||
|
#define PIN_WIRE_SCL 5
|
||||||
|
|
||||||
|
//Timer Definitions
|
||||||
|
#define TIMER_TONE TIM2
|
||||||
|
#define TIMER_SERVO TIM21
|
||||||
|
|
||||||
|
// UART Definitions
|
||||||
|
#define SERIAL_UART_INSTANCE 2 //ex: 2 for Serial2 (USART2)
|
||||||
|
// Default pin used for 'Serial' instance (ex: ST-Link)
|
||||||
|
// Mandatory for Firmata
|
||||||
|
#define PIN_SERIAL_RX PA15
|
||||||
|
#define PIN_SERIAL_TX PA2
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} // extern "C"
|
||||||
|
#endif
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
* Arduino objects - C++ only
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
// These serial port names are intended to allow libraries and architecture-neutral
|
||||||
|
// sketches to automatically default to the correct port name for a particular type
|
||||||
|
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||||
|
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||||
|
// pins are NOT connected to anything by default.
|
||||||
|
#define SERIAL_PORT_MONITOR Serial
|
||||||
|
#define SERIAL_PORT_HARDWARE Serial
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _VARIANT_ARDUINO_STM32_ */
|
||||||
Reference in New Issue
Block a user