Merge branch 'flash'

This commit is contained in:
Duke NUCem 2021-09-30 14:56:29 +02:00
commit e7f7077b8a
26 changed files with 274242 additions and 109833 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +1,72 @@
%TF.GenerationSoftware,KiCad,Pcbnew,5.1.9-73d0e3b20d~88~ubuntu20.04.1*%
%TF.CreationDate,2021-04-14T15:42:58+04:00*%
%TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2*%
%TF.CreationDate,2021-09-23T19:28:15+02:00*%
%TF.ProjectId,iaq_wired_sensor,6961715f-7769-4726-9564-5f73656e736f,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Soldermask,Bot*%
%TF.FilePolarity,Negative*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9-73d0e3b20d~88~ubuntu20.04.1) date 2021-04-14 15:42:58*
G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-09-23 19:28:15*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%ADD10C,1.500000*%
%ADD11O,1.700000X1.700000*%
%ADD12R,1.700000X1.700000*%
%ADD10C,2.000000*%
%ADD11C,1.500000*%
%ADD12O,1.700000X1.700000*%
%ADD13R,1.700000X1.700000*%
G04 APERTURE END LIST*
D10*
%TO.C,J1*%
X101000000Y-115750000D03*
X101000000Y-113750000D03*
X99000000Y-113750000D03*
X99000000Y-115750000D03*
%TO.C,TP12*%
X95500000Y-116500000D03*
%TD*%
%TO.C,TP3*%
X85000000Y-103500000D03*
%TD*%
%TO.C,TP2*%
X92500000Y-92500000D03*
%TD*%
%TO.C,TP11*%
X104500000Y-116500000D03*
%TD*%
%TO.C,TP10*%
X96000000Y-87000000D03*
%TD*%
%TO.C,TP9*%
X104000000Y-105000000D03*
%TD*%
%TO.C,TP8*%
X91000000Y-118000000D03*
%TD*%
%TO.C,TP7*%
X102000000Y-111500000D03*
%TD*%
%TO.C,TP6*%
X98000000Y-111500000D03*
%TD*%
%TO.C,TP5*%
X85000000Y-96500000D03*
%TD*%
%TO.C,TP4*%
X85000000Y-100000000D03*
%TD*%
%TO.C,TP1*%
X88000000Y-92500000D03*
%TD*%
D11*
%TO.C,SWD0*%
X100000000Y-94920000D03*
X100000000Y-100000000D03*
%TO.C,J1*%
X99000000Y-115750000D03*
X99000000Y-113750000D03*
X101000000Y-113750000D03*
X101000000Y-115750000D03*
%TD*%
D12*
X100000000Y-105080000D03*
D11*
X100000000Y-102540000D03*
%TO.C,SWD0*%
X100000000Y-97460000D03*
X100000000Y-102540000D03*
D13*
X100000000Y-105080000D03*
D12*
X100000000Y-100000000D03*
X100000000Y-94920000D03*
%TD*%
M02*

View File

@ -1,15 +1,14 @@
%TF.GenerationSoftware,KiCad,Pcbnew,5.1.9-73d0e3b20d~88~ubuntu20.04.1*%
%TF.CreationDate,2021-04-14T15:42:58+04:00*%
%TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2*%
%TF.CreationDate,2021-09-23T19:28:15+02:00*%
%TF.ProjectId,iaq_wired_sensor,6961715f-7769-4726-9564-5f73656e736f,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Paste,Bot*%
%TF.FilePolarity,Positive*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9-73d0e3b20d~88~ubuntu20.04.1) date 2021-04-14 15:42:58*
G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-09-23 19:28:15*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 APERTURE END LIST*
M02*

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,13 @@
%TF.GenerationSoftware,KiCad,Pcbnew,5.1.9-73d0e3b20d~88~ubuntu20.04.1*%
%TF.CreationDate,2021-04-14T15:42:58+04:00*%
%TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2*%
%TF.CreationDate,2021-09-23T19:28:15+02:00*%
%TF.ProjectId,iaq_wired_sensor,6961715f-7769-4726-9564-5f73656e736f,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Profile,NP*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9-73d0e3b20d~88~ubuntu20.04.1) date 2021-04-14 15:42:58*
G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-09-23 19:28:15*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%TA.AperFunction,Profile*%
%ADD10C,0.050000*%
@ -19,18 +18,15 @@ X118000000Y-92500000D02*
X118000000Y-94500000D01*
X110000000Y-95500000D02*
G75*
G03*
X109000000Y-96500000I0J-1000000D01*
G03X109000000Y-96500000I0J-1000000D01*
G01*
X118000000Y-94500000D02*
G75*
G02*
X117000000Y-95500000I-1000000J0D01*
G02X117000000Y-95500000I-1000000J0D01*
G01*
X118000000Y-92500000D02*
G75*
G02*
X119000000Y-91500000I1000000J0D01*
G02X119000000Y-91500000I1000000J0D01*
G01*
X110000000Y-95500000D02*
X117000000Y-95500000D01*
@ -42,8 +38,7 @@ X109000000Y-122500000D02*
X109000000Y-118500000D01*
X107000000Y-118500000D02*
G75*
G02*
X109000000Y-118500000I1000000J0D01*
G02X109000000Y-118500000I1000000J0D01*
G01*
X107000000Y-102000000D02*
X107000000Y-110000000D01*
@ -51,25 +46,21 @@ X109000000Y-110000000D02*
X109000000Y-96500000D01*
X109000000Y-110000000D02*
G75*
G02*
X107000000Y-110000000I-1000000J0D01*
G02X107000000Y-110000000I-1000000J0D01*
G01*
X120000000Y-90500000D02*
X120000000Y-89500000D01*
X120000000Y-90500000D02*
G75*
G02*
X119000000Y-91500000I-1000000J0D01*
G02X119000000Y-91500000I-1000000J0D01*
G01*
X118000000Y-89500000D02*
G75*
G02*
X120000000Y-89500000I1000000J0D01*
G02X120000000Y-89500000I1000000J0D01*
G01*
X120000000Y-85500000D02*
G75*
G02*
X118000000Y-85500000I-1000000J0D01*
G02X118000000Y-85500000I-1000000J0D01*
G01*
X120000000Y-85500000D02*
X121500000Y-85500000D01*
@ -79,40 +70,33 @@ X122500000Y-81000000D02*
X122500000Y-80000000D01*
X122500000Y-81000000D02*
G75*
G02*
X120000000Y-83500000I-2500000J0D01*
G02X120000000Y-83500000I-2500000J0D01*
G01*
X95500000Y-79000000D02*
X95500000Y-80000000D01*
X95500000Y-79000000D02*
G75*
G02*
X97000000Y-77500000I1500000J0D01*
G02X97000000Y-77500000I1500000J0D01*
G01*
X94000000Y-81500000D02*
G75*
G03*
X95500000Y-80000000I0J1500000D01*
G03X95500000Y-80000000I0J1500000D01*
G01*
X85000000Y-81500000D02*
G75*
G02*
X83500000Y-80000000I0J1500000D01*
G02X83500000Y-80000000I0J1500000D01*
G01*
X81000000Y-77500000D02*
G75*
G02*
X83500000Y-80000000I0J-2500000D01*
G02X83500000Y-80000000I0J-2500000D01*
G01*
X121500000Y-85500000D02*
G75*
G02*
X122500000Y-86500000I0J-1000000D01*
G02X122500000Y-86500000I0J-1000000D01*
G01*
X107000000Y-84500000D02*
G75*
G02*
X108000000Y-83500000I1000000J0D01*
G02X108000000Y-83500000I1000000J0D01*
G01*
X97000000Y-77500000D02*
X120000000Y-77500000D01*
@ -120,49 +104,41 @@ X85000000Y-81500000D02*
X94000000Y-81500000D01*
X121100000Y-80500000D02*
G75*
G03*
X121100000Y-80500000I-1600000J0D01*
G03X121100000Y-80500000I-1600000J0D01*
G01*
X121100000Y-119500000D02*
G75*
G03*
X121100000Y-119500000I-1600000J0D01*
G03X121100000Y-119500000I-1600000J0D01*
G01*
X82100000Y-119500000D02*
G75*
G03*
X82100000Y-119500000I-1600000J0D01*
G03X82100000Y-119500000I-1600000J0D01*
G01*
X120000000Y-77500000D02*
G75*
G02*
X122500000Y-80000000I0J-2500000D01*
G02X122500000Y-80000000I0J-2500000D01*
G01*
X81000000Y-77500000D02*
X80000000Y-77500000D01*
X122500000Y-120000000D02*
G75*
G02*
X120000000Y-122500000I-2500000J0D01*
G02X120000000Y-122500000I-2500000J0D01*
G01*
X122500000Y-120000000D02*
X122500000Y-86500000D01*
X80000000Y-122500000D02*
G75*
G02*
X77500000Y-120000000I0J2500000D01*
G02X77500000Y-120000000I0J2500000D01*
G01*
X80000000Y-122500000D02*
X107000000Y-122500000D01*
X82100000Y-80500000D02*
G75*
G03*
X82100000Y-80500000I-1600000J0D01*
G03X82100000Y-80500000I-1600000J0D01*
G01*
X77500000Y-80000000D02*
G75*
G02*
X80000000Y-77500000I2500000J0D01*
G02X80000000Y-77500000I2500000J0D01*
G01*
X77500000Y-80000000D02*
X77500000Y-120000000D01*

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
PCB/Project_Outputs/GERBERS/iaq_wired_sensor-GERBERS.zip Executable file → Normal file

Binary file not shown.

View File

@ -1,8 +1,8 @@
M48
; DRILL file {KiCad 5.1.9-73d0e3b20d~88~ubuntu20.04.1} date Wed Apr 14 15:42:56 2021
; DRILL file {KiCad 5.1.5+dfsg1-2build2} date Čt 23. září 2021, 19:28:13
; FORMAT={-:-/ absolute / inch / decimal}
; #@! TF.CreationDate,2021-04-14T15:42:56+04:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.9-73d0e3b20d~88~ubuntu20.04.1
; #@! TF.CreationDate,2021-09-23T19:28:13+02:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.5+dfsg1-2build2
; #@! TF.FileFunction,NonPlated,1,2,NPTH
FMAT,2
INCH

View File

@ -1,8 +1,8 @@
M48
; DRILL file {KiCad 5.1.9-73d0e3b20d~88~ubuntu20.04.1} date Wed Apr 14 15:42:56 2021
; DRILL file {KiCad 5.1.5+dfsg1-2build2} date Čt 23. září 2021, 19:28:13
; FORMAT={-:-/ absolute / inch / decimal}
; #@! TF.CreationDate,2021-04-14T15:42:56+04:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.9-73d0e3b20d~88~ubuntu20.04.1
; #@! TF.CreationDate,2021-09-23T19:28:13+02:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.5+dfsg1-2build2
; #@! TF.FileFunction,Plated,1,2,PTH
FMAT,2
INCH
@ -18,75 +18,71 @@ X3.0709Y-4.7047
X3.1004Y-4.3602
X3.1004Y-4.4193
X3.1102Y-4.1339
X3.1152Y-3.4695
X3.1299Y-3.9272
X3.1299Y-4.3898
X3.1398Y-3.7795
X3.1417Y-3.9006
X3.1496Y-3.3465
X3.1496Y-4.5177
X3.1594Y-4.3602
X3.1594Y-4.4193
X3.1693Y-3.0709
X3.1693Y-3.2677
X3.1693Y-3.8681
X3.1693Y-4.5965
X3.1693Y-4.8031
X3.189Y-3.5354
X3.1772Y-3.8681
X3.189Y-4.0157
X3.189Y-4.0748
X3.189Y-4.3898
X3.1988Y-3.7136
X3.2185Y-4.3602
X3.2185Y-4.4193
X3.2372Y-3.5787
X3.2495Y-3.9651
X3.25Y-3.5905
X3.2677Y-3.1693
X3.2677Y-4.7047
X3.2776Y-3.5846
X3.2776Y-3.8386
X3.2874Y-4.0453
X3.2746Y-3.5787
X3.2874Y-4.0945
X3.2874Y-4.1339
X3.2874Y-4.1831
X3.2874Y-4.4272
X3.3071Y-3.6614
X3.2904Y-4.0453
X3.312Y-3.8543
X3.315Y-4.3307
X3.3169Y-4.1339
X3.3268Y-3.9173
X3.3209Y-3.6319
X3.3268Y-4.1831
X3.3445Y-4.4272
X3.3465Y-4.0945
X3.3602Y-3.4311
X3.3661Y-3.4744
X3.3661Y-3.5138
X3.3661Y-3.5531
X3.3661Y-3.878
X3.3661Y-3.8583
X3.3858Y-4.1634
X3.3937Y-4.7657
X3.3957Y-3.6319
X3.3957Y-3.9764
X3.3957Y-4.0354
X3.4016Y-3.6063
X3.4055Y-3.878
X3.4252Y-4.0945
X3.4449Y-3.9075
X3.4449Y-4.3602
X3.4449Y-4.4193
X3.4646Y-3.6508
X3.4646Y-3.7205
X3.4646Y-3.7894
X3.4724Y-3.7087
X3.4744Y-3.5433
X3.4744Y-3.5728
X3.4744Y-4.3898
X3.4941Y-3.4941
X3.4941Y-3.6811
X3.5039Y-4.3602
X3.5039Y-4.4193
X3.5138Y-3.7894
X3.5236Y-3.7008
X3.5335Y-4.3898
X3.5427Y-3.9463
X3.5433Y-3.3465
X3.5433Y-4.0945
X3.5512Y-3.6378
X3.563Y-4.3602
X3.563Y-4.4193
X3.5728Y-3.9075
X3.5827Y-3.6024
X3.5827Y-3.7008
X3.5827Y-4.7047
X3.5925Y-3.7894
X3.6024Y-3.7106
X3.6122Y-3.5728
X3.6319Y-4.4272
X3.6417Y-3.5433
@ -177,6 +173,7 @@ X4.7244Y-3.9764
X4.7244Y-4.0354
X4.8031Y-4.7047
T2
X3.7008Y-3.4252
X4.0157Y-4.1339
T3
X3.8976Y-4.4783

View File

@ -5,9 +5,9 @@
{
"Vendor": "KiCad",
"Application": "Pcbnew",
"Version": "5.1.9-73d0e3b20d~88~ubuntu20.04.1"
"Version": "5.1.5+dfsg1-2build2"
},
"CreationDate": "2021-04-14T15:42:58+04:00"
"CreationDate": "2021-09-23T19:28:15+02:00"
},
"GeneralSpecs":
{

File diff suppressed because it is too large Load Diff

View File

@ -397,41 +397,50 @@ X 2 2 150 0 50 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# HD_MCUs_STM32L011F4U6TR
# HD_MCUs_STM32L031G6U7
#
DEF HD_MCUs_STM32L011F4U6TR U 0 40 Y Y 1 F N
F0 "U" -300 600 50 H V C CNN
F1 "HD_MCUs_STM32L011F4U6TR" 450 600 50 H V C CNN
F2 "HD_DFN_QFN:ST_UFQFPN-20_3x3mm_P0.5mm" 0 -750 50 H I C CNN
F3 "" -50 800 50 H I C CNN
F4 "STMicroelectronics" 0 -850 50 H I C CNN "Manufacturer"
F5 "STM32L011F4U6TR" 0 -950 50 H I C CNN "Code"
F6 "497-17478-1-ND" 0 -1050 50 H I C CNN "Digikey"
F7 "511-STM32L011F4U6TR" 0 -1150 50 H I C CNN "Mouser"
F8 "2851005" 0 -1250 50 H I C CNN "Farnell"
F9 "STM32L011F4U6TR" 0 -1350 50 H I C CNN "TME"
DEF HD_MCUs_STM32L031G6U7 U 0 40 Y Y 1 F N
F0 "U" -400 800 50 H V C CNN
F1 "HD_MCUs_STM32L031G6U7" 550 800 50 H V C CNN
F2 "MRS_QFN:QFN_28-4x4mm" 0 -1300 50 H I C CNN
F3 "" 50 750 50 H I C CNN
F4 "STMicroelectronics" 0 0 50 H I C CNN "Manufacturer"
F5 "STM32L031G6U7" 0 0 50 H I C CNN "Code"
F6 "497-16807-ND" 0 0 50 H I C CNN "Digikey"
F7 "511-STM32L031G6U7" 0 0 50 H I C CNN "Mouser"
F8 "3365411" 0 0 50 H I C CNN "Farnell"
F9 "STM32L031G6U7TR" 0 0 50 H I C CNN "TME"
F10 "497-16807-ND" 0 0 50 H I C CNN "Arrow"
DRAW
S -350 -550 350 550 1 1 10 f
X PC14 1 -450 150 100 R 50 50 1 1 B
X PA7 10 450 -50 100 L 50 50 1 1 B
X PB1 11 -450 -150 100 R 50 50 1 1 B
X VSS 12 -50 -650 100 U 50 50 1 1 W
X VDD 13 -50 650 100 D 50 50 1 1 W
X PA9 14 450 -150 100 L 50 50 1 1 B
X PA10 15 450 -250 100 L 50 50 1 1 B
X PA13 16 450 -350 100 L 50 50 1 1 B
X PA14 17 450 -450 100 L 50 50 1 1 B
X PB6 18 -450 -250 100 R 50 50 1 1 B
X PB7 19 -450 -350 100 R 50 50 1 1 B
X PC15 2 -450 50 100 R 50 50 1 1 B
X PB9 20 -450 -450 100 R 50 50 1 1 B
X NRST 3 -450 450 100 R 50 50 1 1 I
X VDDA 4 50 650 100 D 50 50 1 1 W
X PA0 5 450 450 100 L 50 50 1 1 B
X PA1 6 450 350 100 L 50 50 1 1 B
X PA4 7 450 250 100 L 50 50 1 1 B
X PA5 8 450 150 100 L 50 50 1 1 B
X PA6 9 450 50 100 L 50 50 1 1 B
S -450 -750 450 750 1 1 10 f
X VDD 1 -50 850 100 D 50 50 1 1 W
X PA4 10 550 250 100 L 50 50 1 1 B
X PA5 11 550 150 100 L 50 50 1 1 B
X PA6 12 550 50 100 L 50 50 1 1 B
X PA7 13 550 -50 100 L 50 50 1 1 B
X PB0 14 -550 -250 100 R 50 50 1 1 B
X PB1 15 -550 -350 100 R 50 50 1 1 B
X VSS 16 -50 -850 100 U 50 50 1 1 W
X VDD 17 50 850 100 D 50 50 1 1 W
X PA8 18 550 -150 100 L 50 50 1 1 B
X PA9 19 550 -250 100 L 50 50 1 1 B
X PC14 2 -550 50 100 R 50 50 1 1 B
X PA10 20 550 -350 100 L 50 50 1 1 B
X PA13 21 550 -450 100 L 50 50 1 1 B
X PA14 22 550 -550 100 L 50 50 1 1 B
X PA15 23 550 -650 100 L 50 50 1 1 B
X PB3 24 -550 -450 100 R 50 50 1 1 B
X PB6 25 -550 -550 100 R 50 50 1 1 B
X PB7 26 -550 -650 100 R 50 50 1 1 B
X BOOT0 27 -550 450 100 R 50 50 1 1 I
X VSS 28 50 -850 100 U 50 50 1 1 W
X PC15 3 -550 -50 100 R 50 50 1 1 B
X NRST 4 -550 650 100 R 50 50 1 1 I
X VDDA 5 150 850 100 D 50 50 1 1 W
X PA0 6 550 650 100 L 50 50 1 1 B
X PA1 7 550 550 100 L 50 50 1 1 B
X PA2 8 550 450 100 L 50 50 1 1 B
X PA3 9 550 350 100 L 50 50 1 1 B
ENDDRAW
ENDDEF
#
@ -481,6 +490,45 @@ X ~ 2 150 0 50 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# HD_Other_TAG_SN
#
DEF HD_Other_TAG_SN H 0 40 Y Y 1 F N
F0 "H" 0 100 50 H I C CNN
F1 "HD_Other_TAG_SN" 0 200 50 H I C CNN
F2 "HD_Other:SERIAL_NUMBER_SPACE" 0 -100 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
T 0 0 0 50 0 0 0 "TAG SN" Normal 0 C C
S -250 50 250 -50 0 1 0 f
ENDDRAW
ENDDEF
#
# HD_Other_TAG_TESTING
#
DEF HD_Other_TAG_TESTING H 0 40 Y Y 1 F N
F0 "H" 0 100 50 H I C CNN
F1 "HD_Other_TAG_TESTING" 0 200 50 H I C CNN
F2 "HD_Other:TEST_CHECKMARKS" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
T 0 0 0 50 0 0 0 "TAG TESTING" Normal 0 C C
S -250 50 250 -50 0 1 0 f
ENDDRAW
ENDDEF
#
# HD_Other_Testpoint
#
DEF HD_Other_Testpoint TP 0 40 N N 1 F N
F0 "TP" 100 0 50 H V C CNN
F1 "HD_Other_Testpoint" 0 -100 50 H I C CNN
F2 "HD_Other:Testpoint_SMD_2mm" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
C 0 0 50 0 1 0 N
X 1 1 -150 0 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# HD_PMICs_MAX15062C
#
DEF HD_PMICs_MAX15062C U 0 40 Y Y 1 F N
@ -569,6 +617,21 @@ X VCC 1 0 0 0 U 50 50 1 1 W N
ENDDRAW
ENDDEF
#
# HD_Power_Symbols_VIN
#
DEF HD_Power_Symbols_VIN #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -150 50 H I C CNN
F1 "HD_Power_Symbols_VIN" 0 150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
P 2 0 1 0 -30 50 0 100 N
P 2 0 1 0 0 0 0 100 N
P 2 0 1 0 0 100 30 50 N
X VIN 1 0 0 0 U 50 50 1 1 W N
ENDDRAW
ENDDEF
#
# HD_Resistors_R0402_100k_5%_1d16W
#
DEF HD_Resistors_R0402_100k_5%_1d16W R 0 40 N N 1 F N
@ -594,31 +657,6 @@ X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# HD_Resistors_R0402_10k_5%_1d16W
#
DEF HD_Resistors_R0402_10k_5%_1d16W R 0 40 N N 1 F N
F0 "R" 100 50 50 H V C CNN
F1 "HD_Resistors_R0402_10k_5%_1d16W" 0 -200 50 H I C CNN
F2 "HD_Resistors:R0402" 0 -300 50 H I C CNN
F3 "" 0 0 50 H I C CNN
F4 "10k" 150 -50 50 H V C CNN "Resistance"
F5 "1/16W" 300 50 50 H I C CNN "Power"
F6 "5%" 300 -50 50 H I C CNN "Precision"
F7 "Yageo" 0 -400 50 H I C CNN "Manufacturer"
F8 "RC0402JR-0710KL" 0 -500 50 H I C CNN "Code"
F9 "Stackpole Electronics Inc" 800 -400 50 H I C CNN "Alt_Manufacturer"
F10 "RMCF0402JT10K0" 800 -500 50 H I C CNN "Alt_Code"
F11 "311-10KJRCT-ND" 0 -600 50 H I C CNN "Digikey"
F12 "603-RC0402JR-0710KL" 0 -700 50 H I C CNN "Mouser"
F13 "*" 0 -800 50 H I C CNN "Farnell"
F14 "SMD0402-10K" 0 -900 50 H I C CNN "TME"
DRAW
S -40 -100 40 100 1 1 10 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# HD_Resistors_R0402_120R_1%_1d16W
#
DEF HD_Resistors_R0402_120R_1%_1d16W R 0 40 N N 1 F N
@ -780,111 +818,4 @@ X VSS 4 -350 -150 100 R 50 50 1 1 W
ENDDRAW
ENDDEF
#
# HD_Transistors_NX3020NAKV,115
#
DEF HD_Transistors_NX3020NAKV,115 Q 0 40 Y Y 2 L N
F0 "Q" -250 250 50 H V C CNN
F1 "HD_Transistors_NX3020NAKV,115" -100 -200 50 H V C CNN
F2 "HD_SOT:SOT563-6" 0 -350 50 H I C CNN
F3 "" 0 -350 50 H I C CNN
F4 "Nexperia USA Inc." 0 -450 50 H I C CNN "Manufacturer"
F5 "NX3020NAKV,115" 0 -550 50 H I C CNN "Code"
F6 "ON Semiconductor" 950 -450 50 H I C CNN "Alt_Manufacturer"
F7 "FDY3000NZCT-ND" 950 -550 50 H I C CNN "Alt_Code"
F8 "1727-1287-1-ND" 0 -650 50 H I C CNN "Digikey"
F9 "771-NX3020NAKV115" 0 -750 50 H I C CNN "Mouser"
F10 "2311182" 0 -850 50 H I C CNN "Farnell"
F11 "X" 0 -950 50 H I C CNN "TME"
DRAW
S -300 200 300 -150 1 1 0 f
S -300 200 300 -150 2 1 0 f
P 2 1 1 0 -120 10 -110 10 N
P 2 1 1 0 -120 15 -110 15 N
P 2 1 1 0 -115 0 -130 -20 N
P 2 1 1 0 -115 0 -130 20 N
P 2 1 1 0 -115 0 -100 -20 N
P 2 1 1 0 -115 0 -100 20 N
P 2 1 1 0 -115 100 -115 -100 N
P 2 1 1 0 -110 -15 -120 -15 N
P 2 1 1 0 -110 -10 -120 -10 N
P 2 1 1 0 -75 0 75 0 N
P 2 1 1 0 -50 20 -50 100 N
P 2 1 1 0 -50 100 -300 100 N
P 2 1 1 0 -50 100 0 100 N
P 2 1 1 0 -10 135 -10 140 N
P 2 1 1 0 -10 165 -10 140 N
P 2 1 1 0 0 -50 0 -10 N
P 2 1 1 0 0 -10 0 0 N
P 2 1 1 0 0 20 -15 40 N
P 2 1 1 0 0 50 0 20 N
P 2 1 1 0 0 100 0 50 N
P 2 1 1 0 50 25 50 20 N
P 3 1 1 0 -300 -100 0 -100 0 -50 N
P 3 1 1 0 -130 20 -105 20 -100 20 N
P 3 1 1 0 -100 -20 -125 -20 -130 -20 N
P 3 1 1 0 -65 20 -40 20 -35 20 N
P 3 1 1 0 -15 20 10 20 15 20 N
P 3 1 1 0 -15 40 15 40 0 20 N
P 3 1 1 0 -10 40 -10 35 -5 35 N
P 3 1 1 0 -5 35 10 35 10 40 N
P 3 1 1 0 -5 140 -5 155 -5 160 N
P 3 1 1 0 35 20 60 20 65 20 N
P 3 1 1 0 50 25 50 100 300 100 N
P 4 1 1 0 -125 20 -125 15 -105 20 -105 15 N
P 4 1 1 0 -115 100 -115 150 115 150 115 100 N
P 4 1 1 0 -105 -20 -105 -15 -125 -20 -125 -15 N
P 4 1 1 0 -10 160 -10 140 5 150 -10 160 N
P 4 1 1 0 -5 35 5 35 0 30 -5 35 N
P 4 1 1 0 15 150 -15 170 -15 130 15 150 N
P 4 1 1 0 15 150 15 170 15 150 15 130 N
P 5 1 1 0 -145 -10 -135 0 -115 0 -95 0 -85 10 N
P 2 2 1 0 -120 10 -110 10 N
P 2 2 1 0 -120 15 -110 15 N
P 2 2 1 0 -115 0 -130 -20 N
P 2 2 1 0 -115 0 -130 20 N
P 2 2 1 0 -115 0 -100 -20 N
P 2 2 1 0 -115 0 -100 20 N
P 2 2 1 0 -115 100 -115 -100 N
P 2 2 1 0 -110 -15 -120 -15 N
P 2 2 1 0 -110 -10 -120 -10 N
P 2 2 1 0 -75 0 75 0 N
P 2 2 1 0 -50 20 -50 100 N
P 2 2 1 0 -50 100 -300 100 N
P 2 2 1 0 -10 135 -10 140 N
P 2 2 1 0 -10 165 -10 140 N
P 2 2 1 0 0 -50 0 -10 N
P 2 2 1 0 0 -10 0 0 N
P 2 2 1 0 0 20 -15 40 N
P 2 2 1 0 0 50 0 20 N
P 2 2 1 0 0 100 -50 100 N
P 2 2 1 0 0 100 0 50 N
P 2 2 1 0 50 20 50 100 N
P 2 2 1 0 300 100 50 100 N
P 3 2 1 0 -300 -100 0 -100 0 -50 N
P 3 2 1 0 -130 20 -105 20 -100 20 N
P 3 2 1 0 -100 -20 -125 -20 -130 -20 N
P 3 2 1 0 -65 20 -40 20 -35 20 N
P 3 2 1 0 -15 20 10 20 15 20 N
P 3 2 1 0 -15 40 15 40 0 20 N
P 3 2 1 0 -10 40 -10 35 -5 35 N
P 3 2 1 0 -5 35 10 35 10 40 N
P 3 2 1 0 -5 140 -5 155 -5 160 N
P 3 2 1 0 35 20 60 20 65 20 N
P 4 2 1 0 -125 20 -125 15 -105 20 -105 15 N
P 4 2 1 0 -115 100 -115 150 115 150 115 100 N
P 4 2 1 0 -105 -20 -105 -15 -125 -20 -125 -15 N
P 4 2 1 0 -10 160 -10 140 5 150 -10 160 N
P 4 2 1 0 -5 35 5 35 0 30 -5 35 N
P 4 2 1 0 15 150 -15 170 -15 130 15 150 N
P 4 2 1 0 15 150 15 170 15 150 15 130 N
P 5 2 1 0 -145 -10 -135 0 -115 0 -95 0 -85 10 N
X S1 1 -400 100 100 R 50 50 1 1 B
X G1 2 -400 -100 100 R 50 50 1 1 B
X D1 6 400 100 100 L 50 50 1 1 B
X D2 3 400 100 100 L 50 50 2 1 B
X S2 4 -400 100 100 R 50 50 2 1 B
X G2 5 -400 -100 100 R 50 50 2 1 B
ENDDRAW
ENDDEF
#
#End Library

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
update=Thu 17 Jun 2021 08:18:44 AM CEST
update=So 25. září 2021, 15:44:51
version=1
last_client=kicad
last_client=pcbnew
[general]
version=1
RootSch=
@ -23,9 +23,9 @@ AllowBlindVias=0
RequireCourtyardDefinitions=0
ProhibitOverlappingCourtyards=1
MinTrackWidth=0.25
MinViaDiameter=0.4
MinViaDiameter=0.3
MinViaDrill=0.3
MinMicroViaDiameter=0.2
MinMicroViaDiameter=0.3
MinMicroViaDrill=0.09999999999999999
MinHoleToHole=0.25
TrackWidth1=0.25

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

130781
PCB/iaq_wired_sensor.step Normal file

File diff suppressed because it is too large Load Diff

96240
PCB/iaq_wired_sensor.wrl Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
* config.h
*
* Created on: Sep 5, 2021
* Author: dukenuc
* Author: david
*/
#ifndef INC_CONFIG_H_
@ -10,36 +10,96 @@
/* TODO: add comments to everything */
#include "stdint.h"
/* EXAMPLE of USAGE */
/*
config_t new_config;
new_config.led_co2_alert_limit1 = 1000;
new_config.led_co2_alert_limit2 = 2000;
new_config.led_on = 1;
new_config.modbus_addr = 0x11;
config_write(&new_config);
config_t config;
config_read(&config);
*/
#include "stdint.h"
#include "stm32l0xx.h"
/* DESCRIPTION OF THE DATA STRUCTURE */
/*
* Data are divided into two groups:
* A) DEVICE DESCRIPTION
* Can not be changed by the user.
* These data can be only read.
* These data are:
* * VENDOR NAME
* * PRODUCT CODE
* * PRODUCT NAME
* * REVISION
* * SERIAL NUMBER
* B) DEVICE CONFIGURATION
* Can be changed by the user.
* These data are:
* * MODBUS ADDRESS - Modbus Address of the device. Default is 254
* * LED ON - Whether the CO2 Level Indication LED should be on or off
* * LED CO2 ALERT LIMIT 1 - CO2 Level when the LED color changes Green<->Yellow
* * LED CO2 ALERT LIMIT 2 - CO2 Level when the LED color changes Yellow<->Red
*
* Device description data can be accessed using direct readout from the memory
* Device configuration data can be accessed using config_t struct.
*/
#define MODBUS_ADDR_LENGTH 2
#define CONFIG_LED_ON_LENGTH 2
#define CONFIG_LED_ALERT1_LENGTH 2
#define CONFIG_LED_ALERT2_LENGTH 2
#define VENDOR_NAME_LENGTH 64
#define PRODUCT_CODE_LENGTH 64
#define PRODUCT_NAME_LENGTH 64
#define REVISION_LENGTH 16
#define SERIAL_NUMBER_LENGTH 64
#define EEPROM_ADDR_START ((uint32_t)0x08080000)
#define EEPROM_ADDR_END ((uint32_t)0x080801FF)
#define CONFIG_EEPROM_ADDR_MODBUS_ADDR EEPROM_ADDR_START
#define CONFIG_EEPROM_ADDR_LED_ON_ADDR CONFIG_EEPROM_ADDR_MODBUS_ADDR + MODBUS_ADDR_LENGTH
#define CONFIG_EEPROM_ADDR_LED_ALERT1_ADDR CONFIG_EEPROM_ADDR_LED_ON_ADDR + CONFIG_LED_ON_LENGTH
#define CONFIG_EEPROM_ADDR_LED_ALERT2_ADDR CONFIG_EEPROM_ADDR_LED_ALERT1_ADDR + CONFIG_LED_ALERT1_LENGTH
#define CONFIG_EEPROM_ADDR_VENDOR_NAME CONFIG_EEPROM_ADDR_LED_ALERT2_ADDR + CONFIG_LED_ALERT2_LENGTH
#define CONFIG_EEPROM_ADDR_PRODUCT_CODE CONFIG_EEPROM_ADDR_VENDOR_NAME + VENDOR_NAME_LENGTH
#define CONFIG_EEPROM_ADDR_PRODUCT_NAME CONFIG_EEPROM_ADDR_PRODUCT_CODE + PRODUCT_CODE_LENGTH
#define CONFIG_EEPROM_ADDR_REVISION CONFIG_EEPROM_ADDR_PRODUCT_NAME + PRODUCT_NAME_LENGTH
#define CONFIG_EEPROM_ADDR_SERIAL_NUMBER CONFIG_EEPROM_ADDR_REVISION + REVISION_LENGTH
#define FLASH_PEKEY1 0x89ABCDEF
#define FLASH_PEKEY2 0x02030405
#define CONFIG_OK 0
#define CONFIG_ERROR -1
#define EEPROM_OK 0
#define EEPROM_ERROR -1
#define EEPROM_UNLOCK_ERROR -2
#define EEPROM_LOCK_ERROR -3
#define EEPROM_WRITE_ERROR -4
#define EEPROM_ADDR_ERROR -5
#define SYSTICK_FREQ_HZ 12000000
#define EEPROM_TIMEOUT_MAX_MS_INV 200
typedef struct
{
/* DEVICE ID */
uint8_t vendor_name[VENDOR_NAME_LENGTH];
uint8_t product_code[PRODUCT_CODE_LENGTH];
uint8_t product_name[PRODUCT_NAME_LENGTH];
uint8_t revision[REVISION_LENGTH];
uint8_t serial_number[SERIAL_NUMBER_LENGTH];
/* DEVICE SPECIFIC CONFIG */
/* DEVICE CONFIG */
uint8_t led_on;
uint16_t led_co2_alert_limit1;
uint16_t led_co2_alert_limit2;
/* MODBUS CONFIG */
uint16_t modbus_addr;
} config_t;
int8_t read_config(config_t *config);
int8_t write_config(config_t *config);
int8_t config_read(config_t *config);
int8_t config_write(config_t *config);
#endif /* INC_CONFIG_H_ */

View File

@ -53,6 +53,7 @@ extern "C" {
#include "sht4x.h"
#include "sps30.h"
#include "modbus.h"
#include "config.h"
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/

View File

@ -2,17 +2,163 @@
* config.c
*
* Created on: Sep 5, 2021
* Author: dukenuc
* Author: david
*/
#include "config.h"
int8_t read_config(config_t *config)
/* Function to lock the EEPROM */
static int8_t eeprom_lock(void);
/* Function to unlock the EEPROM */
static int8_t eeprom_unlock(void);
/* Function to write one byte to the EEPROM */
/* IMPORTANT: EEPROM must be unlocked first */
static int8_t eeprom_program_byte(uint32_t addr, uint8_t ee_data);
/* Function to write two bytes to the EEPROM */
/* IMPORTANT: EEPROM must be unlocked first */
static int8_t eeprom_program_halfword(uint32_t addr, uint16_t ee_data);
int8_t config_read(config_t *config)
{
config->modbus_addr = *(uint16_t *) (CONFIG_EEPROM_ADDR_MODBUS_ADDR);
config->led_on = *(uint16_t *) (CONFIG_EEPROM_ADDR_LED_ON_ADDR);
config->led_co2_alert_limit1 = *(uint16_t *) (CONFIG_EEPROM_ADDR_LED_ALERT1_ADDR);
config->led_co2_alert_limit2 = *(uint16_t *) (CONFIG_EEPROM_ADDR_LED_ALERT2_ADDR);
return CONFIG_OK;
}
int8_t write_config(config_t *config)
int8_t config_write(config_t *config)
{
/* Unlock the EEPROM */
if (eeprom_unlock() != EEPROM_OK)
{
return EEPROM_UNLOCK_ERROR;
}
/* Reset the ERASE and DATA bits in the FLASH_PECR register to disable any residual erase */
FLASH->PECR = FLASH->PECR & ~(FLASH_PECR_ERASE | FLASH_PECR_DATA);
/* Write MODBUS ADDRESS */
if (eeprom_program_halfword(CONFIG_EEPROM_ADDR_MODBUS_ADDR, config->modbus_addr) != EEPROM_OK)
{
return EEPROM_WRITE_ERROR;
}
/* Write LED ON */
if (eeprom_program_byte(CONFIG_EEPROM_ADDR_LED_ON_ADDR, config->led_on) != EEPROM_OK)
{
return EEPROM_WRITE_ERROR;
}
/* Write LED CO2 ALERT LIMIT 1 */
if (eeprom_program_halfword(CONFIG_EEPROM_ADDR_LED_ALERT1_ADDR, config->led_co2_alert_limit1) != EEPROM_OK)
{
return EEPROM_WRITE_ERROR;
}
/* Write LED CO2 ALERT LIMIT 2 */
if (eeprom_program_halfword(CONFIG_EEPROM_ADDR_LED_ALERT2_ADDR, config->led_co2_alert_limit2) != EEPROM_OK)
{
return EEPROM_WRITE_ERROR;
}
/* Lock EEPROM*/
if (eeprom_lock() != EEPROM_OK)
{
return EEPROM_LOCK_ERROR;
}
return CONFIG_OK;
}
static int8_t eeprom_lock(void)
{
uint32_t tick_start = SysTick->VAL;
while ((FLASH->SR & FLASH_SR_BSY) != 0) /* Wait for FLASH to be free */
{
/* Timeout test */
/* The maximum writing time is 3.94ms (half-word) */
uint32_t tick_last = SysTick->VAL;
uint32_t tick_diff;
if (tick_start <= tick_last)
{
tick_diff = tick_last - tick_start;
} else
{
tick_diff = (0xFFFFFFFF - tick_last) + tick_start;
}
/* If the time difference is more than 5ms */
if (tick_diff >= (uint32_t)((uint32_t)SYSTICK_FREQ_HZ*(uint32_t)EEPROM_TIMEOUT_MAX_MS_INV))
{
return EEPROM_LOCK_ERROR;
}
}
FLASH->PECR = FLASH->PECR & ~(FLASH_PECR_ERRIE | FLASH_PECR_EOPIE); /* disable flash interrupts */
FLASH->PECR = FLASH->PECR | FLASH_PECR_PELOCK; /* Lock memory with PELOCK */
return EEPROM_OK;
}
static int8_t eeprom_unlock(void)
{
uint32_t tick_start = SysTick->VAL;
while ((FLASH->SR & FLASH_SR_BSY) != 0) /* Wait for FLASH to be free */
{
/* Timeout test */
/* The maximum writing time is 3.94ms (half-word) */
uint32_t tick_last = SysTick->VAL;
uint32_t tick_diff;
if (tick_start <= tick_last)
{
tick_diff = tick_last - tick_start;
} else
{
tick_diff = (0xFFFFFFFF - tick_last) + tick_start;
}
/* If the time difference is more than 5ms */
if (tick_diff >= (uint32_t)((uint32_t)SYSTICK_FREQ_HZ*(uint32_t)EEPROM_TIMEOUT_MAX_MS_INV))
{
return EEPROM_UNLOCK_ERROR;
}
}
if ((FLASH->PECR & FLASH_PECR_PELOCK) != 0) /* If PELOCK is locked */
{
/* Unlock PELOCK */
FLASH->PEKEYR = FLASH_PEKEY1; /* PEKEY1 */
FLASH->PEKEYR = FLASH_PEKEY2; /* PEKEY2 */
}
FLASH->PECR = FLASH->PECR | (FLASH_PECR_ERRIE | FLASH_PECR_EOPIE); /* enable flash interrupts */
return EEPROM_OK;
}
static int8_t eeprom_program_byte(uint32_t addr, uint8_t ee_data)
{
if ((EEPROM_ADDR_START <= addr) && (addr <= EEPROM_ADDR_END - 1))
{
*(uint8_t *)(addr) = ee_data; /* write data to EEPROM */
if (*(uint8_t *)(addr) != ee_data)
{
return EEPROM_WRITE_ERROR;
}
return EEPROM_OK;
} else
{
return EEPROM_ADDR_ERROR;
}
}
static int8_t eeprom_program_halfword(uint32_t addr, uint16_t ee_data)
{
if ((EEPROM_ADDR_START <= addr) && (addr <= EEPROM_ADDR_END - 2))
{
*(uint16_t *)(addr) = ee_data; /* write data to EEPROM */
if (*(uint16_t *)(addr) != ee_data)
{
return EEPROM_WRITE_ERROR;
}
return EEPROM_OK;
} else
{
return EEPROM_ADDR_ERROR;
}
}

View File

@ -68,6 +68,6 @@
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;"/>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&#10; &lt;gdbmemoryBlockExpression address=&quot;134742016&quot; label=&quot;0x08080000&quot;/&gt;&#10; &lt;gdbmemoryBlockExpression address=&quot;134742020&quot; label=&quot;0x08080004&quot;/&gt;&#10;&lt;/memoryBlockExpressionList&gt;&#10;"/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
</launchConfiguration>