├── .gitignore ├── 3D ├── _sapcer_left_x4.photon ├── sapcer_left.stl ├── sapcer_left_lowres_nopillars.photon ├── sapcer_left_slow_nopillars.photon ├── sapcer_right.stl ├── sapcer_right_lowres_pillars.photon ├── spacer.scad ├── spacer_left.step └── spacer_right.step ├── IO.kicad_sch ├── LICENSE ├── README.md ├── blind_tc ├── blind_tc-backups │ └── blind_tc-2022-01-19_163558.zip ├── blind_tc-cache.lib ├── blind_tc.kicad_pcb ├── blind_tc.kicad_pcb-bak ├── blind_tc.kicad_prl ├── blind_tc.kicad_pro ├── blind_tc.kicad_sch ├── blind_tc.step ├── fp-info-cache ├── gerber │ ├── blind_tc-B_Cu.gbl │ ├── blind_tc-B_Mask.gbs │ ├── blind_tc-B_Paste.gbp │ ├── blind_tc-B_SilkS.gbo │ ├── blind_tc-Edge_Cuts.gm1 │ ├── blind_tc-F_Cu.gtl │ ├── blind_tc-F_Mask.gts │ ├── blind_tc-F_Paste.gtp │ ├── blind_tc-F_SilkS.gto │ ├── blind_tc-NPTH.drl │ ├── blind_tc-PTH.drl │ └── blind_tc-v1.1.zip └── outfiles │ ├── blind_tc-brd.svg │ ├── text2807.png │ └── text3608.png ├── bom └── ibom.html ├── firmware ├── .mxproject ├── Core │ ├── Inc │ │ ├── led.h │ │ ├── main.h │ │ ├── stm32f0xx_hal_conf.h │ │ └── stm32f0xx_it.h │ └── Src │ │ ├── led.c │ │ ├── main.c │ │ ├── stm32f0xx_hal_msp.c │ │ ├── stm32f0xx_it.c │ │ └── system_stm32f0xx.c ├── Drivers │ ├── CMSIS │ │ ├── Device │ │ │ └── ST │ │ │ │ └── STM32F0xx │ │ │ │ └── Include │ │ │ │ ├── stm32f072xb.h │ │ │ │ ├── stm32f0xx.h │ │ │ │ └── system_stm32f0xx.h │ │ └── Include │ │ │ ├── cmsis_armcc.h │ │ │ ├── cmsis_armclang.h │ │ │ ├── cmsis_compiler.h │ │ │ ├── cmsis_gcc.h │ │ │ ├── cmsis_iccarm.h │ │ │ ├── cmsis_version.h │ │ │ ├── core_armv8mbl.h │ │ │ ├── core_armv8mml.h │ │ │ ├── core_cm0.h │ │ │ ├── core_cm0plus.h │ │ │ ├── core_cm1.h │ │ │ ├── core_cm23.h │ │ │ ├── core_cm3.h │ │ │ ├── core_cm33.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cm7.h │ │ │ ├── core_sc000.h │ │ │ ├── core_sc300.h │ │ │ ├── mpu_armv7.h │ │ │ ├── mpu_armv8.h │ │ │ └── tz_context.h │ └── STM32F0xx_HAL_Driver │ │ ├── Inc │ │ ├── Legacy │ │ │ └── stm32_hal_legacy.h │ │ ├── stm32f0xx_hal.h │ │ ├── stm32f0xx_hal_adc.h │ │ ├── stm32f0xx_hal_adc_ex.h │ │ ├── stm32f0xx_hal_cortex.h │ │ ├── stm32f0xx_hal_def.h │ │ ├── stm32f0xx_hal_dma.h │ │ ├── stm32f0xx_hal_dma_ex.h │ │ ├── stm32f0xx_hal_exti.h │ │ ├── stm32f0xx_hal_flash.h │ │ ├── stm32f0xx_hal_flash_ex.h │ │ ├── stm32f0xx_hal_gpio.h │ │ ├── stm32f0xx_hal_gpio_ex.h │ │ ├── stm32f0xx_hal_i2c.h │ │ ├── stm32f0xx_hal_i2c_ex.h │ │ ├── stm32f0xx_hal_pcd.h │ │ ├── stm32f0xx_hal_pcd_ex.h │ │ ├── stm32f0xx_hal_pwr.h │ │ ├── stm32f0xx_hal_pwr_ex.h │ │ ├── stm32f0xx_hal_rcc.h │ │ ├── stm32f0xx_hal_rcc_ex.h │ │ ├── stm32f0xx_hal_spi.h │ │ ├── stm32f0xx_hal_spi_ex.h │ │ ├── stm32f0xx_hal_tim.h │ │ ├── stm32f0xx_hal_tim_ex.h │ │ └── stm32f0xx_ll_usb.h │ │ └── Src │ │ ├── stm32f0xx_hal.c │ │ ├── stm32f0xx_hal_adc.c │ │ ├── stm32f0xx_hal_adc_ex.c │ │ ├── stm32f0xx_hal_cortex.c │ │ ├── stm32f0xx_hal_dma.c │ │ ├── stm32f0xx_hal_exti.c │ │ ├── stm32f0xx_hal_flash.c │ │ ├── stm32f0xx_hal_flash_ex.c │ │ ├── stm32f0xx_hal_gpio.c │ │ ├── stm32f0xx_hal_i2c.c │ │ ├── stm32f0xx_hal_i2c_ex.c │ │ ├── stm32f0xx_hal_pcd.c │ │ ├── stm32f0xx_hal_pcd_ex.c │ │ ├── stm32f0xx_hal_pwr.c │ │ ├── stm32f0xx_hal_pwr_ex.c │ │ ├── stm32f0xx_hal_rcc.c │ │ ├── stm32f0xx_hal_rcc_ex.c │ │ ├── stm32f0xx_hal_spi.c │ │ ├── stm32f0xx_hal_spi_ex.c │ │ ├── stm32f0xx_hal_tim.c │ │ ├── stm32f0xx_hal_tim_ex.c │ │ └── stm32f0xx_ll_usb.c ├── Makefile ├── Middlewares │ └── ST │ │ └── STM32_USB_Device_Library │ │ ├── Class │ │ └── CDC │ │ │ ├── Inc │ │ │ └── usbd_cdc.h │ │ │ └── Src │ │ │ └── usbd_cdc.c │ │ └── Core │ │ ├── Inc │ │ ├── usbd_core.h │ │ ├── usbd_ctlreq.h │ │ ├── usbd_def.h │ │ └── usbd_ioreq.h │ │ └── Src │ │ ├── usbd_core.c │ │ ├── usbd_ctlreq.c │ │ └── usbd_ioreq.c ├── STM32F072C8Tx_FLASH.ld ├── USB_DEVICE │ ├── App │ │ ├── usb_device.c │ │ ├── usb_device.h │ │ ├── usbd_cdc_if.c │ │ ├── usbd_cdc_if.h │ │ ├── usbd_desc.c │ │ └── usbd_desc.h │ └── Target │ │ ├── usbd_conf.c │ │ └── usbd_conf.h ├── firmware.ioc ├── openocd.cfg ├── otter.jdebug ├── otter.jdebug.user └── startup_stm32f072xb.s ├── fp-info-cache ├── gerber ├── temperature-logger-B_Cu.gbl ├── temperature-logger-B_Mask.gbs ├── temperature-logger-B_Paste.gbp ├── temperature-logger-B_SilkS.gbo ├── temperature-logger-B_Silkscreen.gbo ├── temperature-logger-Edge_Cuts.gm1 ├── temperature-logger-F_Cu.gtl ├── temperature-logger-F_Mask.gts ├── temperature-logger-F_Paste.gtp ├── temperature-logger-F_SilkS.gto ├── temperature-logger-F_Silkscreen.gto ├── temperature-logger-In1_Cu.g2 ├── temperature-logger-In2_Cu.g3 ├── temperature-logger-NPTH.drl └── temperature-logger-PTH.drl ├── images ├── README.md ├── back.jpg ├── front.jpg ├── front_connected.jpg ├── front_sakura.jpg ├── inputs.jpg └── open.jpg ├── outfiles ├── Untitled.scad ├── extrude.step ├── part.FCStd ├── part.FCStd1 ├── part.step ├── parts.dxf ├── spacer.stl ├── temperature-logger-brd.dxf ├── temperature-logger-brd.svg ├── text.svg ├── text856-3.png └── text856.png ├── temperature-logger-backups └── temperature-logger-2022-01-19_162959.zip ├── temperature-logger.csv ├── temperature-logger.kicad_pcb ├── temperature-logger.kicad_prl ├── temperature-logger.kicad_pro ├── temperature-logger.kicad_sch ├── temperature-logger.pdf ├── temperature-logger.xml └── tsens.kicad_sch /.gitignore: -------------------------------------------------------------------------------- 1 | firmware/tmp* 2 | firmware/tmp/* 3 | log 4 | firmware/build 5 | -------------------------------------------------------------------------------- /3D/_sapcer_left_x4.photon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/3D/_sapcer_left_x4.photon -------------------------------------------------------------------------------- /3D/sapcer_left_lowres_nopillars.photon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/3D/sapcer_left_lowres_nopillars.photon -------------------------------------------------------------------------------- /3D/sapcer_left_slow_nopillars.photon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/3D/sapcer_left_slow_nopillars.photon -------------------------------------------------------------------------------- /3D/sapcer_right_lowres_pillars.photon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/3D/sapcer_right_lowres_pillars.photon -------------------------------------------------------------------------------- /3D/spacer.scad: -------------------------------------------------------------------------------- 1 | $fn = 100; 2 | 3 | right(); 4 | //left(); 5 | 6 | module left(z=10){ 7 | difference(){ 8 | union(){ 9 | translate([0,0,z/2])cube([10,40,z],center=true); 10 | translate([0,20,0])cylinder(r=5,h=z); 11 | translate([0,-20,0])cylinder(r=5,h=z); 12 | translate([16.25/2,20,z/2])cube([16.25,10,z],center=true); 13 | translate([2.5,-20-2.5,z/2])cube([5,5,z],center=true); 14 | 15 | translate([0,0,-1])cylinder(r=.9,h=1); 16 | translate([12.5,20,-1])cylinder(r=.9,h=1); 17 | } union(){ 18 | translate([0,-20,-0.1])cylinder(d=3.1,h=z+0.2); 19 | translate([0,20,-0.1])cylinder(d=3.1,h=z+0.2); 20 | } 21 | } 22 | } 23 | 24 | module right(z=10){ 25 | difference(){ 26 | union(){ 27 | translate([0,0,z/2])cube([10,40,z],center=true); 28 | translate([-2.5,-20-2.5,z/2])cube([5,5,z],center=true); 29 | translate([0,20,0])cylinder(r=5,h=z); 30 | translate([0,-20,0])cylinder(r=5,h=z); 31 | translate([-10.5/2,20,z/2])cube([10.5,10,z],center=true); 32 | translate([-10.925/2-10.5,20,z-(z-4)/2])cube([10.925,10,z-4],center=true); 33 | translate([-12.2/2-10.5-10.925,20,z-(z-2)/2])cube([12.2,10,z-2],center=true); 34 | translate([-4/2-10.5-10.925-12.2,20+1.5,z/2])cube([4,7,z],center=true); 35 | 36 | 37 | translate([0,0,-1])cylinder(r=.9,h=1); 38 | translate([-35.5,20,-1])cylinder(r=.9,h=1); 39 | } union(){ 40 | translate([0,-20,-0.1])cylinder(d=3.1,h=z+0.2); 41 | translate([0,20,-0.1])cylinder(d=3.1,h=z+0.2); 42 | } 43 | } 44 | } 45 | 46 | module right_simple(z=8){ 47 | difference(){ 48 | union(){ 49 | translate([0,0,z/2])cube([10,40,z],center=true); 50 | translate([0,20,0])cylinder(r=5,h=z); 51 | translate([0,-20,0])cylinder(r=5,h=z); 52 | translate([-10.5/2,20,z/2])cube([10.5,10,z],center=true); 53 | //translate([2.5,-20-2.5,z/2])cube([5,5,z],center=true); 54 | 55 | translate([0,0,-1])cylinder(r=.9,h=1); 56 | //translate([12.5,20,-1])cylinder(r=.9,h=1); 57 | } union(){ 58 | translate([0,-20,-0.1])cylinder(d=3.1,h=z+0.2); 59 | translate([0,20,-0.1])cylinder(d=3.1,h=z+0.2); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # temperature-logger 2 | 3 | Anotter USB temperature logger that can record up to four channels with thermocouple or NTCs connected via CDC directly or SCPI to USB. You can choose how you want to receive the data by moving the selector switch next to the Type-C receptacle. If you switch to CSV, it will simply output all connected channels to your console in a machine and human readable format (CSV or TSV, I prefer TSV) at about 10 readings per second. If you switch to SCPI, an SCPI terminal is displayed via USB so that you can integrate the logger into your lab equipment. This is particularly handy because you can also use it to control the OC- or H-Bridge outputs, which turns the logger into a thermal IO card. This can be useful when working with Peltier- and heating elements. 4 | 5 | ![front](images/front.jpg) 6 | 7 | Having needed a temperature logger several times in the past, after hacking two together for spontaneous testing, I decided to develop a proper one. This is my result. :3 8 | 9 | ![open](images/open.jpg) 10 | 11 | ### Inputs 12 | 13 | Each of the four inputs can either be configured as thermocouple or NTC (resistance measuring) input. At the moment they are assembly options, I need to test if I can assmble both at the same time. 14 | 15 | **thermocouple** 16 | 17 | One MAX31855KASA can be populated per channel, enabling the reading of K-type thermocouples. Other versions of this IC are available if other thermocouple types are required. 18 | 19 | **NTC** 20 | 21 | The NTC amplifier is based on [this appnote](https://www.ti.com/lit/an/sboa323a/sboa323a.pdf) and allows amplification of small ranges to the full ADC range. This was an important motivation for this project as I needed a multi-channel body temperature logger. 22 | 23 | If you want to know more, you can check out the [schematic](https://github.com/Jana-Marie/temperature-logger/blob/main/temperature-logger.pdf). 24 | 25 | ![inputs](images/inputs.jpg) 26 | 27 | ### TODO 28 | 29 | - [ ] implement SCPI - done in the SCPI branch, check it out, but there is not much space left on the STM32, hence no merge yet 30 | - [ ] add sigrok communication/protocol 31 | 32 | ### License 33 | 34 | Copyright Jana Marie Hemsing 2023. 35 | 36 | This source describes Open Hardware and is licensed under the CERN-OHL-S v2. 37 | 38 | You may redistribute and modify this source and make products using it under 39 | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt). 40 | 41 | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, 42 | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A 43 | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 for applicable conditions. 44 | 45 | Source location: https://github.com/Jana-Marie/temperature-logger 46 | 47 | As per CERN-OHL-S v2 section 4, should You produce hardware based on this 48 | source, You must where practicable maintain the Source Location visible 49 | on the external case of the Gizmo or other products you make using this 50 | source. 51 | -------------------------------------------------------------------------------- /blind_tc/blind_tc-backups/blind_tc-2022-01-19_163558.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/blind_tc/blind_tc-backups/blind_tc-2022-01-19_163558.zip -------------------------------------------------------------------------------- /blind_tc/blind_tc-cache.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # Mechanical_MountingHole_Pad 5 | # 6 | DEF Mechanical_MountingHole_Pad H 0 40 N N 1 F N 7 | F0 "H" 0 250 50 H V C CNN 8 | F1 "Mechanical_MountingHole_Pad" 0 175 50 H V C CNN 9 | F2 "" 0 0 50 H I C CNN 10 | F3 "" 0 0 50 H I C CNN 11 | $FPLIST 12 | MountingHole*Pad* 13 | $ENDFPLIST 14 | DRAW 15 | C 0 50 50 0 1 50 N 16 | X 1 1 0 -100 100 U 50 50 1 1 I 17 | ENDDRAW 18 | ENDDEF 19 | # 20 | #End Library 21 | -------------------------------------------------------------------------------- /blind_tc/blind_tc.kicad_prl: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "active_layer": 0, 4 | "active_layer_preset": "", 5 | "auto_track_width": true, 6 | "hidden_nets": [], 7 | "high_contrast_mode": 0, 8 | "net_color_mode": 1, 9 | "opacity": { 10 | "pads": 1.0, 11 | "tracks": 1.0, 12 | "vias": 1.0, 13 | "zones": 0.6 14 | }, 15 | "ratsnest_display_mode": 0, 16 | "selection_filter": { 17 | "dimensions": true, 18 | "footprints": true, 19 | "graphics": true, 20 | "keepouts": true, 21 | "lockedItems": true, 22 | "otherItems": true, 23 | "pads": true, 24 | "text": true, 25 | "tracks": true, 26 | "vias": true, 27 | "zones": true 28 | }, 29 | "visible_items": [ 30 | 0, 31 | 1, 32 | 2, 33 | 3, 34 | 4, 35 | 5, 36 | 8, 37 | 9, 38 | 10, 39 | 11, 40 | 12, 41 | 13, 42 | 14, 43 | 15, 44 | 16, 45 | 17, 46 | 18, 47 | 19, 48 | 20, 49 | 21, 50 | 22, 51 | 23, 52 | 24, 53 | 25, 54 | 26, 55 | 27, 56 | 28, 57 | 29, 58 | 30, 59 | 32, 60 | 33, 61 | 34, 62 | 35, 63 | 36 64 | ], 65 | "visible_layers": "000ffff_80000001", 66 | "zone_display_mode": 0 67 | }, 68 | "meta": { 69 | "filename": "blind_tc.kicad_prl", 70 | "version": 3 71 | }, 72 | "project": { 73 | "files": [] 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /blind_tc/blind_tc.kicad_sch: -------------------------------------------------------------------------------- 1 | (kicad_sch (version 20211123) (generator eeschema) 2 | 3 | (uuid 3934cdea-42c8-4ab1-b1be-2c4978ab08ae) 4 | 5 | (paper "A4") 6 | 7 | (lib_symbols 8 | (symbol "Mechanical:MountingHole_Pad" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes) 9 | (property "Reference" "H" (id 0) (at 0 6.35 0) 10 | (effects (font (size 1.27 1.27))) 11 | ) 12 | (property "Value" "MountingHole_Pad" (id 1) (at 0 4.445 0) 13 | (effects (font (size 1.27 1.27))) 14 | ) 15 | (property "Footprint" "" (id 2) (at 0 0 0) 16 | (effects (font (size 1.27 1.27)) hide) 17 | ) 18 | (property "Datasheet" "~" (id 3) (at 0 0 0) 19 | (effects (font (size 1.27 1.27)) hide) 20 | ) 21 | (property "ki_keywords" "mounting hole" (id 4) (at 0 0 0) 22 | (effects (font (size 1.27 1.27)) hide) 23 | ) 24 | (property "ki_description" "Mounting Hole with connection" (id 5) (at 0 0 0) 25 | (effects (font (size 1.27 1.27)) hide) 26 | ) 27 | (property "ki_fp_filters" "MountingHole*Pad*" (id 6) (at 0 0 0) 28 | (effects (font (size 1.27 1.27)) hide) 29 | ) 30 | (symbol "MountingHole_Pad_0_1" 31 | (circle (center 0 1.27) (radius 1.27) 32 | (stroke (width 1.27) (type default) (color 0 0 0 0)) 33 | (fill (type none)) 34 | ) 35 | ) 36 | (symbol "MountingHole_Pad_1_1" 37 | (pin input line (at 0 -2.54 90) (length 2.54) 38 | (name "1" (effects (font (size 1.27 1.27)))) 39 | (number "1" (effects (font (size 1.27 1.27)))) 40 | ) 41 | ) 42 | ) 43 | ) 44 | 45 | 46 | (symbol (lib_id "Mechanical:MountingHole_Pad") (at 88.9 87.63 0) (unit 1) 47 | (in_bom yes) (on_board yes) 48 | (uuid 00000000-0000-0000-0000-0000616c6f7d) 49 | (property "Reference" "H1" (id 0) (at 91.44 86.3854 0) 50 | (effects (font (size 1.27 1.27)) (justify left)) 51 | ) 52 | (property "Value" "MountingHole_Pad" (id 1) (at 91.44 88.6968 0) 53 | (effects (font (size 1.27 1.27)) (justify left)) 54 | ) 55 | (property "Footprint" "MountingHole:MountingHole_3.2mm_M3_Pad_Via" (id 2) (at 88.9 87.63 0) 56 | (effects (font (size 1.27 1.27)) hide) 57 | ) 58 | (property "Datasheet" "~" (id 3) (at 88.9 87.63 0) 59 | (effects (font (size 1.27 1.27)) hide) 60 | ) 61 | (pin "1" (uuid 6a45789b-3855-401f-8139-3c734f7f52f9)) 62 | ) 63 | 64 | (symbol (lib_id "Mechanical:MountingHole_Pad") (at 88.9 96.52 0) (unit 1) 65 | (in_bom yes) (on_board yes) 66 | (uuid 00000000-0000-0000-0000-0000616c7204) 67 | (property "Reference" "H2" (id 0) (at 91.44 95.2754 0) 68 | (effects (font (size 1.27 1.27)) (justify left)) 69 | ) 70 | (property "Value" "MountingHole_Pad" (id 1) (at 91.44 97.5868 0) 71 | (effects (font (size 1.27 1.27)) (justify left)) 72 | ) 73 | (property "Footprint" "MountingHole:MountingHole_3.2mm_M3_Pad_Via" (id 2) (at 88.9 96.52 0) 74 | (effects (font (size 1.27 1.27)) hide) 75 | ) 76 | (property "Datasheet" "~" (id 3) (at 88.9 96.52 0) 77 | (effects (font (size 1.27 1.27)) hide) 78 | ) 79 | (pin "1" (uuid f71da641-16e6-4257-80c3-0b9d804fee4f)) 80 | ) 81 | 82 | (symbol (lib_id "Mechanical:MountingHole_Pad") (at 88.9 105.41 0) (unit 1) 83 | (in_bom yes) (on_board yes) 84 | (uuid 00000000-0000-0000-0000-0000616c7650) 85 | (property "Reference" "H3" (id 0) (at 91.44 104.1654 0) 86 | (effects (font (size 1.27 1.27)) (justify left)) 87 | ) 88 | (property "Value" "MountingHole_Pad" (id 1) (at 91.44 106.4768 0) 89 | (effects (font (size 1.27 1.27)) (justify left)) 90 | ) 91 | (property "Footprint" "MountingHole:MountingHole_3.2mm_M3_Pad_Via" (id 2) (at 88.9 105.41 0) 92 | (effects (font (size 1.27 1.27)) hide) 93 | ) 94 | (property "Datasheet" "~" (id 3) (at 88.9 105.41 0) 95 | (effects (font (size 1.27 1.27)) hide) 96 | ) 97 | (pin "1" (uuid 181abe7a-f941-42b6-bd46-aaa3131f90fb)) 98 | ) 99 | 100 | (symbol (lib_id "Mechanical:MountingHole_Pad") (at 88.9 114.3 0) (unit 1) 101 | (in_bom yes) (on_board yes) 102 | (uuid 00000000-0000-0000-0000-0000616c7656) 103 | (property "Reference" "H4" (id 0) (at 91.44 113.0554 0) 104 | (effects (font (size 1.27 1.27)) (justify left)) 105 | ) 106 | (property "Value" "MountingHole_Pad" (id 1) (at 91.44 115.3668 0) 107 | (effects (font (size 1.27 1.27)) (justify left)) 108 | ) 109 | (property "Footprint" "MountingHole:MountingHole_3.2mm_M3_Pad_Via" (id 2) (at 88.9 114.3 0) 110 | (effects (font (size 1.27 1.27)) hide) 111 | ) 112 | (property "Datasheet" "~" (id 3) (at 88.9 114.3 0) 113 | (effects (font (size 1.27 1.27)) hide) 114 | ) 115 | (pin "1" (uuid 0f22151c-f260-4674-b486-4710a2c42a55)) 116 | ) 117 | 118 | (sheet_instances 119 | (path "/" (page "1")) 120 | ) 121 | 122 | (symbol_instances 123 | (path "/00000000-0000-0000-0000-0000616c6f7d" 124 | (reference "H1") (unit 1) (value "MountingHole_Pad") (footprint "MountingHole:MountingHole_3.2mm_M3_Pad_Via") 125 | ) 126 | (path "/00000000-0000-0000-0000-0000616c7204" 127 | (reference "H2") (unit 1) (value "MountingHole_Pad") (footprint "MountingHole:MountingHole_3.2mm_M3_Pad_Via") 128 | ) 129 | (path "/00000000-0000-0000-0000-0000616c7650" 130 | (reference "H3") (unit 1) (value "MountingHole_Pad") (footprint "MountingHole:MountingHole_3.2mm_M3_Pad_Via") 131 | ) 132 | (path "/00000000-0000-0000-0000-0000616c7656" 133 | (reference "H4") (unit 1) (value "MountingHole_Pad") (footprint "MountingHole:MountingHole_3.2mm_M3_Pad_Via") 134 | ) 135 | ) 136 | ) 137 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-B_Cu.gbl: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2* 2 | G04 #@! TF.CreationDate,2021-12-11T21:30:26+01:00* 3 | G04 #@! TF.ProjectId,blind_tc,626c696e-645f-4746-932e-6b696361645f,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Copper,L2,Bot* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-12-11 21:30:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | %ADD10C,0.800000*% 14 | %ADD11C,6.400000*% 15 | G04 APERTURE END LIST* 16 | D10* 17 | X152697056Y-93302944D03* 18 | X151000000Y-92600000D03* 19 | X149302944Y-93302944D03* 20 | X148600000Y-95000000D03* 21 | X149302944Y-96697056D03* 22 | X151000000Y-97400000D03* 23 | X152697056Y-96697056D03* 24 | X153400000Y-95000000D03* 25 | D11* 26 | X151000000Y-95000000D03* 27 | D10* 28 | X152697056Y-53302944D03* 29 | X151000000Y-52600000D03* 30 | X149302944Y-53302944D03* 31 | X148600000Y-55000000D03* 32 | X149302944Y-56697056D03* 33 | X151000000Y-57400000D03* 34 | X152697056Y-56697056D03* 35 | X153400000Y-55000000D03* 36 | D11* 37 | X151000000Y-55000000D03* 38 | D10* 39 | X56697056Y-93302944D03* 40 | X55000000Y-92600000D03* 41 | X53302944Y-93302944D03* 42 | X52600000Y-95000000D03* 43 | X53302944Y-96697056D03* 44 | X55000000Y-97400000D03* 45 | X56697056Y-96697056D03* 46 | X57400000Y-95000000D03* 47 | D11* 48 | X55000000Y-95000000D03* 49 | D10* 50 | X56697056Y-53302944D03* 51 | X55000000Y-52600000D03* 52 | X53302944Y-53302944D03* 53 | X52600000Y-55000000D03* 54 | X53302944Y-56697056D03* 55 | X55000000Y-57400000D03* 56 | X56697056Y-56697056D03* 57 | X57400000Y-55000000D03* 58 | D11* 59 | X55000000Y-55000000D03* 60 | M02* 61 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-B_Mask.gbs: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2* 2 | G04 #@! TF.CreationDate,2021-12-11T21:30:26+01:00* 3 | G04 #@! TF.ProjectId,blind_tc,626c696e-645f-4746-932e-6b696361645f,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Soldermask,Bot* 6 | G04 #@! TF.FilePolarity,Negative* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-12-11 21:30:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | %ADD10C,0.100000*% 14 | G04 APERTURE END LIST* 15 | D10* 16 | G36* 17 | X55634239Y-91811467D02* 18 | G01* 19 | X55948282Y-91873934D01* 20 | X56539926Y-92119001D01* 21 | X57072392Y-92474784D01* 22 | X57525216Y-92927608D01* 23 | X57880999Y-93460074D01* 24 | X58126066Y-94051718D01* 25 | X58126066Y-94051719D01* 26 | X58251000Y-94679803D01* 27 | X58251000Y-95320197D01* 28 | X58188533Y-95634239D01* 29 | X58126066Y-95948282D01* 30 | X57880999Y-96539926D01* 31 | X57525216Y-97072392D01* 32 | X57072392Y-97525216D01* 33 | X56539926Y-97880999D01* 34 | X55948282Y-98126066D01* 35 | X55634239Y-98188533D01* 36 | X55320197Y-98251000D01* 37 | X54679803Y-98251000D01* 38 | X54365761Y-98188533D01* 39 | X54051718Y-98126066D01* 40 | X53460074Y-97880999D01* 41 | X52927608Y-97525216D01* 42 | X52474784Y-97072392D01* 43 | X52119001Y-96539926D01* 44 | X51873934Y-95948282D01* 45 | X51811467Y-95634239D01* 46 | X51749000Y-95320197D01* 47 | X51749000Y-94679803D01* 48 | X51873934Y-94051719D01* 49 | X51873934Y-94051718D01* 50 | X52119001Y-93460074D01* 51 | X52474784Y-92927608D01* 52 | X52927608Y-92474784D01* 53 | X53460074Y-92119001D01* 54 | X54051718Y-91873934D01* 55 | X54365761Y-91811467D01* 56 | X54679803Y-91749000D01* 57 | X55320197Y-91749000D01* 58 | X55634239Y-91811467D01* 59 | G37* 60 | G36* 61 | X151634239Y-91811467D02* 62 | G01* 63 | X151948282Y-91873934D01* 64 | X152539926Y-92119001D01* 65 | X153072392Y-92474784D01* 66 | X153525216Y-92927608D01* 67 | X153880999Y-93460074D01* 68 | X154126066Y-94051718D01* 69 | X154126066Y-94051719D01* 70 | X154251000Y-94679803D01* 71 | X154251000Y-95320197D01* 72 | X154188533Y-95634239D01* 73 | X154126066Y-95948282D01* 74 | X153880999Y-96539926D01* 75 | X153525216Y-97072392D01* 76 | X153072392Y-97525216D01* 77 | X152539926Y-97880999D01* 78 | X151948282Y-98126066D01* 79 | X151634239Y-98188533D01* 80 | X151320197Y-98251000D01* 81 | X150679803Y-98251000D01* 82 | X150365761Y-98188533D01* 83 | X150051718Y-98126066D01* 84 | X149460074Y-97880999D01* 85 | X148927608Y-97525216D01* 86 | X148474784Y-97072392D01* 87 | X148119001Y-96539926D01* 88 | X147873934Y-95948282D01* 89 | X147811467Y-95634239D01* 90 | X147749000Y-95320197D01* 91 | X147749000Y-94679803D01* 92 | X147873934Y-94051719D01* 93 | X147873934Y-94051718D01* 94 | X148119001Y-93460074D01* 95 | X148474784Y-92927608D01* 96 | X148927608Y-92474784D01* 97 | X149460074Y-92119001D01* 98 | X150051718Y-91873934D01* 99 | X150365761Y-91811467D01* 100 | X150679803Y-91749000D01* 101 | X151320197Y-91749000D01* 102 | X151634239Y-91811467D01* 103 | G37* 104 | G36* 105 | X55634239Y-51811467D02* 106 | G01* 107 | X55948282Y-51873934D01* 108 | X56539926Y-52119001D01* 109 | X57072392Y-52474784D01* 110 | X57525216Y-52927608D01* 111 | X57880999Y-53460074D01* 112 | X58126066Y-54051718D01* 113 | X58126066Y-54051719D01* 114 | X58251000Y-54679803D01* 115 | X58251000Y-55320197D01* 116 | X58188533Y-55634239D01* 117 | X58126066Y-55948282D01* 118 | X57880999Y-56539926D01* 119 | X57525216Y-57072392D01* 120 | X57072392Y-57525216D01* 121 | X56539926Y-57880999D01* 122 | X55948282Y-58126066D01* 123 | X55634239Y-58188533D01* 124 | X55320197Y-58251000D01* 125 | X54679803Y-58251000D01* 126 | X54365761Y-58188533D01* 127 | X54051718Y-58126066D01* 128 | X53460074Y-57880999D01* 129 | X52927608Y-57525216D01* 130 | X52474784Y-57072392D01* 131 | X52119001Y-56539926D01* 132 | X51873934Y-55948282D01* 133 | X51811467Y-55634239D01* 134 | X51749000Y-55320197D01* 135 | X51749000Y-54679803D01* 136 | X51873934Y-54051719D01* 137 | X51873934Y-54051718D01* 138 | X52119001Y-53460074D01* 139 | X52474784Y-52927608D01* 140 | X52927608Y-52474784D01* 141 | X53460074Y-52119001D01* 142 | X54051718Y-51873934D01* 143 | X54365761Y-51811467D01* 144 | X54679803Y-51749000D01* 145 | X55320197Y-51749000D01* 146 | X55634239Y-51811467D01* 147 | G37* 148 | G36* 149 | X151634239Y-51811467D02* 150 | G01* 151 | X151948282Y-51873934D01* 152 | X152539926Y-52119001D01* 153 | X153072392Y-52474784D01* 154 | X153525216Y-52927608D01* 155 | X153880999Y-53460074D01* 156 | X154126066Y-54051718D01* 157 | X154126066Y-54051719D01* 158 | X154251000Y-54679803D01* 159 | X154251000Y-55320197D01* 160 | X154188533Y-55634239D01* 161 | X154126066Y-55948282D01* 162 | X153880999Y-56539926D01* 163 | X153525216Y-57072392D01* 164 | X153072392Y-57525216D01* 165 | X152539926Y-57880999D01* 166 | X151948282Y-58126066D01* 167 | X151634239Y-58188533D01* 168 | X151320197Y-58251000D01* 169 | X150679803Y-58251000D01* 170 | X150365761Y-58188533D01* 171 | X150051718Y-58126066D01* 172 | X149460074Y-57880999D01* 173 | X148927608Y-57525216D01* 174 | X148474784Y-57072392D01* 175 | X148119001Y-56539926D01* 176 | X147873934Y-55948282D01* 177 | X147811467Y-55634239D01* 178 | X147749000Y-55320197D01* 179 | X147749000Y-54679803D01* 180 | X147873934Y-54051719D01* 181 | X147873934Y-54051718D01* 182 | X148119001Y-53460074D01* 183 | X148474784Y-52927608D01* 184 | X148927608Y-52474784D01* 185 | X149460074Y-52119001D01* 186 | X150051718Y-51873934D01* 187 | X150365761Y-51811467D01* 188 | X150679803Y-51749000D01* 189 | X151320197Y-51749000D01* 190 | X151634239Y-51811467D01* 191 | G37* 192 | M02* 193 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-B_Paste.gbp: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2* 2 | G04 #@! TF.CreationDate,2021-12-11T21:30:26+01:00* 3 | G04 #@! TF.ProjectId,blind_tc,626c696e-645f-4746-932e-6b696361645f,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Paste,Bot* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-12-11 21:30:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | G04 APERTURE END LIST* 14 | M02* 15 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-B_SilkS.gbo: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2* 2 | G04 #@! TF.CreationDate,2021-12-11T21:30:26+01:00* 3 | G04 #@! TF.ProjectId,blind_tc,626c696e-645f-4746-932e-6b696361645f,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Legend,Bot* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-12-11 21:30:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | G04 APERTURE END LIST* 14 | M02* 15 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-Edge_Cuts.gm1: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2* 2 | G04 #@! TF.CreationDate,2021-12-11T21:30:26+01:00* 3 | G04 #@! TF.ProjectId,blind_tc,626c696e-645f-4746-932e-6b696361645f,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Profile,NP* 6 | %FSLAX46Y46*% 7 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 8 | G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-12-11 21:30:26* 9 | %MOMM*% 10 | %LPD*% 11 | G04 APERTURE LIST* 12 | %ADD10C,0.120000*% 13 | %ADD11C,0.050000*% 14 | G04 APERTURE END LIST* 15 | D10* 16 | X136118034Y-59000000D02* 17 | G75* 18 | G03X136118034Y-59000000I-1118034J0D01* 19 | G01* 20 | X71118034Y-88000000D02* 21 | G75* 22 | G03X71118034Y-88000000I-1118034J0D01* 23 | G01* 24 | X93118034Y-88000000D02* 25 | G75* 26 | G03X93118034Y-88000000I-1118034J0D01* 27 | G01* 28 | X115118034Y-88000000D02* 29 | G75* 30 | G03X115118034Y-88000000I-1118034J0D01* 31 | G01* 32 | X137118034Y-88000000D02* 33 | G75* 34 | G03X137118034Y-88000000I-1118034J0D01* 35 | G01* 36 | D11* 37 | X55000000Y-50000000D02* 38 | X151000000Y-50000000D01* 39 | X50000000Y-95000000D02* 40 | X50000000Y-55000000D01* 41 | X151000000Y-100000000D02* 42 | X55000000Y-100000000D01* 43 | X156000000Y-55000000D02* 44 | X156000000Y-95000000D01* 45 | X151000000Y-50000000D02* 46 | G75* 47 | G02X156000000Y-55000000I0J-5000000D01* 48 | G01* 49 | X156000000Y-95000000D02* 50 | G75* 51 | G02X151000000Y-100000000I-5000000J0D01* 52 | G01* 53 | X55000000Y-100000000D02* 54 | G75* 55 | G02X50000000Y-95000000I0J5000000D01* 56 | G01* 57 | X50000000Y-55000000D02* 58 | G75* 59 | G02X55000000Y-50000000I5000000J0D01* 60 | G01* 61 | M02* 62 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-F_Cu.gtl: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2* 2 | G04 #@! TF.CreationDate,2021-12-11T21:30:26+01:00* 3 | G04 #@! TF.ProjectId,blind_tc,626c696e-645f-4746-932e-6b696361645f,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Copper,L1,Top* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-12-11 21:30:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | %ADD10C,0.800000*% 14 | %ADD11C,6.400000*% 15 | G04 APERTURE END LIST* 16 | D10* 17 | X152697056Y-93302944D03* 18 | X151000000Y-92600000D03* 19 | X149302944Y-93302944D03* 20 | X148600000Y-95000000D03* 21 | X149302944Y-96697056D03* 22 | X151000000Y-97400000D03* 23 | X152697056Y-96697056D03* 24 | X153400000Y-95000000D03* 25 | D11* 26 | X151000000Y-95000000D03* 27 | D10* 28 | X152697056Y-53302944D03* 29 | X151000000Y-52600000D03* 30 | X149302944Y-53302944D03* 31 | X148600000Y-55000000D03* 32 | X149302944Y-56697056D03* 33 | X151000000Y-57400000D03* 34 | X152697056Y-56697056D03* 35 | X153400000Y-55000000D03* 36 | D11* 37 | X151000000Y-55000000D03* 38 | D10* 39 | X56697056Y-93302944D03* 40 | X55000000Y-92600000D03* 41 | X53302944Y-93302944D03* 42 | X52600000Y-95000000D03* 43 | X53302944Y-96697056D03* 44 | X55000000Y-97400000D03* 45 | X56697056Y-96697056D03* 46 | X57400000Y-95000000D03* 47 | D11* 48 | X55000000Y-95000000D03* 49 | D10* 50 | X56697056Y-53302944D03* 51 | X55000000Y-52600000D03* 52 | X53302944Y-53302944D03* 53 | X52600000Y-55000000D03* 54 | X53302944Y-56697056D03* 55 | X55000000Y-57400000D03* 56 | X56697056Y-56697056D03* 57 | X57400000Y-55000000D03* 58 | D11* 59 | X55000000Y-55000000D03* 60 | M02* 61 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-F_Mask.gts: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2* 2 | G04 #@! TF.CreationDate,2021-12-11T21:30:26+01:00* 3 | G04 #@! TF.ProjectId,blind_tc,626c696e-645f-4746-932e-6b696361645f,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Soldermask,Top* 6 | G04 #@! TF.FilePolarity,Negative* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-12-11 21:30:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | %ADD10C,0.100000*% 14 | G04 APERTURE END LIST* 15 | D10* 16 | G36* 17 | X55634239Y-91811467D02* 18 | G01* 19 | X55948282Y-91873934D01* 20 | X56539926Y-92119001D01* 21 | X57072392Y-92474784D01* 22 | X57525216Y-92927608D01* 23 | X57880999Y-93460074D01* 24 | X58126066Y-94051718D01* 25 | X58126066Y-94051719D01* 26 | X58251000Y-94679803D01* 27 | X58251000Y-95320197D01* 28 | X58188533Y-95634239D01* 29 | X58126066Y-95948282D01* 30 | X57880999Y-96539926D01* 31 | X57525216Y-97072392D01* 32 | X57072392Y-97525216D01* 33 | X56539926Y-97880999D01* 34 | X55948282Y-98126066D01* 35 | X55634239Y-98188533D01* 36 | X55320197Y-98251000D01* 37 | X54679803Y-98251000D01* 38 | X54365761Y-98188533D01* 39 | X54051718Y-98126066D01* 40 | X53460074Y-97880999D01* 41 | X52927608Y-97525216D01* 42 | X52474784Y-97072392D01* 43 | X52119001Y-96539926D01* 44 | X51873934Y-95948282D01* 45 | X51811467Y-95634239D01* 46 | X51749000Y-95320197D01* 47 | X51749000Y-94679803D01* 48 | X51873934Y-94051719D01* 49 | X51873934Y-94051718D01* 50 | X52119001Y-93460074D01* 51 | X52474784Y-92927608D01* 52 | X52927608Y-92474784D01* 53 | X53460074Y-92119001D01* 54 | X54051718Y-91873934D01* 55 | X54365761Y-91811467D01* 56 | X54679803Y-91749000D01* 57 | X55320197Y-91749000D01* 58 | X55634239Y-91811467D01* 59 | G37* 60 | G36* 61 | X151634239Y-91811467D02* 62 | G01* 63 | X151948282Y-91873934D01* 64 | X152539926Y-92119001D01* 65 | X153072392Y-92474784D01* 66 | X153525216Y-92927608D01* 67 | X153880999Y-93460074D01* 68 | X154126066Y-94051718D01* 69 | X154126066Y-94051719D01* 70 | X154251000Y-94679803D01* 71 | X154251000Y-95320197D01* 72 | X154188533Y-95634239D01* 73 | X154126066Y-95948282D01* 74 | X153880999Y-96539926D01* 75 | X153525216Y-97072392D01* 76 | X153072392Y-97525216D01* 77 | X152539926Y-97880999D01* 78 | X151948282Y-98126066D01* 79 | X151634239Y-98188533D01* 80 | X151320197Y-98251000D01* 81 | X150679803Y-98251000D01* 82 | X150365761Y-98188533D01* 83 | X150051718Y-98126066D01* 84 | X149460074Y-97880999D01* 85 | X148927608Y-97525216D01* 86 | X148474784Y-97072392D01* 87 | X148119001Y-96539926D01* 88 | X147873934Y-95948282D01* 89 | X147811467Y-95634239D01* 90 | X147749000Y-95320197D01* 91 | X147749000Y-94679803D01* 92 | X147873934Y-94051719D01* 93 | X147873934Y-94051718D01* 94 | X148119001Y-93460074D01* 95 | X148474784Y-92927608D01* 96 | X148927608Y-92474784D01* 97 | X149460074Y-92119001D01* 98 | X150051718Y-91873934D01* 99 | X150365761Y-91811467D01* 100 | X150679803Y-91749000D01* 101 | X151320197Y-91749000D01* 102 | X151634239Y-91811467D01* 103 | G37* 104 | G36* 105 | X55634239Y-51811467D02* 106 | G01* 107 | X55948282Y-51873934D01* 108 | X56539926Y-52119001D01* 109 | X57072392Y-52474784D01* 110 | X57525216Y-52927608D01* 111 | X57880999Y-53460074D01* 112 | X58126066Y-54051718D01* 113 | X58126066Y-54051719D01* 114 | X58251000Y-54679803D01* 115 | X58251000Y-55320197D01* 116 | X58188533Y-55634239D01* 117 | X58126066Y-55948282D01* 118 | X57880999Y-56539926D01* 119 | X57525216Y-57072392D01* 120 | X57072392Y-57525216D01* 121 | X56539926Y-57880999D01* 122 | X55948282Y-58126066D01* 123 | X55634239Y-58188533D01* 124 | X55320197Y-58251000D01* 125 | X54679803Y-58251000D01* 126 | X54365761Y-58188533D01* 127 | X54051718Y-58126066D01* 128 | X53460074Y-57880999D01* 129 | X52927608Y-57525216D01* 130 | X52474784Y-57072392D01* 131 | X52119001Y-56539926D01* 132 | X51873934Y-55948282D01* 133 | X51811467Y-55634239D01* 134 | X51749000Y-55320197D01* 135 | X51749000Y-54679803D01* 136 | X51873934Y-54051719D01* 137 | X51873934Y-54051718D01* 138 | X52119001Y-53460074D01* 139 | X52474784Y-52927608D01* 140 | X52927608Y-52474784D01* 141 | X53460074Y-52119001D01* 142 | X54051718Y-51873934D01* 143 | X54365761Y-51811467D01* 144 | X54679803Y-51749000D01* 145 | X55320197Y-51749000D01* 146 | X55634239Y-51811467D01* 147 | G37* 148 | G36* 149 | X151634239Y-51811467D02* 150 | G01* 151 | X151948282Y-51873934D01* 152 | X152539926Y-52119001D01* 153 | X153072392Y-52474784D01* 154 | X153525216Y-52927608D01* 155 | X153880999Y-53460074D01* 156 | X154126066Y-54051718D01* 157 | X154126066Y-54051719D01* 158 | X154251000Y-54679803D01* 159 | X154251000Y-55320197D01* 160 | X154188533Y-55634239D01* 161 | X154126066Y-55948282D01* 162 | X153880999Y-56539926D01* 163 | X153525216Y-57072392D01* 164 | X153072392Y-57525216D01* 165 | X152539926Y-57880999D01* 166 | X151948282Y-58126066D01* 167 | X151634239Y-58188533D01* 168 | X151320197Y-58251000D01* 169 | X150679803Y-58251000D01* 170 | X150365761Y-58188533D01* 171 | X150051718Y-58126066D01* 172 | X149460074Y-57880999D01* 173 | X148927608Y-57525216D01* 174 | X148474784Y-57072392D01* 175 | X148119001Y-56539926D01* 176 | X147873934Y-55948282D01* 177 | X147811467Y-55634239D01* 178 | X147749000Y-55320197D01* 179 | X147749000Y-54679803D01* 180 | X147873934Y-54051719D01* 181 | X147873934Y-54051718D01* 182 | X148119001Y-53460074D01* 183 | X148474784Y-52927608D01* 184 | X148927608Y-52474784D01* 185 | X149460074Y-52119001D01* 186 | X150051718Y-51873934D01* 187 | X150365761Y-51811467D01* 188 | X150679803Y-51749000D01* 189 | X151320197Y-51749000D01* 190 | X151634239Y-51811467D01* 191 | G37* 192 | M02* 193 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-F_Paste.gtp: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.5+dfsg1-2build2* 2 | G04 #@! TF.CreationDate,2021-12-11T21:30:26+01:00* 3 | G04 #@! TF.ProjectId,blind_tc,626c696e-645f-4746-932e-6b696361645f,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Paste,Top* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 5.1.5+dfsg1-2build2) date 2021-12-11 21:30:26* 10 | %MOMM*% 11 | %LPD*% 12 | G04 APERTURE LIST* 13 | G04 APERTURE END LIST* 14 | M02* 15 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ; DRILL file {KiCad 5.1.5+dfsg1-2build2} date Sat 11 Dec 2021 09:30:27 PM CET 3 | ; FORMAT={-:-/ absolute / inch / decimal} 4 | ; #@! TF.CreationDate,2021-12-11T21:30:27+01:00 5 | ; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.5+dfsg1-2build2 6 | ; #@! TF.FileFunction,NonPlated,1,2,NPTH 7 | FMAT,2 8 | INCH 9 | % 10 | G90 11 | G05 12 | T0 13 | M30 14 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-PTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ; DRILL file {KiCad 5.1.5+dfsg1-2build2} date Sat 11 Dec 2021 09:30:27 PM CET 3 | ; FORMAT={-:-/ absolute / inch / decimal} 4 | ; #@! TF.CreationDate,2021-12-11T21:30:27+01:00 5 | ; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.5+dfsg1-2build2 6 | ; #@! TF.FileFunction,Plated,1,2,PTH 7 | FMAT,2 8 | INCH 9 | T1C0.0197 10 | T2C0.1260 11 | % 12 | G90 13 | G05 14 | T1 15 | X2.0709Y-2.1654 16 | X5.9449Y-2.2598 17 | X5.8504Y-3.7402 18 | X5.8781Y-3.6733 19 | X5.8781Y-3.807 20 | X5.9449Y-3.6457 21 | X5.9449Y-3.8346 22 | X6.0117Y-3.6733 23 | X6.0117Y-3.807 24 | X6.0394Y-3.7402 25 | X2.0709Y-3.7402 26 | X2.0985Y-3.6733 27 | X2.0985Y-3.807 28 | X2.1654Y-3.6457 29 | X2.1654Y-3.8346 30 | X2.2322Y-3.6733 31 | X2.2322Y-3.807 32 | X2.2598Y-3.7402 33 | X2.0985Y-2.0985 34 | X2.0985Y-2.2322 35 | X2.1654Y-2.0709 36 | X2.1654Y-2.2598 37 | X2.2322Y-2.0985 38 | X2.2322Y-2.2322 39 | X2.2598Y-2.1654 40 | X5.8504Y-2.1654 41 | X5.8781Y-2.0985 42 | X5.8781Y-2.2322 43 | X5.9449Y-2.0709 44 | X6.0117Y-2.0985 45 | X6.0117Y-2.2322 46 | X6.0394Y-2.1654 47 | T2 48 | X5.9449Y-3.7402 49 | X2.1654Y-3.7402 50 | X2.1654Y-2.1654 51 | X5.9449Y-2.1654 52 | T0 53 | M30 54 | -------------------------------------------------------------------------------- /blind_tc/gerber/blind_tc-v1.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/blind_tc/gerber/blind_tc-v1.1.zip -------------------------------------------------------------------------------- /blind_tc/outfiles/text2807.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/blind_tc/outfiles/text2807.png -------------------------------------------------------------------------------- /blind_tc/outfiles/text3608.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/blind_tc/outfiles/text3608.png -------------------------------------------------------------------------------- /firmware/.mxproject: -------------------------------------------------------------------------------- 1 | [PreviousGenFiles] 2 | AdvancedFolderStructure=true 3 | HeaderFileListSize=3 4 | HeaderFiles#0=/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Inc/stm32f0xx_it.h 5 | HeaderFiles#1=/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Inc/stm32f0xx_hal_conf.h 6 | HeaderFiles#2=/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Inc/main.h 7 | HeaderFolderListSize=1 8 | HeaderPath#0=/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Inc 9 | HeaderFiles=; 10 | SourceFileListSize=3 11 | SourceFiles#0=/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Src/stm32f0xx_it.c 12 | SourceFiles#1=/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Src/stm32f0xx_hal_msp.c 13 | SourceFiles#2=/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Src/main.c 14 | SourceFolderListSize=1 15 | SourcePath#0=/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Src 16 | SourceFiles=; 17 | 18 | [PreviousLibFiles] 19 | LibFiles=Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_adc.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_adc_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h;Drivers/STM32F0xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_exti.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pcd.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pcd_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_usb.h;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usb.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd_ex.c;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_adc.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_adc_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h;Drivers/STM32F0xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_exti.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pcd.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pcd_ex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_usb.h;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usb.c;Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h;Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h;Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h;Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/cmsis_compiler.h; 20 | 21 | [PreviousUsedMakefileFiles] 22 | SourceFiles=Core/Src/main.c;Core/Src/stm32f0xx_it.c;Core/Src/stm32f0xx_hal_msp.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usb.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd_ex.c;Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;Core/Src/system_stm32f0xx.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usb.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd_ex.c;Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;Core/Src/system_stm32f0xx.c;;; 23 | HeaderPath=Drivers/STM32F0xx_HAL_Driver/Inc;Drivers/STM32F0xx_HAL_Driver/Inc/Legacy;Drivers/CMSIS/Device/ST/STM32F0xx/Include;Drivers/CMSIS/Include;Core/Inc; 24 | CDefines=USE_HAL_DRIVER;STM32F072xB;USE_HAL_DRIVER;USE_HAL_DRIVER; 25 | 26 | -------------------------------------------------------------------------------- /firmware/Core/Inc/led.h: -------------------------------------------------------------------------------- 1 | #ifndef LED_H 2 | #define LED_H 3 | 4 | #include "main.h" 5 | 6 | enum Led { 7 | LED0 = LED0_Pin, 8 | LED1 = LED1_Pin, 9 | LED2 = LED2_Pin, 10 | LED3 = LED3_Pin, 11 | STATUS = LED_STATUS_Pin, 12 | }; 13 | 14 | enum LedState { 15 | STATE_OFF = -1, 16 | STATE_RED = GPIO_PIN_RESET, 17 | STATE_GREEN = GPIO_PIN_SET, 18 | }; 19 | 20 | extern void led_set(enum Led, enum LedState); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /firmware/Core/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2021 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under BSD 3-Clause license, 14 | * the "License"; You may not use this file except in compliance with the 15 | * License. You may obtain a copy of the License at: 16 | * opensource.org/licenses/BSD-3-Clause 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __MAIN_H 24 | #define __MAIN_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f0xx_hal.h" 32 | 33 | /* Private includes ----------------------------------------------------------*/ 34 | /* USER CODE BEGIN Includes */ 35 | 36 | /* USER CODE END Includes */ 37 | 38 | /* Exported types ------------------------------------------------------------*/ 39 | /* USER CODE BEGIN ET */ 40 | 41 | /* USER CODE END ET */ 42 | 43 | /* Exported constants --------------------------------------------------------*/ 44 | /* USER CODE BEGIN EC */ 45 | 46 | /* USER CODE END EC */ 47 | 48 | /* Exported macro ------------------------------------------------------------*/ 49 | /* USER CODE BEGIN EM */ 50 | 51 | /* USER CODE END EM */ 52 | 53 | /* Exported functions prototypes ---------------------------------------------*/ 54 | void Error_Handler(void); 55 | 56 | /* USER CODE BEGIN EFP */ 57 | 58 | /* USER CODE END EFP */ 59 | 60 | /* Private defines -----------------------------------------------------------*/ 61 | #define LED3_Pin GPIO_PIN_13 62 | #define LED3_GPIO_Port GPIOC 63 | #define LED2_Pin GPIO_PIN_14 64 | #define LED2_GPIO_Port GPIOC 65 | #define LED1_Pin GPIO_PIN_15 66 | #define LED1_GPIO_Port GPIOC 67 | #define LED0_Pin GPIO_PIN_0 68 | #define LED0_GPIO_Port GPIOF 69 | #define NSS3_Pin GPIO_PIN_0 70 | #define NSS3_GPIO_Port GPIOA 71 | #define NTC3_Pin GPIO_PIN_1 72 | #define NTC3_GPIO_Port GPIOA 73 | #define NSS2_Pin GPIO_PIN_2 74 | #define NSS2_GPIO_Port GPIOA 75 | #define NTC2_Pin GPIO_PIN_3 76 | #define NTC2_GPIO_Port GPIOA 77 | #define NSS1_Pin GPIO_PIN_4 78 | #define NSS1_GPIO_Port GPIOA 79 | #define NTC1_Pin GPIO_PIN_5 80 | #define NTC1_GPIO_Port GPIOA 81 | #define NSS0_Pin GPIO_PIN_6 82 | #define NSS0_GPIO_Port GPIOA 83 | #define NTC0_Pin GPIO_PIN_7 84 | #define NTC0_GPIO_Port GPIOA 85 | #define NTC_BOARD_Pin GPIO_PIN_0 86 | #define NTC_BOARD_GPIO_Port GPIOB 87 | #define LED_STATUS_Pin GPIO_PIN_9 88 | #define LED_STATUS_GPIO_Port GPIOA 89 | #define SW_SCPI_CSV_Pin GPIO_PIN_10 90 | #define SW_SCPI_CSV_GPIO_Port GPIOA 91 | #define OUT_nSLEEP_Pin GPIO_PIN_15 92 | #define OUT_nSLEEP_GPIO_Port GPIOA 93 | #define OUT0_Pin GPIO_PIN_5 94 | #define OUT0_GPIO_Port GPIOB 95 | #define OUT1_Pin GPIO_PIN_6 96 | #define OUT1_GPIO_Port GPIOB 97 | #define OUT2_Pin GPIO_PIN_7 98 | #define OUT2_GPIO_Port GPIOB 99 | /* USER CODE BEGIN Private defines */ 100 | 101 | /* USER CODE END Private defines */ 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif /* __MAIN_H */ 108 | 109 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 110 | -------------------------------------------------------------------------------- /firmware/Core/Inc/stm32f0xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f0xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F0xx_IT_H 23 | #define __STM32F0xx_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Private includes ----------------------------------------------------------*/ 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | /* USER CODE BEGIN ET */ 36 | 37 | /* USER CODE END ET */ 38 | 39 | /* Exported constants --------------------------------------------------------*/ 40 | /* USER CODE BEGIN EC */ 41 | 42 | /* USER CODE END EC */ 43 | 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* USER CODE BEGIN EM */ 46 | 47 | /* USER CODE END EM */ 48 | 49 | /* Exported functions prototypes ---------------------------------------------*/ 50 | void NMI_Handler(void); 51 | void HardFault_Handler(void); 52 | void SVC_Handler(void); 53 | void PendSV_Handler(void); 54 | void SysTick_Handler(void); 55 | void DMA1_Channel1_IRQHandler(void); 56 | void DMA1_Channel2_3_IRQHandler(void); 57 | void DMA1_Channel4_5_6_7_IRQHandler(void); 58 | void TIM1_BRK_UP_TRG_COM_IRQHandler(void); 59 | void TIM1_CC_IRQHandler(void); 60 | void TIM2_IRQHandler(void); 61 | void USB_IRQHandler(void); 62 | /* USER CODE BEGIN EFP */ 63 | 64 | /* USER CODE END EFP */ 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif /* __STM32F0xx_IT_H */ 71 | 72 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 73 | -------------------------------------------------------------------------------- /firmware/Core/Src/led.c: -------------------------------------------------------------------------------- 1 | #include "led.h" 2 | 3 | void led_set(enum Led led, enum LedState state) { 4 | GPIO_TypeDef * port; 5 | switch (led) { 6 | case LED1: 7 | case LED2: 8 | case LED3: 9 | port = GPIOC; 10 | break; 11 | 12 | case LED0: 13 | port = GPIOF; 14 | break; 15 | 16 | 17 | case STATUS: 18 | default: 19 | port = GPIOA; 20 | break; 21 | } 22 | 23 | GPIO_InitTypeDef GPIO_InitStruct = {0}; 24 | GPIO_InitStruct.Pin = led; 25 | GPIO_InitStruct.Pull = GPIO_NOPULL; 26 | switch (state) { 27 | case STATE_OFF: 28 | GPIO_InitStruct.Mode = GPIO_MODE_INPUT; 29 | break; 30 | default: 31 | GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 32 | GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 33 | HAL_GPIO_WritePin(port, led, state); 34 | break; 35 | } 36 | HAL_GPIO_Init(port, &GPIO_InitStruct); 37 | } 38 | -------------------------------------------------------------------------------- /firmware/Core/Src/stm32f0xx_it.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f0xx_it.c 5 | * @brief Interrupt Service Routines. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Includes ------------------------------------------------------------------*/ 22 | #include "main.h" 23 | #include "stm32f0xx_it.h" 24 | /* Private includes ----------------------------------------------------------*/ 25 | /* USER CODE BEGIN Includes */ 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN PD */ 35 | 36 | /* USER CODE END PD */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN PM */ 40 | 41 | /* USER CODE END PM */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* Private user code ---------------------------------------------------------*/ 54 | /* USER CODE BEGIN 0 */ 55 | 56 | /* USER CODE END 0 */ 57 | 58 | /* External variables --------------------------------------------------------*/ 59 | extern PCD_HandleTypeDef hpcd_USB_FS; 60 | extern DMA_HandleTypeDef hdma_adc; 61 | extern DMA_HandleTypeDef hdma_i2c1_rx; 62 | extern DMA_HandleTypeDef hdma_i2c1_tx; 63 | extern DMA_HandleTypeDef hdma_spi1_rx; 64 | extern TIM_HandleTypeDef htim1; 65 | extern TIM_HandleTypeDef htim2; 66 | extern void temp_timer(void); 67 | /* USER CODE BEGIN EV */ 68 | 69 | /* USER CODE END EV */ 70 | 71 | /******************************************************************************/ 72 | /* Cortex-M0 Processor Interruption and Exception Handlers */ 73 | /******************************************************************************/ 74 | /** 75 | * @brief This function handles Non maskable interrupt. 76 | */ 77 | void NMI_Handler(void) 78 | { 79 | /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ 80 | 81 | /* USER CODE END NonMaskableInt_IRQn 0 */ 82 | /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ 83 | while (1) 84 | { 85 | } 86 | /* USER CODE END NonMaskableInt_IRQn 1 */ 87 | } 88 | 89 | /** 90 | * @brief This function handles Hard fault interrupt. 91 | */ 92 | void HardFault_Handler(void) 93 | { 94 | /* USER CODE BEGIN HardFault_IRQn 0 */ 95 | 96 | /* USER CODE END HardFault_IRQn 0 */ 97 | while (1) 98 | { 99 | /* USER CODE BEGIN W1_HardFault_IRQn 0 */ 100 | /* USER CODE END W1_HardFault_IRQn 0 */ 101 | } 102 | } 103 | 104 | /** 105 | * @brief This function handles System service call via SWI instruction. 106 | */ 107 | void SVC_Handler(void) 108 | { 109 | /* USER CODE BEGIN SVC_IRQn 0 */ 110 | 111 | /* USER CODE END SVC_IRQn 0 */ 112 | /* USER CODE BEGIN SVC_IRQn 1 */ 113 | 114 | /* USER CODE END SVC_IRQn 1 */ 115 | } 116 | 117 | /** 118 | * @brief This function handles Pendable request for system service. 119 | */ 120 | void PendSV_Handler(void) 121 | { 122 | /* USER CODE BEGIN PendSV_IRQn 0 */ 123 | 124 | /* USER CODE END PendSV_IRQn 0 */ 125 | /* USER CODE BEGIN PendSV_IRQn 1 */ 126 | 127 | /* USER CODE END PendSV_IRQn 1 */ 128 | } 129 | 130 | /** 131 | * @brief This function handles System tick timer. 132 | */ 133 | void SysTick_Handler(void) 134 | { 135 | /* USER CODE BEGIN SysTick_IRQn 0 */ 136 | 137 | /* USER CODE END SysTick_IRQn 0 */ 138 | HAL_IncTick(); 139 | /* USER CODE BEGIN SysTick_IRQn 1 */ 140 | 141 | /* USER CODE END SysTick_IRQn 1 */ 142 | } 143 | 144 | /******************************************************************************/ 145 | /* STM32F0xx Peripheral Interrupt Handlers */ 146 | /* Add here the Interrupt Handlers for the used peripherals. */ 147 | /* For the available peripheral interrupt handler names, */ 148 | /* please refer to the startup file (startup_stm32f0xx.s). */ 149 | /******************************************************************************/ 150 | 151 | /** 152 | * @brief This function handles DMA1 channel 1 global interrupt. 153 | */ 154 | void DMA1_Channel1_IRQHandler(void) 155 | { 156 | /* USER CODE BEGIN DMA1_Channel1_IRQn 0 */ 157 | 158 | /* USER CODE END DMA1_Channel1_IRQn 0 */ 159 | HAL_DMA_IRQHandler(&hdma_adc); 160 | /* USER CODE BEGIN DMA1_Channel1_IRQn 1 */ 161 | 162 | /* USER CODE END DMA1_Channel1_IRQn 1 */ 163 | } 164 | 165 | /** 166 | * @brief This function handles DMA1 channel 2 and 3 interrupts. 167 | */ 168 | void DMA1_Channel2_3_IRQHandler(void) 169 | { 170 | /* USER CODE BEGIN DMA1_Channel2_3_IRQn 0 */ 171 | 172 | /* USER CODE END DMA1_Channel2_3_IRQn 0 */ 173 | HAL_DMA_IRQHandler(&hdma_spi1_rx); 174 | /* USER CODE BEGIN DMA1_Channel2_3_IRQn 1 */ 175 | 176 | /* USER CODE END DMA1_Channel2_3_IRQn 1 */ 177 | } 178 | 179 | /** 180 | * @brief This function handles DMA1 channel 4, 5, 6 and 7 interrupts. 181 | */ 182 | void DMA1_Channel4_5_6_7_IRQHandler(void) 183 | { 184 | /* USER CODE BEGIN DMA1_Channel4_5_6_7_IRQn 0 */ 185 | 186 | /* USER CODE END DMA1_Channel4_5_6_7_IRQn 0 */ 187 | HAL_DMA_IRQHandler(&hdma_i2c1_tx); 188 | HAL_DMA_IRQHandler(&hdma_i2c1_rx); 189 | /* USER CODE BEGIN DMA1_Channel4_5_6_7_IRQn 1 */ 190 | 191 | /* USER CODE END DMA1_Channel4_5_6_7_IRQn 1 */ 192 | } 193 | 194 | /** 195 | * @brief This function handles TIM1 break, update, trigger and commutation interrupts. 196 | */ 197 | void TIM1_BRK_UP_TRG_COM_IRQHandler(void) 198 | { 199 | /* USER CODE BEGIN TIM1_BRK_UP_TRG_COM_IRQn 0 */ 200 | 201 | /* USER CODE END TIM1_BRK_UP_TRG_COM_IRQn 0 */ 202 | HAL_TIM_IRQHandler(&htim1); 203 | /* USER CODE BEGIN TIM1_BRK_UP_TRG_COM_IRQn 1 */ 204 | 205 | /* USER CODE END TIM1_BRK_UP_TRG_COM_IRQn 1 */ 206 | } 207 | 208 | /** 209 | * @brief This function handles TIM1 capture compare interrupt. 210 | */ 211 | void TIM1_CC_IRQHandler(void) 212 | { 213 | /* USER CODE BEGIN TIM1_CC_IRQn 0 */ 214 | 215 | /* USER CODE END TIM1_CC_IRQn 0 */ 216 | HAL_TIM_IRQHandler(&htim1); 217 | /* USER CODE BEGIN TIM1_CC_IRQn 1 */ 218 | 219 | /* USER CODE END TIM1_CC_IRQn 1 */ 220 | } 221 | 222 | /** 223 | * @brief This function handles TIM2 global interrupt. 224 | */ 225 | void TIM2_IRQHandler(void) 226 | { 227 | /* USER CODE BEGIN TIM2_IRQn 0 */ 228 | 229 | /* USER CODE END TIM2_IRQn 0 */ 230 | HAL_TIM_IRQHandler(&htim2); 231 | /* USER CODE BEGIN TIM2_IRQn 1 */ 232 | temp_timer(); 233 | /* USER CODE END TIM2_IRQn 1 */ 234 | } 235 | 236 | /** 237 | * @brief This function handles USB global interrupt / USB wake-up interrupt through EXTI line 18. 238 | */ 239 | void USB_IRQHandler(void) 240 | { 241 | /* USER CODE BEGIN USB_IRQn 0 */ 242 | 243 | /* USER CODE END USB_IRQn 0 */ 244 | HAL_PCD_IRQHandler(&hpcd_USB_FS); 245 | /* USER CODE BEGIN USB_IRQn 1 */ 246 | 247 | /* USER CODE END USB_IRQn 1 */ 248 | } 249 | 250 | /* USER CODE BEGIN 1 */ 251 | 252 | /* USER CODE END 1 */ 253 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 254 | -------------------------------------------------------------------------------- /firmware/Core/Src/system_stm32f0xx.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f0xx.c 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M0 Device Peripheral Access Layer System Source File. 6 | * 7 | * 1. This file provides two functions and one global variable to be called from 8 | * user application: 9 | * - SystemInit(): This function is called at startup just after reset and 10 | * before branch to main program. This call is made inside 11 | * the "startup_stm32f0xx.s" file. 12 | * 13 | * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used 14 | * by the user application to setup the SysTick 15 | * timer or configure other parameters. 16 | * 17 | * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must 18 | * be called whenever the core clock is changed 19 | * during program execution. 20 | * 21 | * 22 | ****************************************************************************** 23 | * @attention 24 | * 25 | *

© Copyright (c) 2016 STMicroelectronics. 26 | * All rights reserved.

27 | * 28 | * This software component is licensed by ST under BSD 3-Clause license, 29 | * the "License"; You may not use this file except in compliance with the 30 | * License. You may obtain a copy of the License at: 31 | * opensource.org/licenses/BSD-3-Clause 32 | * 33 | ****************************************************************************** 34 | */ 35 | 36 | /** @addtogroup CMSIS 37 | * @{ 38 | */ 39 | 40 | /** @addtogroup stm32f0xx_system 41 | * @{ 42 | */ 43 | 44 | /** @addtogroup STM32F0xx_System_Private_Includes 45 | * @{ 46 | */ 47 | 48 | #include "stm32f0xx.h" 49 | 50 | /** 51 | * @} 52 | */ 53 | 54 | /** @addtogroup STM32F0xx_System_Private_TypesDefinitions 55 | * @{ 56 | */ 57 | 58 | /** 59 | * @} 60 | */ 61 | 62 | /** @addtogroup STM32F0xx_System_Private_Defines 63 | * @{ 64 | */ 65 | #if !defined (HSE_VALUE) 66 | #define HSE_VALUE ((uint32_t)8000000) /*!< Default value of the External oscillator in Hz. 67 | This value can be provided and adapted by the user application. */ 68 | #endif /* HSE_VALUE */ 69 | 70 | #if !defined (HSI_VALUE) 71 | #define HSI_VALUE ((uint32_t)8000000) /*!< Default value of the Internal oscillator in Hz. 72 | This value can be provided and adapted by the user application. */ 73 | #endif /* HSI_VALUE */ 74 | 75 | #if !defined (HSI48_VALUE) 76 | #define HSI48_VALUE ((uint32_t)48000000) /*!< Default value of the HSI48 Internal oscillator in Hz. 77 | This value can be provided and adapted by the user application. */ 78 | #endif /* HSI48_VALUE */ 79 | /** 80 | * @} 81 | */ 82 | 83 | /** @addtogroup STM32F0xx_System_Private_Macros 84 | * @{ 85 | */ 86 | 87 | /** 88 | * @} 89 | */ 90 | 91 | /** @addtogroup STM32F0xx_System_Private_Variables 92 | * @{ 93 | */ 94 | /* This variable is updated in three ways: 95 | 1) by calling CMSIS function SystemCoreClockUpdate() 96 | 2) by calling HAL API function HAL_RCC_GetHCLKFreq() 97 | 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency 98 | Note: If you use this function to configure the system clock; then there 99 | is no need to call the 2 first functions listed above, since SystemCoreClock 100 | variable is updated automatically. 101 | */ 102 | uint32_t SystemCoreClock = 8000000; 103 | 104 | const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; 105 | const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /** @addtogroup STM32F0xx_System_Private_FunctionPrototypes 112 | * @{ 113 | */ 114 | 115 | /** 116 | * @} 117 | */ 118 | 119 | /** @addtogroup STM32F0xx_System_Private_Functions 120 | * @{ 121 | */ 122 | 123 | /** 124 | * @brief Setup the microcontroller system 125 | * @param None 126 | * @retval None 127 | */ 128 | void SystemInit(void) 129 | { 130 | /* NOTE :SystemInit(): This function is called at startup just after reset and 131 | before branch to main program. This call is made inside 132 | the "startup_stm32f0xx.s" file. 133 | User can setups the default system clock (System clock source, PLL Multiplier 134 | and Divider factors, AHB/APBx prescalers and Flash settings). 135 | */ 136 | } 137 | 138 | /** 139 | * @brief Update SystemCoreClock variable according to Clock Register Values. 140 | * The SystemCoreClock variable contains the core clock (HCLK), it can 141 | * be used by the user application to setup the SysTick timer or configure 142 | * other parameters. 143 | * 144 | * @note Each time the core clock (HCLK) changes, this function must be called 145 | * to update SystemCoreClock variable value. Otherwise, any configuration 146 | * based on this variable will be incorrect. 147 | * 148 | * @note - The system frequency computed by this function is not the real 149 | * frequency in the chip. It is calculated based on the predefined 150 | * constant and the selected clock source: 151 | * 152 | * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) 153 | * 154 | * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) 155 | * 156 | * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) 157 | * or HSI_VALUE(*) multiplied/divided by the PLL factors. 158 | * 159 | * (*) HSI_VALUE is a constant defined in stm32f0xx_hal_conf.h file (default value 160 | * 8 MHz) but the real value may vary depending on the variations 161 | * in voltage and temperature. 162 | * 163 | * (**) HSE_VALUE is a constant defined in stm32f0xx_hal_conf.h file (its value 164 | * depends on the application requirements), user has to ensure that HSE_VALUE 165 | * is same as the real frequency of the crystal used. Otherwise, this function 166 | * may have wrong result. 167 | * 168 | * - The result of this function could be not correct when using fractional 169 | * value for HSE crystal. 170 | * 171 | * @param None 172 | * @retval None 173 | */ 174 | void SystemCoreClockUpdate (void) 175 | { 176 | uint32_t tmp = 0, pllmull = 0, pllsource = 0, predivfactor = 0; 177 | 178 | /* Get SYSCLK source -------------------------------------------------------*/ 179 | tmp = RCC->CFGR & RCC_CFGR_SWS; 180 | 181 | switch (tmp) 182 | { 183 | case RCC_CFGR_SWS_HSI: /* HSI used as system clock */ 184 | SystemCoreClock = HSI_VALUE; 185 | break; 186 | case RCC_CFGR_SWS_HSE: /* HSE used as system clock */ 187 | SystemCoreClock = HSE_VALUE; 188 | break; 189 | case RCC_CFGR_SWS_PLL: /* PLL used as system clock */ 190 | /* Get PLL clock source and multiplication factor ----------------------*/ 191 | pllmull = RCC->CFGR & RCC_CFGR_PLLMUL; 192 | pllsource = RCC->CFGR & RCC_CFGR_PLLSRC; 193 | pllmull = ( pllmull >> 18) + 2; 194 | predivfactor = (RCC->CFGR2 & RCC_CFGR2_PREDIV) + 1; 195 | 196 | if (pllsource == RCC_CFGR_PLLSRC_HSE_PREDIV) 197 | { 198 | /* HSE used as PLL clock source : SystemCoreClock = HSE/PREDIV * PLLMUL */ 199 | SystemCoreClock = (HSE_VALUE/predivfactor) * pllmull; 200 | } 201 | #if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F091xC) || defined(STM32F098xx) 202 | else if (pllsource == RCC_CFGR_PLLSRC_HSI48_PREDIV) 203 | { 204 | /* HSI48 used as PLL clock source : SystemCoreClock = HSI48/PREDIV * PLLMUL */ 205 | SystemCoreClock = (HSI48_VALUE/predivfactor) * pllmull; 206 | } 207 | #endif /* STM32F042x6 || STM32F048xx || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx */ 208 | else 209 | { 210 | #if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F070x6) \ 211 | || defined(STM32F078xx) || defined(STM32F071xB) || defined(STM32F072xB) \ 212 | || defined(STM32F070xB) || defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC) 213 | /* HSI used as PLL clock source : SystemCoreClock = HSI/PREDIV * PLLMUL */ 214 | SystemCoreClock = (HSI_VALUE/predivfactor) * pllmull; 215 | #else 216 | /* HSI used as PLL clock source : SystemCoreClock = HSI/2 * PLLMUL */ 217 | SystemCoreClock = (HSI_VALUE >> 1) * pllmull; 218 | #endif /* STM32F042x6 || STM32F048xx || STM32F070x6 || 219 | STM32F071xB || STM32F072xB || STM32F078xx || STM32F070xB || 220 | STM32F091xC || STM32F098xx || STM32F030xC */ 221 | } 222 | break; 223 | default: /* HSI used as system clock */ 224 | SystemCoreClock = HSI_VALUE; 225 | break; 226 | } 227 | /* Compute HCLK clock frequency ----------------*/ 228 | /* Get HCLK prescaler */ 229 | tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; 230 | /* HCLK clock frequency */ 231 | SystemCoreClock >>= tmp; 232 | } 233 | 234 | /** 235 | * @} 236 | */ 237 | 238 | /** 239 | * @} 240 | */ 241 | 242 | /** 243 | * @} 244 | */ 245 | 246 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 247 | 248 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f0xx.h 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M0 Device System Source File for STM32F0xx devices. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /** @addtogroup CMSIS 21 | * @{ 22 | */ 23 | 24 | /** @addtogroup stm32f0xx_system 25 | * @{ 26 | */ 27 | 28 | /** 29 | * @brief Define to prevent recursive inclusion 30 | */ 31 | #ifndef __SYSTEM_STM32F0XX_H 32 | #define __SYSTEM_STM32F0XX_H 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @addtogroup STM32F0xx_System_Includes 39 | * @{ 40 | */ 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | 47 | /** @addtogroup STM32F0xx_System_Exported_types 48 | * @{ 49 | */ 50 | /* This variable is updated in three ways: 51 | 1) by calling CMSIS function SystemCoreClockUpdate() 52 | 3) by calling HAL API function HAL_RCC_GetHCLKFreq() 53 | 3) by calling HAL API function HAL_RCC_ClockConfig() 54 | Note: If you use this function to configure the system clock; then there 55 | is no need to call the 2 first functions listed above, since SystemCoreClock 56 | variable is updated automatically. 57 | */ 58 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 59 | extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */ 60 | extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */ 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @addtogroup STM32F0xx_System_Exported_Constants 67 | * @{ 68 | */ 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** @addtogroup STM32F0xx_System_Exported_Macros 75 | * @{ 76 | */ 77 | 78 | /** 79 | * @} 80 | */ 81 | 82 | /** @addtogroup STM32F0xx_System_Exported_Functions 83 | * @{ 84 | */ 85 | 86 | extern void SystemInit(void); 87 | extern void SystemCoreClockUpdate(void); 88 | /** 89 | * @} 90 | */ 91 | 92 | #ifdef __cplusplus 93 | } 94 | #endif 95 | 96 | #endif /*__SYSTEM_STM32F0XX_H */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /** 103 | * @} 104 | */ 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /firmware/Drivers/CMSIS/Include/tz_context.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * @file tz_context.h 3 | * @brief Context Management for Armv8-M TrustZone 4 | * @version V1.0.1 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef TZ_CONTEXT_H 32 | #define TZ_CONTEXT_H 33 | 34 | #include 35 | 36 | #ifndef TZ_MODULEID_T 37 | #define TZ_MODULEID_T 38 | /// \details Data type that identifies secure software modules called by a process. 39 | typedef uint32_t TZ_ModuleId_t; 40 | #endif 41 | 42 | /// \details TZ Memory ID identifies an allocated memory slot. 43 | typedef uint32_t TZ_MemoryId_t; 44 | 45 | /// Initialize secure context memory system 46 | /// \return execution status (1: success, 0: error) 47 | uint32_t TZ_InitContextSystem_S (void); 48 | 49 | /// Allocate context memory for calling secure software modules in TrustZone 50 | /// \param[in] module identifies software modules called from non-secure mode 51 | /// \return value != 0 id TrustZone memory slot identifier 52 | /// \return value 0 no memory available or internal error 53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); 54 | 55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S 56 | /// \param[in] id TrustZone memory slot identifier 57 | /// \return execution status (1: success, 0: error) 58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); 59 | 60 | /// Load secure context (called on RTOS thread context switch) 61 | /// \param[in] id TrustZone memory slot identifier 62 | /// \return execution status (1: success, 0: error) 63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); 64 | 65 | /// Store secure context (called on RTOS thread context switch) 66 | /// \param[in] id TrustZone memory slot identifier 67 | /// \return execution status (1: success, 0: error) 68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); 69 | 70 | #endif // TZ_CONTEXT_H 71 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_hal_cortex.h 4 | * @author MCD Application Team 5 | * @brief Header file of CORTEX HAL module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32F0xx_HAL_CORTEX_H 22 | #define __STM32F0xx_HAL_CORTEX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f0xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F0xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup CORTEX CORTEX 36 | * @{ 37 | */ 38 | /* Exported types ------------------------------------------------------------*/ 39 | /* Exported constants --------------------------------------------------------*/ 40 | 41 | /** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants 42 | * @{ 43 | */ 44 | 45 | /** @defgroup CORTEX_SysTick_clock_source CORTEX SysTick clock source 46 | * @{ 47 | */ 48 | #define SYSTICK_CLKSOURCE_HCLK_DIV8 (0x00000000U) 49 | #define SYSTICK_CLKSOURCE_HCLK (0x00000004U) 50 | 51 | /** 52 | * @} 53 | */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /* Exported Macros -----------------------------------------------------------*/ 60 | 61 | /* Exported functions --------------------------------------------------------*/ 62 | /** @addtogroup CORTEX_Exported_Functions CORTEX Exported Functions 63 | * @{ 64 | */ 65 | /** @addtogroup CORTEX_Exported_Functions_Group1 Initialization and de-initialization functions 66 | * @brief Initialization and Configuration functions 67 | * @{ 68 | */ 69 | /* Initialization and de-initialization functions *******************************/ 70 | void HAL_NVIC_SetPriority(IRQn_Type IRQn,uint32_t PreemptPriority, uint32_t SubPriority); 71 | void HAL_NVIC_EnableIRQ(IRQn_Type IRQn); 72 | void HAL_NVIC_DisableIRQ(IRQn_Type IRQn); 73 | void HAL_NVIC_SystemReset(void); 74 | uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb); 75 | /** 76 | * @} 77 | */ 78 | 79 | /** @addtogroup CORTEX_Exported_Functions_Group2 Peripheral Control functions 80 | * @brief Cortex control functions 81 | * @{ 82 | */ 83 | 84 | /* Peripheral Control functions *************************************************/ 85 | uint32_t HAL_NVIC_GetPriority(IRQn_Type IRQn); 86 | uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn); 87 | void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn); 88 | void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn); 89 | void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource); 90 | void HAL_SYSTICK_IRQHandler(void); 91 | void HAL_SYSTICK_Callback(void); 92 | /** 93 | * @} 94 | */ 95 | 96 | /** 97 | * @} 98 | */ 99 | 100 | /* Private types -------------------------------------------------------------*/ 101 | /* Private variables ---------------------------------------------------------*/ 102 | /* Private constants ---------------------------------------------------------*/ 103 | /* Private macros ------------------------------------------------------------*/ 104 | /** @defgroup CORTEX_Private_Macros CORTEX Private Macros 105 | * @{ 106 | */ 107 | #define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x4) 108 | 109 | #define IS_NVIC_DEVICE_IRQ(IRQ) ((IRQ) >= 0x00) 110 | 111 | #define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \ 112 | ((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8)) 113 | /** 114 | * @} 115 | */ 116 | 117 | /** 118 | * @} 119 | */ 120 | 121 | /** 122 | * @} 123 | */ 124 | 125 | #ifdef __cplusplus 126 | } 127 | #endif 128 | 129 | #endif /* __STM32F0xx_HAL_CORTEX_H */ 130 | 131 | 132 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 133 | 134 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_hal_def.h 4 | * @author MCD Application Team 5 | * @brief This file contains HAL common defines, enumeration, macros and 6 | * structures definitions. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2016 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under BSD 3-Clause license, 14 | * the "License"; You may not use this file except in compliance with the 15 | * License. You may obtain a copy of the License at: 16 | * opensource.org/licenses/BSD-3-Clause 17 | * 18 | ****************************************************************************** 19 | */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F0xx_HAL_DEF 23 | #define __STM32F0xx_HAL_DEF 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Includes ------------------------------------------------------------------*/ 30 | #include "stm32f0xx.h" 31 | #include "Legacy/stm32_hal_legacy.h" 32 | #include 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | 36 | /** 37 | * @brief HAL Status structures definition 38 | */ 39 | typedef enum 40 | { 41 | HAL_OK = 0x00U, 42 | HAL_ERROR = 0x01U, 43 | HAL_BUSY = 0x02U, 44 | HAL_TIMEOUT = 0x03U 45 | } HAL_StatusTypeDef; 46 | 47 | /** 48 | * @brief HAL Lock structures definition 49 | */ 50 | typedef enum 51 | { 52 | HAL_UNLOCKED = 0x00U, 53 | HAL_LOCKED = 0x01U 54 | } HAL_LockTypeDef; 55 | 56 | /* Exported macro ------------------------------------------------------------*/ 57 | 58 | #define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */ 59 | 60 | #define HAL_MAX_DELAY 0xFFFFFFFFU 61 | 62 | #define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT)) 63 | #define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U) 64 | 65 | #define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \ 66 | do{ \ 67 | (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \ 68 | (__DMA_HANDLE__).Parent = (__HANDLE__); \ 69 | } while(0U) 70 | 71 | /** @brief Reset the Handle's State field. 72 | * @param __HANDLE__ specifies the Peripheral Handle. 73 | * @note This macro can be used for the following purpose: 74 | * - When the Handle is declared as local variable; before passing it as parameter 75 | * to HAL_PPP_Init() for the first time, it is mandatory to use this macro 76 | * to set to 0 the Handle's "State" field. 77 | * Otherwise, "State" field may have any random value and the first time the function 78 | * HAL_PPP_Init() is called, the low level hardware initialization will be missed 79 | * (i.e. HAL_PPP_MspInit() will not be executed). 80 | * - When there is a need to reconfigure the low level hardware: instead of calling 81 | * HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init(). 82 | * In this later function, when the Handle's "State" field is set to 0, it will execute the function 83 | * HAL_PPP_MspInit() which will reconfigure the low level hardware. 84 | * @retval None 85 | */ 86 | #define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0U) 87 | 88 | #if (USE_RTOS == 1U) 89 | /* Reserved for future use */ 90 | #error " USE_RTOS should be 0 in the current HAL release " 91 | #else 92 | #define __HAL_LOCK(__HANDLE__) \ 93 | do{ \ 94 | if((__HANDLE__)->Lock == HAL_LOCKED) \ 95 | { \ 96 | return HAL_BUSY; \ 97 | } \ 98 | else \ 99 | { \ 100 | (__HANDLE__)->Lock = HAL_LOCKED; \ 101 | } \ 102 | }while (0U) 103 | 104 | #define __HAL_UNLOCK(__HANDLE__) \ 105 | do{ \ 106 | (__HANDLE__)->Lock = HAL_UNLOCKED; \ 107 | }while (0U) 108 | #endif /* USE_RTOS */ 109 | 110 | #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */ 111 | #ifndef __weak 112 | #define __weak __attribute__((weak)) 113 | #endif 114 | #ifndef __packed 115 | #define __packed __attribute__((packed)) 116 | #endif 117 | #elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */ 118 | #ifndef __weak 119 | #define __weak __attribute__((weak)) 120 | #endif /* __weak */ 121 | #ifndef __packed 122 | #define __packed __attribute__((__packed__)) 123 | #endif /* __packed */ 124 | #endif /* __GNUC__ */ 125 | 126 | 127 | /* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */ 128 | #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */ 129 | #ifndef __ALIGN_BEGIN 130 | #define __ALIGN_BEGIN 131 | #endif 132 | #ifndef __ALIGN_END 133 | #define __ALIGN_END __attribute__ ((aligned (4))) 134 | #endif 135 | #elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */ 136 | #ifndef __ALIGN_END 137 | #define __ALIGN_END __attribute__ ((aligned (4))) 138 | #endif /* __ALIGN_END */ 139 | #ifndef __ALIGN_BEGIN 140 | #define __ALIGN_BEGIN 141 | #endif /* __ALIGN_BEGIN */ 142 | #else 143 | #ifndef __ALIGN_END 144 | #define __ALIGN_END 145 | #endif /* __ALIGN_END */ 146 | #ifndef __ALIGN_BEGIN 147 | #if defined (__CC_ARM) /* ARM Compiler V5*/ 148 | #define __ALIGN_BEGIN __align(4) 149 | #elif defined (__ICCARM__) /* IAR Compiler */ 150 | #define __ALIGN_BEGIN 151 | #endif /* __CC_ARM */ 152 | #endif /* __ALIGN_BEGIN */ 153 | #endif /* __GNUC__ */ 154 | 155 | /** 156 | * @brief __NOINLINE definition 157 | */ 158 | #if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ ) 159 | /* ARM V4/V5 and V6 & GNU Compiler 160 | ------------------------------- 161 | */ 162 | #define __NOINLINE __attribute__ ( (noinline) ) 163 | 164 | #elif defined ( __ICCARM__ ) 165 | /* ICCARM Compiler 166 | --------------- 167 | */ 168 | #define __NOINLINE _Pragma("optimize = no_inline") 169 | 170 | #endif 171 | 172 | #ifdef __cplusplus 173 | } 174 | #endif 175 | 176 | #endif /* ___STM32F0xx_HAL_DEF */ 177 | 178 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 179 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_hal_i2c_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of I2C HAL Extended module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32F0xx_HAL_I2C_EX_H 22 | #define STM32F0xx_HAL_I2C_EX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f0xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F0xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup I2CEx 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported constants --------------------------------------------------------*/ 41 | 42 | /** @defgroup I2CEx_Exported_Constants I2C Extended Exported Constants 43 | * @{ 44 | */ 45 | 46 | /** @defgroup I2CEx_Analog_Filter I2C Extended Analog Filter 47 | * @{ 48 | */ 49 | #define I2C_ANALOGFILTER_ENABLE 0x00000000U 50 | #define I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF 51 | /** 52 | * @} 53 | */ 54 | 55 | /** @defgroup I2CEx_FastModePlus I2C Extended Fast Mode Plus 56 | * @{ 57 | */ 58 | #define I2C_FMP_NOT_SUPPORTED 0xAAAA0000U /*!< Fast Mode Plus not supported */ 59 | #if defined(SYSCFG_CFGR1_I2C_FMP_PA9) 60 | #define I2C_FASTMODEPLUS_PA9 SYSCFG_CFGR1_I2C_FMP_PA9 /*!< Enable Fast Mode Plus on PA9 */ 61 | #define I2C_FASTMODEPLUS_PA10 SYSCFG_CFGR1_I2C_FMP_PA10 /*!< Enable Fast Mode Plus on PA10 */ 62 | #else 63 | #define I2C_FASTMODEPLUS_PA9 (uint32_t)(0x00000001U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus PA9 not supported */ 64 | #define I2C_FASTMODEPLUS_PA10 (uint32_t)(0x00000002U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus PA10 not supported */ 65 | #endif /* SYSCFG_CFGR1_I2C_FMP_PA9 */ 66 | #define I2C_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_FMP_PB6 /*!< Enable Fast Mode Plus on PB6 */ 67 | #define I2C_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_FMP_PB7 /*!< Enable Fast Mode Plus on PB7 */ 68 | #define I2C_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_FMP_PB8 /*!< Enable Fast Mode Plus on PB8 */ 69 | #define I2C_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_FMP_PB9 /*!< Enable Fast Mode Plus on PB9 */ 70 | #if defined(SYSCFG_CFGR1_I2C_FMP_I2C1) 71 | #define I2C_FASTMODEPLUS_I2C1 SYSCFG_CFGR1_I2C_FMP_I2C1 /*!< Enable Fast Mode Plus on I2C1 pins */ 72 | #else 73 | #define I2C_FASTMODEPLUS_I2C1 (uint32_t)(0x00000100U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus I2C1 not supported */ 74 | #endif /* SYSCFG_CFGR1_I2C_FMP_I2C1 */ 75 | #if defined(SYSCFG_CFGR1_I2C_FMP_I2C2) 76 | #define I2C_FASTMODEPLUS_I2C2 SYSCFG_CFGR1_I2C_FMP_I2C2 /*!< Enable Fast Mode Plus on I2C2 pins */ 77 | #else 78 | #define I2C_FASTMODEPLUS_I2C2 (uint32_t)(0x00000200U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus I2C2 not supported */ 79 | #endif /* SYSCFG_CFGR1_I2C_FMP_I2C2 */ 80 | /** 81 | * @} 82 | */ 83 | 84 | /** 85 | * @} 86 | */ 87 | 88 | /* Exported macro ------------------------------------------------------------*/ 89 | /* Exported functions --------------------------------------------------------*/ 90 | 91 | /** @addtogroup I2CEx_Exported_Functions I2C Extended Exported Functions 92 | * @{ 93 | */ 94 | 95 | /** @addtogroup I2CEx_Exported_Functions_Group1 Extended features functions 96 | * @brief Extended features functions 97 | * @{ 98 | */ 99 | 100 | /** @addtogroup I2CEx_Exported_Functions_Group1 Filter Mode Functions 101 | * @{ 102 | */ 103 | HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, 104 | uint32_t AnalogFilter); 105 | HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, 106 | uint32_t DigitalFilter); 107 | /** 108 | * @} 109 | */ 110 | #if defined(I2C_CR1_WUPEN) 111 | 112 | /** @addtogroup I2CEx_Exported_Functions_Group2 WakeUp Mode Functions 113 | * @{ 114 | */ 115 | HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp(I2C_HandleTypeDef *hi2c); 116 | HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c); 117 | /** 118 | * @} 119 | */ 120 | #endif /* I2C_CR1_WUPEN */ 121 | 122 | /** @addtogroup I2CEx_Exported_Functions_Group3 Fast Mode Plus Functions 123 | * @{ 124 | */ 125 | void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus); 126 | void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus); 127 | /** 128 | * @} 129 | */ 130 | 131 | /* Private constants ---------------------------------------------------------*/ 132 | /** @defgroup I2CEx_Private_Constants I2C Extended Private Constants 133 | * @{ 134 | */ 135 | 136 | /** 137 | * @} 138 | */ 139 | 140 | /* Private macros ------------------------------------------------------------*/ 141 | /** @defgroup I2CEx_Private_Macro I2C Extended Private Macros 142 | * @{ 143 | */ 144 | #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \ 145 | ((FILTER) == I2C_ANALOGFILTER_DISABLE)) 146 | 147 | #define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU) 148 | 149 | #define IS_I2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & I2C_FMP_NOT_SUPPORTED) != I2C_FMP_NOT_SUPPORTED) && \ 150 | ((((__CONFIG__) & (I2C_FASTMODEPLUS_PA9)) == I2C_FASTMODEPLUS_PA9) || \ 151 | (((__CONFIG__) & (I2C_FASTMODEPLUS_PA10)) == I2C_FASTMODEPLUS_PA10) || \ 152 | (((__CONFIG__) & (I2C_FASTMODEPLUS_PB6)) == I2C_FASTMODEPLUS_PB6) || \ 153 | (((__CONFIG__) & (I2C_FASTMODEPLUS_PB7)) == I2C_FASTMODEPLUS_PB7) || \ 154 | (((__CONFIG__) & (I2C_FASTMODEPLUS_PB8)) == I2C_FASTMODEPLUS_PB8) || \ 155 | (((__CONFIG__) & (I2C_FASTMODEPLUS_PB9)) == I2C_FASTMODEPLUS_PB9) || \ 156 | (((__CONFIG__) & (I2C_FASTMODEPLUS_I2C1)) == I2C_FASTMODEPLUS_I2C1) || \ 157 | (((__CONFIG__) & (I2C_FASTMODEPLUS_I2C2)) == I2C_FASTMODEPLUS_I2C2))) 158 | /** 159 | * @} 160 | */ 161 | 162 | /* Private Functions ---------------------------------------------------------*/ 163 | /** @defgroup I2CEx_Private_Functions I2C Extended Private Functions 164 | * @{ 165 | */ 166 | /* Private functions are defined in stm32f0xx_hal_i2c_ex.c file */ 167 | /** 168 | * @} 169 | */ 170 | 171 | /** 172 | * @} 173 | */ 174 | 175 | /** 176 | * @} 177 | */ 178 | 179 | /** 180 | * @} 181 | */ 182 | 183 | /** 184 | * @} 185 | */ 186 | 187 | #ifdef __cplusplus 188 | } 189 | #endif 190 | 191 | #endif /* STM32F0xx_HAL_I2C_EX_H */ 192 | 193 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 194 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pcd_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_hal_pcd_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of PCD HAL Extension module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32F0xx_HAL_PCD_EX_H 22 | #define STM32F0xx_HAL_PCD_EX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f0xx_hal_def.h" 30 | 31 | #if defined (USB) 32 | /** @addtogroup STM32F0xx_HAL_Driver 33 | * @{ 34 | */ 35 | 36 | /** @addtogroup PCDEx 37 | * @{ 38 | */ 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported constants --------------------------------------------------------*/ 41 | /* Exported macros -----------------------------------------------------------*/ 42 | /* Exported functions --------------------------------------------------------*/ 43 | /** @addtogroup PCDEx_Exported_Functions PCDEx Exported Functions 44 | * @{ 45 | */ 46 | /** @addtogroup PCDEx_Exported_Functions_Group1 Peripheral Control functions 47 | * @{ 48 | */ 49 | 50 | 51 | 52 | HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr, 53 | uint16_t ep_kind, uint32_t pmaadress); 54 | 55 | 56 | HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd); 57 | HAL_StatusTypeDef HAL_PCDEx_DeActivateLPM(PCD_HandleTypeDef *hpcd); 58 | 59 | 60 | HAL_StatusTypeDef HAL_PCDEx_ActivateBCD(PCD_HandleTypeDef *hpcd); 61 | HAL_StatusTypeDef HAL_PCDEx_DeActivateBCD(PCD_HandleTypeDef *hpcd); 62 | void HAL_PCDEx_BCD_VBUSDetect(PCD_HandleTypeDef *hpcd); 63 | 64 | void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg); 65 | void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg); 66 | 67 | /** 68 | * @} 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** 76 | * @} 77 | */ 78 | 79 | /** 80 | * @} 81 | */ 82 | #endif /* defined (USB) */ 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | 89 | #endif /* STM32F0xx_HAL_PCD_EX_H */ 90 | 91 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 92 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_hal_pwr.h 4 | * @author MCD Application Team 5 | * @brief Header file of PWR HAL module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32F0xx_HAL_PWR_H 22 | #define __STM32F0xx_HAL_PWR_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f0xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F0xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup PWR PWR 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported constants --------------------------------------------------------*/ 41 | 42 | /** @defgroup PWR_Exported_Constants PWR Exported Constants 43 | * @{ 44 | */ 45 | 46 | /** @defgroup PWR_Regulator_state_in_STOP_mode PWR Regulator state in STOP mode 47 | * @{ 48 | */ 49 | #define PWR_MAINREGULATOR_ON (0x00000000U) 50 | #define PWR_LOWPOWERREGULATOR_ON PWR_CR_LPDS 51 | 52 | #define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \ 53 | ((REGULATOR) == PWR_LOWPOWERREGULATOR_ON)) 54 | /** 55 | * @} 56 | */ 57 | 58 | /** @defgroup PWR_SLEEP_mode_entry PWR SLEEP mode entry 59 | * @{ 60 | */ 61 | #define PWR_SLEEPENTRY_WFI ((uint8_t)0x01U) 62 | #define PWR_SLEEPENTRY_WFE ((uint8_t)0x02U) 63 | #define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE)) 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup PWR_STOP_mode_entry PWR STOP mode entry 69 | * @{ 70 | */ 71 | #define PWR_STOPENTRY_WFI ((uint8_t)0x01U) 72 | #define PWR_STOPENTRY_WFE ((uint8_t)0x02U) 73 | #define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE)) 74 | /** 75 | * @} 76 | */ 77 | 78 | 79 | /** 80 | * @} 81 | */ 82 | 83 | /* Exported macro ------------------------------------------------------------*/ 84 | /** @defgroup PWR_Exported_Macro PWR Exported Macro 85 | * @{ 86 | */ 87 | 88 | /** @brief Check PWR flag is set or not. 89 | * @param __FLAG__ specifies the flag to check. 90 | * This parameter can be one of the following values: 91 | * @arg PWR_FLAG_WU: Wake Up flag. This flag indicates that a wakeup event 92 | * was received from the WKUP pin or from the RTC alarm (Alarm A), 93 | * RTC Tamper event, RTC TimeStamp event or RTC Wakeup. 94 | * An additional wakeup event is detected if the WKUP pin is enabled 95 | * (by setting the EWUP bit) when the WKUP pin level is already high. 96 | * @arg PWR_FLAG_SB: StandBy flag. This flag indicates that the system was 97 | * resumed from StandBy mode. 98 | * @arg PWR_FLAG_PVDO: PVD Output. This flag is valid only if PVD is enabled 99 | * by the HAL_PWR_EnablePVD() function. The PVD is stopped by Standby mode 100 | * For this reason, this bit is equal to 0 after Standby or reset 101 | * until the PVDE bit is set. 102 | * Warning: this Flag is not available on STM32F030x8 products 103 | * @arg PWR_FLAG_VREFINTRDY: This flag indicates that the internal reference 104 | * voltage VREFINT is ready. 105 | * Warning: this Flag is not available on STM32F030x8 products 106 | * @retval The new state of __FLAG__ (TRUE or FALSE). 107 | */ 108 | #define __HAL_PWR_GET_FLAG(__FLAG__) ((PWR->CSR & (__FLAG__)) == (__FLAG__)) 109 | 110 | /** @brief Clear the PWR's pending flags. 111 | * @param __FLAG__ specifies the flag to clear. 112 | * This parameter can be one of the following values: 113 | * @arg PWR_FLAG_WU: Wake Up flag 114 | * @arg PWR_FLAG_SB: StandBy flag 115 | */ 116 | #define __HAL_PWR_CLEAR_FLAG(__FLAG__) (PWR->CR |= (__FLAG__) << 2U) 117 | 118 | 119 | /** 120 | * @} 121 | */ 122 | 123 | /* Include PWR HAL Extension module */ 124 | #include "stm32f0xx_hal_pwr_ex.h" 125 | 126 | /* Exported functions --------------------------------------------------------*/ 127 | 128 | /** @addtogroup PWR_Exported_Functions PWR Exported Functions 129 | * @{ 130 | */ 131 | 132 | /** @addtogroup PWR_Exported_Functions_Group1 Initialization and de-initialization functions 133 | * @{ 134 | */ 135 | 136 | /* Initialization and de-initialization functions *****************************/ 137 | void HAL_PWR_DeInit(void); 138 | 139 | /** 140 | * @} 141 | */ 142 | 143 | /** @addtogroup PWR_Exported_Functions_Group2 Peripheral Control functions 144 | * @{ 145 | */ 146 | 147 | /* Peripheral Control functions **********************************************/ 148 | void HAL_PWR_EnableBkUpAccess(void); 149 | void HAL_PWR_DisableBkUpAccess(void); 150 | 151 | /* WakeUp pins configuration functions ****************************************/ 152 | void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinx); 153 | void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx); 154 | 155 | /* Low Power modes configuration functions ************************************/ 156 | void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry); 157 | void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry); 158 | void HAL_PWR_EnterSTANDBYMode(void); 159 | 160 | void HAL_PWR_EnableSleepOnExit(void); 161 | void HAL_PWR_DisableSleepOnExit(void); 162 | void HAL_PWR_EnableSEVOnPend(void); 163 | void HAL_PWR_DisableSEVOnPend(void); 164 | 165 | /** 166 | * @} 167 | */ 168 | 169 | /** 170 | * @} 171 | */ 172 | 173 | /** 174 | * @} 175 | */ 176 | 177 | /** 178 | * @} 179 | */ 180 | 181 | #ifdef __cplusplus 182 | } 183 | #endif 184 | 185 | 186 | #endif /* __STM32F0xx_HAL_PWR_H */ 187 | 188 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 189 | 190 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_hal_spi_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of SPI HAL Extended module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32F0xx_HAL_SPI_EX_H 22 | #define STM32F0xx_HAL_SPI_EX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f0xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F0xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup SPIEx 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported constants --------------------------------------------------------*/ 41 | /* Exported macros -----------------------------------------------------------*/ 42 | /* Exported functions --------------------------------------------------------*/ 43 | /** @addtogroup SPIEx_Exported_Functions 44 | * @{ 45 | */ 46 | 47 | /* Initialization and de-initialization functions ****************************/ 48 | /* IO operation functions *****************************************************/ 49 | /** @addtogroup SPIEx_Exported_Functions_Group1 50 | * @{ 51 | */ 52 | HAL_StatusTypeDef HAL_SPIEx_FlushRxFifo(SPI_HandleTypeDef *hspi); 53 | /** 54 | * @} 55 | */ 56 | 57 | /** 58 | * @} 59 | */ 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | /** 66 | * @} 67 | */ 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif /* STM32F0xx_HAL_SPI_EX_H */ 74 | 75 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 76 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_usb.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_ll_usb.h 4 | * @author MCD Application Team 5 | * @brief Header file of USB Low Layer HAL module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32F0xx_LL_USB_H 22 | #define STM32F0xx_LL_USB_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f0xx_hal_def.h" 30 | 31 | #if defined (USB) 32 | /** @addtogroup STM32F0xx_HAL_Driver 33 | * @{ 34 | */ 35 | 36 | /** @addtogroup USB_LL 37 | * @{ 38 | */ 39 | 40 | /* Exported types ------------------------------------------------------------*/ 41 | 42 | /** 43 | * @brief USB Mode definition 44 | */ 45 | 46 | 47 | 48 | typedef enum 49 | { 50 | USB_DEVICE_MODE = 0 51 | } USB_ModeTypeDef; 52 | 53 | /** 54 | * @brief USB Initialization Structure definition 55 | */ 56 | typedef struct 57 | { 58 | uint32_t dev_endpoints; /*!< Device Endpoints number. 59 | This parameter depends on the used USB core. 60 | This parameter must be a number between Min_Data = 1 and Max_Data = 15 */ 61 | 62 | uint32_t speed; /*!< USB Core speed. 63 | This parameter can be any value of @ref PCD_Speed/HCD_Speed 64 | (HCD_SPEED_xxx, HCD_SPEED_xxx) */ 65 | 66 | uint32_t ep0_mps; /*!< Set the Endpoint 0 Max Packet size. */ 67 | 68 | uint32_t phy_itface; /*!< Select the used PHY interface. 69 | This parameter can be any value of @ref PCD_PHY_Module/HCD_PHY_Module */ 70 | 71 | uint32_t Sof_enable; /*!< Enable or disable the output of the SOF signal. */ 72 | 73 | uint32_t low_power_enable; /*!< Enable or disable Low Power mode */ 74 | 75 | uint32_t lpm_enable; /*!< Enable or disable Battery charging. */ 76 | 77 | uint32_t battery_charging_enable; /*!< Enable or disable Battery charging. */ 78 | } USB_CfgTypeDef; 79 | 80 | typedef struct 81 | { 82 | uint8_t num; /*!< Endpoint number 83 | This parameter must be a number between Min_Data = 1 and Max_Data = 15 */ 84 | 85 | uint8_t is_in; /*!< Endpoint direction 86 | This parameter must be a number between Min_Data = 0 and Max_Data = 1 */ 87 | 88 | uint8_t is_stall; /*!< Endpoint stall condition 89 | This parameter must be a number between Min_Data = 0 and Max_Data = 1 */ 90 | 91 | uint8_t type; /*!< Endpoint type 92 | This parameter can be any value of @ref USB_EP_Type */ 93 | 94 | uint8_t data_pid_start; /*!< Initial data PID 95 | This parameter must be a number between Min_Data = 0 and Max_Data = 1 */ 96 | 97 | uint16_t pmaadress; /*!< PMA Address 98 | This parameter can be any value between Min_addr = 0 and Max_addr = 1K */ 99 | 100 | uint16_t pmaaddr0; /*!< PMA Address0 101 | This parameter can be any value between Min_addr = 0 and Max_addr = 1K */ 102 | 103 | uint16_t pmaaddr1; /*!< PMA Address1 104 | This parameter can be any value between Min_addr = 0 and Max_addr = 1K */ 105 | 106 | uint8_t doublebuffer; /*!< Double buffer enable 107 | This parameter can be 0 or 1 */ 108 | 109 | uint16_t tx_fifo_num; /*!< This parameter is not required by USB Device FS peripheral, it is used 110 | only by USB OTG FS peripheral 111 | This parameter is added to ensure compatibility across USB peripherals */ 112 | 113 | uint32_t maxpacket; /*!< Endpoint Max packet size 114 | This parameter must be a number between Min_Data = 0 and Max_Data = 64KB */ 115 | 116 | uint8_t *xfer_buff; /*!< Pointer to transfer buffer */ 117 | 118 | uint32_t xfer_len; /*!< Current transfer length */ 119 | 120 | uint32_t xfer_count; /*!< Partial transfer length in case of multi packet transfer */ 121 | 122 | uint32_t xfer_len_db; /*!< double buffer transfer length used with bulk double buffer in */ 123 | 124 | uint8_t xfer_fill_db; /*!< double buffer Need to Fill new buffer used with bulk_in */ 125 | 126 | } USB_EPTypeDef; 127 | 128 | 129 | /* Exported constants --------------------------------------------------------*/ 130 | 131 | /** @defgroup PCD_Exported_Constants PCD Exported Constants 132 | * @{ 133 | */ 134 | 135 | 136 | /** @defgroup USB_LL_EP0_MPS USB Low Layer EP0 MPS 137 | * @{ 138 | */ 139 | #define EP_MPS_64 0U 140 | #define EP_MPS_32 1U 141 | #define EP_MPS_16 2U 142 | #define EP_MPS_8 3U 143 | /** 144 | * @} 145 | */ 146 | 147 | /** @defgroup USB_LL_EP_Type USB Low Layer EP Type 148 | * @{ 149 | */ 150 | #define EP_TYPE_CTRL 0U 151 | #define EP_TYPE_ISOC 1U 152 | #define EP_TYPE_BULK 2U 153 | #define EP_TYPE_INTR 3U 154 | #define EP_TYPE_MSK 3U 155 | /** 156 | * @} 157 | */ 158 | 159 | /** @defgroup USB_LL Device Speed 160 | * @{ 161 | */ 162 | #define USBD_FS_SPEED 2U 163 | /** 164 | * @} 165 | */ 166 | 167 | #define BTABLE_ADDRESS 0x000U 168 | #define PMA_ACCESS 1U 169 | 170 | #define EP_ADDR_MSK 0x7U 171 | /** 172 | * @} 173 | */ 174 | 175 | /* Exported macro ------------------------------------------------------------*/ 176 | /** 177 | * @} 178 | */ 179 | 180 | /* Exported functions --------------------------------------------------------*/ 181 | /** @addtogroup USB_LL_Exported_Functions USB Low Layer Exported Functions 182 | * @{ 183 | */ 184 | 185 | 186 | HAL_StatusTypeDef USB_CoreInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg); 187 | HAL_StatusTypeDef USB_DevInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg); 188 | HAL_StatusTypeDef USB_EnableGlobalInt(USB_TypeDef *USBx); 189 | HAL_StatusTypeDef USB_DisableGlobalInt(USB_TypeDef *USBx); 190 | HAL_StatusTypeDef USB_SetCurrentMode(USB_TypeDef *USBx, USB_ModeTypeDef mode); 191 | 192 | #if defined (HAL_PCD_MODULE_ENABLED) 193 | HAL_StatusTypeDef USB_ActivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep); 194 | HAL_StatusTypeDef USB_DeactivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep); 195 | HAL_StatusTypeDef USB_EPStartXfer(USB_TypeDef *USBx, USB_EPTypeDef *ep); 196 | HAL_StatusTypeDef USB_EPSetStall(USB_TypeDef *USBx, USB_EPTypeDef *ep); 197 | HAL_StatusTypeDef USB_EPClearStall(USB_TypeDef *USBx, USB_EPTypeDef *ep); 198 | #endif /* defined (HAL_PCD_MODULE_ENABLED) */ 199 | 200 | HAL_StatusTypeDef USB_SetDevAddress(USB_TypeDef *USBx, uint8_t address); 201 | HAL_StatusTypeDef USB_DevConnect(USB_TypeDef *USBx); 202 | HAL_StatusTypeDef USB_DevDisconnect(USB_TypeDef *USBx); 203 | HAL_StatusTypeDef USB_StopDevice(USB_TypeDef *USBx); 204 | uint32_t USB_ReadInterrupts(USB_TypeDef *USBx); 205 | HAL_StatusTypeDef USB_ActivateRemoteWakeup(USB_TypeDef *USBx); 206 | HAL_StatusTypeDef USB_DeActivateRemoteWakeup(USB_TypeDef *USBx); 207 | 208 | void USB_WritePMA(USB_TypeDef *USBx, uint8_t *pbUsrBuf, 209 | uint16_t wPMABufAddr, uint16_t wNBytes); 210 | 211 | void USB_ReadPMA(USB_TypeDef *USBx, uint8_t *pbUsrBuf, 212 | uint16_t wPMABufAddr, uint16_t wNBytes); 213 | 214 | /** 215 | * @} 216 | */ 217 | 218 | /** 219 | * @} 220 | */ 221 | 222 | /** 223 | * @} 224 | */ 225 | 226 | /** 227 | * @} 228 | */ 229 | #endif /* defined (USB) */ 230 | 231 | #ifdef __cplusplus 232 | } 233 | #endif 234 | 235 | 236 | #endif /* STM32F0xx_LL_USB_H */ 237 | 238 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 239 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_hal_adc_ex.c 4 | * @author MCD Application Team 5 | * @brief This file provides firmware functions to manage the following 6 | * functionalities of the Analog to Digital Convertor (ADC) 7 | * peripheral: 8 | * + Operation functions 9 | * ++ Calibration (ADC automatic self-calibration) 10 | * Other functions (generic functions) are available in file 11 | * "stm32f0xx_hal_adc.c". 12 | * 13 | @verbatim 14 | [..] 15 | (@) Sections "ADC peripheral features" and "How to use this driver" are 16 | available in file of generic functions "stm32l1xx_hal_adc.c". 17 | [..] 18 | @endverbatim 19 | ****************************************************************************** 20 | * @attention 21 | * 22 | *

© Copyright (c) 2016 STMicroelectronics. 23 | * All rights reserved.

24 | * 25 | * This software component is licensed by ST under BSD 3-Clause license, 26 | * the "License"; You may not use this file except in compliance with the 27 | * License. You may obtain a copy of the License at: 28 | * opensource.org/licenses/BSD-3-Clause 29 | * 30 | ****************************************************************************** 31 | */ 32 | 33 | /* Includes ------------------------------------------------------------------*/ 34 | #include "stm32f0xx_hal.h" 35 | 36 | /** @addtogroup STM32F0xx_HAL_Driver 37 | * @{ 38 | */ 39 | 40 | /** @defgroup ADCEx ADCEx 41 | * @brief ADC HAL module driver 42 | * @{ 43 | */ 44 | 45 | #ifdef HAL_ADC_MODULE_ENABLED 46 | 47 | /* Private typedef -----------------------------------------------------------*/ 48 | /* Private define ------------------------------------------------------------*/ 49 | /** @defgroup ADCEx_Private_Constants ADCEx Private Constants 50 | * @{ 51 | */ 52 | 53 | /* Fixed timeout values for ADC calibration, enable settling time, disable */ 54 | /* settling time. */ 55 | /* Values defined to be higher than worst cases: low clock frequency, */ 56 | /* maximum prescaler. */ 57 | /* Ex of profile low frequency : Clock source at 0.1 MHz, ADC clock */ 58 | /* prescaler 4. */ 59 | /* Unit: ms */ 60 | #define ADC_DISABLE_TIMEOUT 2 61 | #define ADC_CALIBRATION_TIMEOUT 2U 62 | /** 63 | * @} 64 | */ 65 | 66 | /* Private macros -------------------------------------------------------------*/ 67 | /* Private variables ---------------------------------------------------------*/ 68 | /* Private function prototypes -----------------------------------------------*/ 69 | /* Private functions ---------------------------------------------------------*/ 70 | 71 | /** @defgroup ADCEx_Exported_Functions ADCEx Exported Functions 72 | * @{ 73 | */ 74 | 75 | /** @defgroup ADCEx_Exported_Functions_Group1 Extended Initialization/de-initialization functions 76 | * @brief Extended Initialization and Configuration functions 77 | * 78 | @verbatim 79 | =============================================================================== 80 | ##### IO operation functions ##### 81 | =============================================================================== 82 | [..] This section provides functions allowing to: 83 | (+) Perform the ADC calibration. 84 | @endverbatim 85 | * @{ 86 | */ 87 | 88 | /** 89 | * @brief Perform an ADC automatic self-calibration 90 | * Calibration prerequisite: ADC must be disabled (execute this 91 | * function before HAL_ADC_Start() or after HAL_ADC_Stop() ). 92 | * @note Calibration factor can be read after calibration, using function 93 | * HAL_ADC_GetValue() (value on 7 bits: from DR[6;0]). 94 | * @param hadc ADC handle 95 | * @retval HAL status 96 | */ 97 | HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef* hadc) 98 | { 99 | HAL_StatusTypeDef tmp_hal_status = HAL_OK; 100 | uint32_t tickstart = 0U; 101 | uint32_t backup_setting_adc_dma_transfer = 0; /* Note: Variable not declared as volatile because register read is already declared as volatile */ 102 | 103 | /* Check the parameters */ 104 | assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance)); 105 | 106 | /* Process locked */ 107 | __HAL_LOCK(hadc); 108 | 109 | /* Calibration prerequisite: ADC must be disabled. */ 110 | if (ADC_IS_ENABLE(hadc) == RESET) 111 | { 112 | /* Set ADC state */ 113 | ADC_STATE_CLR_SET(hadc->State, 114 | HAL_ADC_STATE_REG_BUSY, 115 | HAL_ADC_STATE_BUSY_INTERNAL); 116 | 117 | /* Disable ADC DMA transfer request during calibration */ 118 | /* Note: Specificity of this STM32 serie: Calibration factor is */ 119 | /* available in data register and also transfered by DMA. */ 120 | /* To not insert ADC calibration factor among ADC conversion data */ 121 | /* in array variable, DMA transfer must be disabled during */ 122 | /* calibration. */ 123 | backup_setting_adc_dma_transfer = READ_BIT(hadc->Instance->CFGR1, ADC_CFGR1_DMAEN | ADC_CFGR1_DMACFG); 124 | CLEAR_BIT(hadc->Instance->CFGR1, ADC_CFGR1_DMAEN | ADC_CFGR1_DMACFG); 125 | 126 | /* Start ADC calibration */ 127 | hadc->Instance->CR |= ADC_CR_ADCAL; 128 | 129 | tickstart = HAL_GetTick(); 130 | 131 | /* Wait for calibration completion */ 132 | while(HAL_IS_BIT_SET(hadc->Instance->CR, ADC_CR_ADCAL)) 133 | { 134 | if((HAL_GetTick() - tickstart) > ADC_CALIBRATION_TIMEOUT) 135 | { 136 | /* New check to avoid false timeout detection in case of preemption */ 137 | if(HAL_IS_BIT_SET(hadc->Instance->CR, ADC_CR_ADCAL)) 138 | { 139 | /* Update ADC state machine to error */ 140 | ADC_STATE_CLR_SET(hadc->State, 141 | HAL_ADC_STATE_BUSY_INTERNAL, 142 | HAL_ADC_STATE_ERROR_INTERNAL); 143 | 144 | /* Process unlocked */ 145 | __HAL_UNLOCK(hadc); 146 | 147 | return HAL_ERROR; 148 | } 149 | } 150 | } 151 | 152 | /* Restore ADC DMA transfer request after calibration */ 153 | SET_BIT(hadc->Instance->CFGR1, backup_setting_adc_dma_transfer); 154 | 155 | /* Set ADC state */ 156 | ADC_STATE_CLR_SET(hadc->State, 157 | HAL_ADC_STATE_BUSY_INTERNAL, 158 | HAL_ADC_STATE_READY); 159 | } 160 | else 161 | { 162 | /* Update ADC state machine to error */ 163 | SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG); 164 | 165 | tmp_hal_status = HAL_ERROR; 166 | } 167 | 168 | /* Process unlocked */ 169 | __HAL_UNLOCK(hadc); 170 | 171 | /* Return function status */ 172 | return tmp_hal_status; 173 | } 174 | 175 | /** 176 | * @} 177 | */ 178 | 179 | /** 180 | * @} 181 | */ 182 | 183 | #endif /* HAL_ADC_MODULE_ENABLED */ 184 | /** 185 | * @} 186 | */ 187 | 188 | /** 189 | * @} 190 | */ 191 | 192 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 193 | -------------------------------------------------------------------------------- /firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f0xx_hal_spi_ex.c 4 | * @author MCD Application Team 5 | * @brief Extended SPI HAL module driver. 6 | * This file provides firmware functions to manage the following 7 | * SPI peripheral extended functionalities : 8 | * + IO operation functions 9 | * 10 | ****************************************************************************** 11 | * @attention 12 | * 13 | *

© Copyright (c) 2016 STMicroelectronics. 14 | * All rights reserved.

15 | * 16 | * This software component is licensed by ST under BSD 3-Clause license, 17 | * the "License"; You may not use this file except in compliance with the 18 | * License. You may obtain a copy of the License at: 19 | * opensource.org/licenses/BSD-3-Clause 20 | * 21 | ****************************************************************************** 22 | */ 23 | 24 | /* Includes ------------------------------------------------------------------*/ 25 | #include "stm32f0xx_hal.h" 26 | 27 | /** @addtogroup STM32F0xx_HAL_Driver 28 | * @{ 29 | */ 30 | 31 | /** @defgroup SPIEx SPIEx 32 | * @brief SPI Extended HAL module driver 33 | * @{ 34 | */ 35 | #ifdef HAL_SPI_MODULE_ENABLED 36 | 37 | /* Private typedef -----------------------------------------------------------*/ 38 | /* Private defines -----------------------------------------------------------*/ 39 | /** @defgroup SPIEx_Private_Constants SPIEx Private Constants 40 | * @{ 41 | */ 42 | #define SPI_FIFO_SIZE 4UL 43 | /** 44 | * @} 45 | */ 46 | 47 | /* Private macros ------------------------------------------------------------*/ 48 | /* Private variables ---------------------------------------------------------*/ 49 | /* Private function prototypes -----------------------------------------------*/ 50 | /* Exported functions --------------------------------------------------------*/ 51 | 52 | /** @defgroup SPIEx_Exported_Functions SPIEx Exported Functions 53 | * @{ 54 | */ 55 | 56 | /** @defgroup SPIEx_Exported_Functions_Group1 IO operation functions 57 | * @brief Data transfers functions 58 | * 59 | @verbatim 60 | ============================================================================== 61 | ##### IO operation functions ##### 62 | =============================================================================== 63 | [..] 64 | This subsection provides a set of extended functions to manage the SPI 65 | data transfers. 66 | 67 | (#) Rx data flush function: 68 | (++) HAL_SPIEx_FlushRxFifo() 69 | 70 | @endverbatim 71 | * @{ 72 | */ 73 | 74 | /** 75 | * @brief Flush the RX fifo. 76 | * @param hspi pointer to a SPI_HandleTypeDef structure that contains 77 | * the configuration information for the specified SPI module. 78 | * @retval HAL status 79 | */ 80 | HAL_StatusTypeDef HAL_SPIEx_FlushRxFifo(SPI_HandleTypeDef *hspi) 81 | { 82 | __IO uint32_t tmpreg; 83 | uint8_t count = 0U; 84 | while ((hspi->Instance->SR & SPI_FLAG_FRLVL) != SPI_FRLVL_EMPTY) 85 | { 86 | count++; 87 | tmpreg = hspi->Instance->DR; 88 | UNUSED(tmpreg); /* To avoid GCC warning */ 89 | if (count == SPI_FIFO_SIZE) 90 | { 91 | return HAL_TIMEOUT; 92 | } 93 | } 94 | return HAL_OK; 95 | } 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | /** 102 | * @} 103 | */ 104 | 105 | #endif /* HAL_SPI_MODULE_ENABLED */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /** 112 | * @} 113 | */ 114 | 115 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 116 | -------------------------------------------------------------------------------- /firmware/Makefile: -------------------------------------------------------------------------------- 1 | ########################################################################################################################## 2 | # File automatically-generated by tool: [projectgenerator] version: [3.14.1] date: [Sat Oct 30 00:07:14 CEST 2021] 3 | ########################################################################################################################## 4 | 5 | # ------------------------------------------------ 6 | # Generic Makefile (based on gcc) 7 | # 8 | # ChangeLog : 9 | # 2017-02-10 - Several enhancements + project update mode 10 | # 2015-07-22 - first version 11 | # ------------------------------------------------ 12 | 13 | ###################################### 14 | # target 15 | ###################################### 16 | TARGET = firmware 17 | 18 | 19 | ###################################### 20 | # building variables 21 | ###################################### 22 | # debug build? 23 | DEBUG = 1 24 | # optimization 25 | OPT = -Og 26 | 27 | 28 | ####################################### 29 | # paths 30 | ####################################### 31 | # Build path 32 | BUILD_DIR = build 33 | 34 | ###################################### 35 | # source 36 | ###################################### 37 | # C sources 38 | C_SOURCES = \ 39 | Core/Src/main.c \ 40 | Core/Src/led.c \ 41 | Core/Src/stm32f0xx_it.c \ 42 | Core/Src/stm32f0xx_hal_msp.c \ 43 | USB_DEVICE/App/usb_device.c \ 44 | USB_DEVICE/App/usbd_desc.c \ 45 | USB_DEVICE/App/usbd_cdc_if.c \ 46 | USB_DEVICE/Target/usbd_conf.c \ 47 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usb.c \ 48 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd.c \ 49 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd_ex.c \ 50 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c \ 51 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c \ 52 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c \ 53 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c \ 54 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c \ 55 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c \ 56 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c \ 57 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c \ 58 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c \ 59 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c \ 60 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c \ 61 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c \ 62 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti.c \ 63 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.c \ 64 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c \ 65 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c \ 66 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.c \ 67 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c \ 68 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c \ 69 | Core/Src/system_stm32f0xx.c \ 70 | Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c \ 71 | Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c \ 72 | Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c \ 73 | Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c 74 | 75 | # ASM sources 76 | ASM_SOURCES = \ 77 | startup_stm32f072xb.s 78 | 79 | 80 | ####################################### 81 | # binaries 82 | ####################################### 83 | PREFIX = arm-none-eabi- 84 | # The gcc compiler bin path can be either defined in make command via GCC_PATH variable (> make GCC_PATH=xxx) 85 | # either it can be added to the PATH environment variable. 86 | ifdef GCC_PATH 87 | CC = $(GCC_PATH)/$(PREFIX)gcc 88 | AS = $(GCC_PATH)/$(PREFIX)gcc -x assembler-with-cpp 89 | CP = $(GCC_PATH)/$(PREFIX)objcopy 90 | SZ = $(GCC_PATH)/$(PREFIX)size 91 | else 92 | CC = $(PREFIX)gcc 93 | AS = $(PREFIX)gcc -x assembler-with-cpp 94 | CP = $(PREFIX)objcopy 95 | SZ = $(PREFIX)size 96 | endif 97 | HEX = $(CP) -O ihex 98 | BIN = $(CP) -O binary -S 99 | 100 | ####################################### 101 | # CFLAGS 102 | ####################################### 103 | # cpu 104 | CPU = -mcpu=cortex-m0 105 | 106 | # fpu 107 | # NONE for Cortex-M0/M0+/M3 108 | 109 | # float-abi 110 | 111 | 112 | # mcu 113 | MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI) 114 | 115 | # macros for gcc 116 | # AS defines 117 | AS_DEFS = 118 | 119 | # C defines 120 | C_DEFS = \ 121 | -DUSE_HAL_DRIVER \ 122 | -DSTM32F072xB 123 | 124 | 125 | # AS includes 126 | AS_INCLUDES = 127 | 128 | # C includes 129 | C_INCLUDES = \ 130 | -IUSB_DEVICE/App \ 131 | -IUSB_DEVICE/Target \ 132 | -ICore/Inc \ 133 | -IDrivers/STM32F0xx_HAL_Driver/Inc \ 134 | -IDrivers/STM32F0xx_HAL_Driver/Inc/Legacy \ 135 | -IMiddlewares/ST/STM32_USB_Device_Library/Core/Inc \ 136 | -IMiddlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc \ 137 | -IDrivers/CMSIS/Device/ST/STM32F0xx/Include \ 138 | -IDrivers/CMSIS/Include 139 | 140 | 141 | # compile gcc flags 142 | ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections 143 | 144 | CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections 145 | 146 | ifeq ($(DEBUG), 1) 147 | CFLAGS += -g -gdwarf-2 148 | endif 149 | 150 | 151 | # Generate dependency information 152 | CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" 153 | 154 | 155 | ####################################### 156 | # LDFLAGS 157 | ####################################### 158 | # link script 159 | LDSCRIPT = STM32F072C8Tx_FLASH.ld 160 | 161 | # libraries 162 | LIBS = -lc -lm -lnosys 163 | LIBDIR = 164 | LDFLAGS = $(MCU) -specs=nano.specs -u _printf_float -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections 165 | 166 | # default action: build all 167 | all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin 168 | 169 | 170 | ####################################### 171 | # build the application 172 | ####################################### 173 | # list of objects 174 | OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) 175 | vpath %.c $(sort $(dir $(C_SOURCES))) 176 | # list of ASM program objects 177 | OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) 178 | vpath %.s $(sort $(dir $(ASM_SOURCES))) 179 | 180 | $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR) 181 | $(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@ 182 | 183 | $(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR) 184 | $(AS) -c $(CFLAGS) $< -o $@ 185 | 186 | $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile 187 | $(CC) $(OBJECTS) $(LDFLAGS) -o $@ 188 | $(SZ) $@ 189 | 190 | $(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR) 191 | $(HEX) $< $@ 192 | 193 | $(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR) 194 | $(BIN) $< $@ 195 | 196 | $(BUILD_DIR): 197 | mkdir $@ 198 | 199 | ####################################### 200 | # clean up 201 | ####################################### 202 | clean: 203 | -rm -fR $(BUILD_DIR) 204 | 205 | ####################################### 206 | # dependencies 207 | ####################################### 208 | -include $(wildcard $(BUILD_DIR)/*.d) 209 | 210 | # *** EOF *** 211 | -------------------------------------------------------------------------------- /firmware/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_cdc.h 4 | * @author MCD Application Team 5 | * @brief header file for the usbd_cdc.c file. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USB_CDC_H 22 | #define __USB_CDC_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_ioreq.h" 30 | 31 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 32 | * @{ 33 | */ 34 | 35 | /** @defgroup usbd_cdc 36 | * @brief This file is the Header file for usbd_cdc.c 37 | * @{ 38 | */ 39 | 40 | 41 | /** @defgroup usbd_cdc_Exported_Defines 42 | * @{ 43 | */ 44 | #define CDC_IN_EP 0x81U /* EP1 for data IN */ 45 | #define CDC_OUT_EP 0x01U /* EP1 for data OUT */ 46 | #define CDC_CMD_EP 0x82U /* EP2 for CDC commands */ 47 | 48 | #ifndef CDC_HS_BINTERVAL 49 | #define CDC_HS_BINTERVAL 0x10U 50 | #endif /* CDC_HS_BINTERVAL */ 51 | 52 | #ifndef CDC_FS_BINTERVAL 53 | #define CDC_FS_BINTERVAL 0x10U 54 | #endif /* CDC_FS_BINTERVAL */ 55 | 56 | /* CDC Endpoints parameters: you can fine tune these values depending on the needed baudrates and performance. */ 57 | #define CDC_DATA_HS_MAX_PACKET_SIZE 512U /* Endpoint IN & OUT Packet size */ 58 | #define CDC_DATA_FS_MAX_PACKET_SIZE 64U /* Endpoint IN & OUT Packet size */ 59 | #define CDC_CMD_PACKET_SIZE 8U /* Control Endpoint Packet size */ 60 | 61 | #define USB_CDC_CONFIG_DESC_SIZ 67U 62 | #define CDC_DATA_HS_IN_PACKET_SIZE CDC_DATA_HS_MAX_PACKET_SIZE 63 | #define CDC_DATA_HS_OUT_PACKET_SIZE CDC_DATA_HS_MAX_PACKET_SIZE 64 | 65 | #define CDC_DATA_FS_IN_PACKET_SIZE CDC_DATA_FS_MAX_PACKET_SIZE 66 | #define CDC_DATA_FS_OUT_PACKET_SIZE CDC_DATA_FS_MAX_PACKET_SIZE 67 | 68 | /*---------------------------------------------------------------------*/ 69 | /* CDC definitions */ 70 | /*---------------------------------------------------------------------*/ 71 | #define CDC_SEND_ENCAPSULATED_COMMAND 0x00U 72 | #define CDC_GET_ENCAPSULATED_RESPONSE 0x01U 73 | #define CDC_SET_COMM_FEATURE 0x02U 74 | #define CDC_GET_COMM_FEATURE 0x03U 75 | #define CDC_CLEAR_COMM_FEATURE 0x04U 76 | #define CDC_SET_LINE_CODING 0x20U 77 | #define CDC_GET_LINE_CODING 0x21U 78 | #define CDC_SET_CONTROL_LINE_STATE 0x22U 79 | #define CDC_SEND_BREAK 0x23U 80 | 81 | /** 82 | * @} 83 | */ 84 | 85 | 86 | /** @defgroup USBD_CORE_Exported_TypesDefinitions 87 | * @{ 88 | */ 89 | 90 | /** 91 | * @} 92 | */ 93 | typedef struct 94 | { 95 | uint32_t bitrate; 96 | uint8_t format; 97 | uint8_t paritytype; 98 | uint8_t datatype; 99 | } USBD_CDC_LineCodingTypeDef; 100 | 101 | typedef struct _USBD_CDC_Itf 102 | { 103 | int8_t (* Init)(void); 104 | int8_t (* DeInit)(void); 105 | int8_t (* Control)(uint8_t cmd, uint8_t *pbuf, uint16_t length); 106 | int8_t (* Receive)(uint8_t *Buf, uint32_t *Len); 107 | 108 | } USBD_CDC_ItfTypeDef; 109 | 110 | 111 | typedef struct 112 | { 113 | uint32_t data[CDC_DATA_HS_MAX_PACKET_SIZE / 4U]; /* Force 32bits alignment */ 114 | uint8_t CmdOpCode; 115 | uint8_t CmdLength; 116 | uint8_t *RxBuffer; 117 | uint8_t *TxBuffer; 118 | uint32_t RxLength; 119 | uint32_t TxLength; 120 | 121 | __IO uint32_t TxState; 122 | __IO uint32_t RxState; 123 | } 124 | USBD_CDC_HandleTypeDef; 125 | 126 | 127 | 128 | /** @defgroup USBD_CORE_Exported_Macros 129 | * @{ 130 | */ 131 | 132 | /** 133 | * @} 134 | */ 135 | 136 | /** @defgroup USBD_CORE_Exported_Variables 137 | * @{ 138 | */ 139 | 140 | extern USBD_ClassTypeDef USBD_CDC; 141 | #define USBD_CDC_CLASS &USBD_CDC 142 | /** 143 | * @} 144 | */ 145 | 146 | /** @defgroup USB_CORE_Exported_Functions 147 | * @{ 148 | */ 149 | uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev, 150 | USBD_CDC_ItfTypeDef *fops); 151 | 152 | uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, 153 | uint8_t *pbuff, 154 | uint16_t length); 155 | 156 | uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, 157 | uint8_t *pbuff); 158 | 159 | uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev); 160 | 161 | uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev); 162 | /** 163 | * @} 164 | */ 165 | 166 | #ifdef __cplusplus 167 | } 168 | #endif 169 | 170 | #endif /* __USB_CDC_H */ 171 | /** 172 | * @} 173 | */ 174 | 175 | /** 176 | * @} 177 | */ 178 | 179 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 180 | -------------------------------------------------------------------------------- /firmware/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_core.h 4 | * @author MCD Application Team 5 | * @brief Header file for usbd_core.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_CORE_H 22 | #define __USBD_CORE_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_conf.h" 30 | #include "usbd_def.h" 31 | #include "usbd_ioreq.h" 32 | #include "usbd_ctlreq.h" 33 | 34 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 35 | * @{ 36 | */ 37 | 38 | /** @defgroup USBD_CORE 39 | * @brief This file is the Header file for usbd_core.c file 40 | * @{ 41 | */ 42 | 43 | 44 | /** @defgroup USBD_CORE_Exported_Defines 45 | * @{ 46 | */ 47 | #ifndef USBD_DEBUG_LEVEL 48 | #define USBD_DEBUG_LEVEL 0U 49 | #endif /* USBD_DEBUG_LEVEL */ 50 | /** 51 | * @} 52 | */ 53 | 54 | 55 | /** @defgroup USBD_CORE_Exported_TypesDefinitions 56 | * @{ 57 | */ 58 | 59 | 60 | /** 61 | * @} 62 | */ 63 | 64 | 65 | 66 | /** @defgroup USBD_CORE_Exported_Macros 67 | * @{ 68 | */ 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** @defgroup USBD_CORE_Exported_Variables 75 | * @{ 76 | */ 77 | #define USBD_SOF USBD_LL_SOF 78 | /** 79 | * @} 80 | */ 81 | 82 | /** @defgroup USBD_CORE_Exported_FunctionsPrototype 83 | * @{ 84 | */ 85 | USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id); 86 | USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev); 87 | USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev); 88 | USBD_StatusTypeDef USBD_Stop(USBD_HandleTypeDef *pdev); 89 | USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass); 90 | 91 | USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev); 92 | USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx); 93 | USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx); 94 | 95 | USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup); 96 | USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata); 97 | USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata); 98 | 99 | USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev); 100 | USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed); 101 | USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev); 102 | USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev); 103 | 104 | USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev); 105 | USBD_StatusTypeDef USBD_LL_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum); 106 | USBD_StatusTypeDef USBD_LL_IsoOUTIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum); 107 | 108 | USBD_StatusTypeDef USBD_LL_DevConnected(USBD_HandleTypeDef *pdev); 109 | USBD_StatusTypeDef USBD_LL_DevDisconnected(USBD_HandleTypeDef *pdev); 110 | 111 | /* USBD Low Level Driver */ 112 | USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev); 113 | USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev); 114 | USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev); 115 | USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev); 116 | USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, 117 | uint8_t ep_addr, 118 | uint8_t ep_type, 119 | uint16_t ep_mps); 120 | 121 | USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 122 | USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 123 | USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 124 | USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 125 | uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 126 | USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr); 127 | USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, 128 | uint8_t ep_addr, 129 | uint8_t *pbuf, 130 | uint16_t size); 131 | 132 | USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, 133 | uint8_t ep_addr, 134 | uint8_t *pbuf, 135 | uint16_t size); 136 | 137 | uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 138 | void USBD_LL_Delay(uint32_t Delay); 139 | 140 | /** 141 | * @} 142 | */ 143 | 144 | #ifdef __cplusplus 145 | } 146 | #endif 147 | 148 | #endif /* __USBD_CORE_H */ 149 | 150 | /** 151 | * @} 152 | */ 153 | 154 | /** 155 | * @} 156 | */ 157 | 158 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /firmware/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_req.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_req.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USB_REQUEST_H 22 | #define __USB_REQUEST_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_REQ 37 | * @brief header file for the usbd_req.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_REQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_REQ_Exported_Types 50 | * @{ 51 | */ 52 | /** 53 | * @} 54 | */ 55 | 56 | 57 | 58 | /** @defgroup USBD_REQ_Exported_Macros 59 | * @{ 60 | */ 61 | /** 62 | * @} 63 | */ 64 | 65 | /** @defgroup USBD_REQ_Exported_Variables 66 | * @{ 67 | */ 68 | /** 69 | * @} 70 | */ 71 | 72 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype 73 | * @{ 74 | */ 75 | 76 | USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 77 | USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 78 | USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 79 | 80 | 81 | void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); 82 | 83 | void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata); 84 | 85 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len); 86 | /** 87 | * @} 88 | */ 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | 94 | #endif /* __USB_REQUEST_H */ 95 | 96 | /** 97 | * @} 98 | */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /firmware/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_ioreq.h 4 | * @author MCD Application Team 5 | * @brief Header file for the usbd_ioreq.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USBD_IOREQ_H 22 | #define __USBD_IOREQ_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "usbd_def.h" 30 | #include "usbd_core.h" 31 | 32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 33 | * @{ 34 | */ 35 | 36 | /** @defgroup USBD_IOREQ 37 | * @brief header file for the usbd_ioreq.c file 38 | * @{ 39 | */ 40 | 41 | /** @defgroup USBD_IOREQ_Exported_Defines 42 | * @{ 43 | */ 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @defgroup USBD_IOREQ_Exported_Types 50 | * @{ 51 | */ 52 | 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | 59 | 60 | /** @defgroup USBD_IOREQ_Exported_Macros 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup USBD_IOREQ_Exported_Variables 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype 77 | * @{ 78 | */ 79 | 80 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, 81 | uint8_t *pbuf, 82 | uint16_t len); 83 | 84 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, 85 | uint8_t *pbuf, 86 | uint16_t len); 87 | 88 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, 89 | uint8_t *pbuf, 90 | uint16_t len); 91 | 92 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, 93 | uint8_t *pbuf, 94 | uint16_t len); 95 | 96 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev); 97 | 98 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev); 99 | 100 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr); 101 | 102 | /** 103 | * @} 104 | */ 105 | 106 | #ifdef __cplusplus 107 | } 108 | #endif 109 | 110 | #endif /* __USBD_IOREQ_H */ 111 | 112 | /** 113 | * @} 114 | */ 115 | 116 | /** 117 | * @} 118 | */ 119 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 120 | -------------------------------------------------------------------------------- /firmware/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usbd_ioreq.c 4 | * @author MCD Application Team 5 | * @brief This file provides the IO requests APIs for control endpoints. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2015 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "usbd_ioreq.h" 22 | 23 | /** @addtogroup STM32_USB_DEVICE_LIBRARY 24 | * @{ 25 | */ 26 | 27 | 28 | /** @defgroup USBD_IOREQ 29 | * @brief control I/O requests module 30 | * @{ 31 | */ 32 | 33 | /** @defgroup USBD_IOREQ_Private_TypesDefinitions 34 | * @{ 35 | */ 36 | /** 37 | * @} 38 | */ 39 | 40 | 41 | /** @defgroup USBD_IOREQ_Private_Defines 42 | * @{ 43 | */ 44 | 45 | /** 46 | * @} 47 | */ 48 | 49 | 50 | /** @defgroup USBD_IOREQ_Private_Macros 51 | * @{ 52 | */ 53 | /** 54 | * @} 55 | */ 56 | 57 | 58 | /** @defgroup USBD_IOREQ_Private_Variables 59 | * @{ 60 | */ 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | 67 | /** @defgroup USBD_IOREQ_Private_FunctionPrototypes 68 | * @{ 69 | */ 70 | /** 71 | * @} 72 | */ 73 | 74 | 75 | /** @defgroup USBD_IOREQ_Private_Functions 76 | * @{ 77 | */ 78 | 79 | /** 80 | * @brief USBD_CtlSendData 81 | * send data on the ctl pipe 82 | * @param pdev: device instance 83 | * @param buff: pointer to data buffer 84 | * @param len: length of data to be sent 85 | * @retval status 86 | */ 87 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, 88 | uint8_t *pbuf, uint16_t len) 89 | { 90 | /* Set EP0 State */ 91 | pdev->ep0_state = USBD_EP0_DATA_IN; 92 | pdev->ep_in[0].total_length = len; 93 | pdev->ep_in[0].rem_length = len; 94 | 95 | /* Start the transfer */ 96 | USBD_LL_Transmit(pdev, 0x00U, pbuf, len); 97 | 98 | return USBD_OK; 99 | } 100 | 101 | /** 102 | * @brief USBD_CtlContinueSendData 103 | * continue sending data on the ctl pipe 104 | * @param pdev: device instance 105 | * @param buff: pointer to data buffer 106 | * @param len: length of data to be sent 107 | * @retval status 108 | */ 109 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, 110 | uint8_t *pbuf, uint16_t len) 111 | { 112 | /* Start the next transfer */ 113 | USBD_LL_Transmit(pdev, 0x00U, pbuf, len); 114 | 115 | return USBD_OK; 116 | } 117 | 118 | /** 119 | * @brief USBD_CtlPrepareRx 120 | * receive data on the ctl pipe 121 | * @param pdev: device instance 122 | * @param buff: pointer to data buffer 123 | * @param len: length of data to be received 124 | * @retval status 125 | */ 126 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, 127 | uint8_t *pbuf, uint16_t len) 128 | { 129 | /* Set EP0 State */ 130 | pdev->ep0_state = USBD_EP0_DATA_OUT; 131 | pdev->ep_out[0].total_length = len; 132 | pdev->ep_out[0].rem_length = len; 133 | 134 | /* Start the transfer */ 135 | USBD_LL_PrepareReceive(pdev, 0U, pbuf, len); 136 | 137 | return USBD_OK; 138 | } 139 | 140 | /** 141 | * @brief USBD_CtlContinueRx 142 | * continue receive data on the ctl pipe 143 | * @param pdev: device instance 144 | * @param buff: pointer to data buffer 145 | * @param len: length of data to be received 146 | * @retval status 147 | */ 148 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, 149 | uint8_t *pbuf, uint16_t len) 150 | { 151 | USBD_LL_PrepareReceive(pdev, 0U, pbuf, len); 152 | 153 | return USBD_OK; 154 | } 155 | 156 | /** 157 | * @brief USBD_CtlSendStatus 158 | * send zero lzngth packet on the ctl pipe 159 | * @param pdev: device instance 160 | * @retval status 161 | */ 162 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev) 163 | { 164 | /* Set EP0 State */ 165 | pdev->ep0_state = USBD_EP0_STATUS_IN; 166 | 167 | /* Start the transfer */ 168 | USBD_LL_Transmit(pdev, 0x00U, NULL, 0U); 169 | 170 | return USBD_OK; 171 | } 172 | 173 | /** 174 | * @brief USBD_CtlReceiveStatus 175 | * receive zero lzngth packet on the ctl pipe 176 | * @param pdev: device instance 177 | * @retval status 178 | */ 179 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev) 180 | { 181 | /* Set EP0 State */ 182 | pdev->ep0_state = USBD_EP0_STATUS_OUT; 183 | 184 | /* Start the transfer */ 185 | USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 186 | 187 | return USBD_OK; 188 | } 189 | 190 | /** 191 | * @brief USBD_GetRxCount 192 | * returns the received data length 193 | * @param pdev: device instance 194 | * @param ep_addr: endpoint address 195 | * @retval Rx Data blength 196 | */ 197 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr) 198 | { 199 | return USBD_LL_GetRxDataSize(pdev, ep_addr); 200 | } 201 | 202 | /** 203 | * @} 204 | */ 205 | 206 | 207 | /** 208 | * @} 209 | */ 210 | 211 | 212 | /** 213 | * @} 214 | */ 215 | 216 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 217 | -------------------------------------------------------------------------------- /firmware/STM32F072C8Tx_FLASH.ld: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | ** 4 | 5 | ** File : LinkerScript.ld 6 | ** 7 | ** Author : Auto-generated by System Workbench for STM32 8 | ** 9 | ** Abstract : Linker script for STM32F072C8Tx series 10 | ** 64Kbytes FLASH and 16Kbytes RAM 11 | ** 12 | ** Set heap size, stack size and stack location according 13 | ** to application requirements. 14 | ** 15 | ** Set memory bank area and size if external memory is used. 16 | ** 17 | ** Target : STMicroelectronics STM32 18 | ** 19 | ** Distribution: The file is distributed “as is,” without any warranty 20 | ** of any kind. 21 | ** 22 | ***************************************************************************** 23 | ** @attention 24 | ** 25 | **

© COPYRIGHT(c) 2019 STMicroelectronics

26 | ** 27 | ** Redistribution and use in source and binary forms, with or without modification, 28 | ** are permitted provided that the following conditions are met: 29 | ** 1. Redistributions of source code must retain the above copyright notice, 30 | ** this list of conditions and the following disclaimer. 31 | ** 2. Redistributions in binary form must reproduce the above copyright notice, 32 | ** this list of conditions and the following disclaimer in the documentation 33 | ** and/or other materials provided with the distribution. 34 | ** 3. Neither the name of STMicroelectronics nor the names of its contributors 35 | ** may be used to endorse or promote products derived from this software 36 | ** without specific prior written permission. 37 | ** 38 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 39 | ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 40 | ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 41 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 42 | ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 43 | ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 44 | ** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 45 | ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 46 | ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 47 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | ** 49 | ***************************************************************************** 50 | */ 51 | 52 | /* Entry Point */ 53 | ENTRY(Reset_Handler) 54 | 55 | /* Highest address of the user mode stack */ 56 | _estack = 0x20004000; /* end of RAM */ 57 | /* Generate a link error if heap and stack don't fit into RAM */ 58 | _Min_Heap_Size = 0x200; /* required amount of heap */ 59 | _Min_Stack_Size = 0x400; /* required amount of stack */ 60 | 61 | /* Specify the memory areas */ 62 | MEMORY 63 | { 64 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K 65 | FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K 66 | } 67 | 68 | /* Define output sections */ 69 | SECTIONS 70 | { 71 | /* The startup code goes first into FLASH */ 72 | .isr_vector : 73 | { 74 | . = ALIGN(4); 75 | KEEP(*(.isr_vector)) /* Startup code */ 76 | . = ALIGN(4); 77 | } >FLASH 78 | 79 | /* The program code and other data goes into FLASH */ 80 | .text : 81 | { 82 | . = ALIGN(4); 83 | *(.text) /* .text sections (code) */ 84 | *(.text*) /* .text* sections (code) */ 85 | *(.glue_7) /* glue arm to thumb code */ 86 | *(.glue_7t) /* glue thumb to arm code */ 87 | *(.eh_frame) 88 | 89 | KEEP (*(.init)) 90 | KEEP (*(.fini)) 91 | 92 | . = ALIGN(4); 93 | _etext = .; /* define a global symbols at end of code */ 94 | } >FLASH 95 | 96 | /* Constant data goes into FLASH */ 97 | .rodata : 98 | { 99 | . = ALIGN(4); 100 | *(.rodata) /* .rodata sections (constants, strings, etc.) */ 101 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ 102 | . = ALIGN(4); 103 | } >FLASH 104 | 105 | .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH 106 | .ARM : { 107 | __exidx_start = .; 108 | *(.ARM.exidx*) 109 | __exidx_end = .; 110 | } >FLASH 111 | 112 | .preinit_array : 113 | { 114 | PROVIDE_HIDDEN (__preinit_array_start = .); 115 | KEEP (*(.preinit_array*)) 116 | PROVIDE_HIDDEN (__preinit_array_end = .); 117 | } >FLASH 118 | .init_array : 119 | { 120 | PROVIDE_HIDDEN (__init_array_start = .); 121 | KEEP (*(SORT(.init_array.*))) 122 | KEEP (*(.init_array*)) 123 | PROVIDE_HIDDEN (__init_array_end = .); 124 | } >FLASH 125 | .fini_array : 126 | { 127 | PROVIDE_HIDDEN (__fini_array_start = .); 128 | KEEP (*(SORT(.fini_array.*))) 129 | KEEP (*(.fini_array*)) 130 | PROVIDE_HIDDEN (__fini_array_end = .); 131 | } >FLASH 132 | 133 | /* used by the startup to initialize data */ 134 | _sidata = LOADADDR(.data); 135 | 136 | /* Initialized data sections goes into RAM, load LMA copy after code */ 137 | .data : 138 | { 139 | . = ALIGN(4); 140 | _sdata = .; /* create a global symbol at data start */ 141 | *(.data) /* .data sections */ 142 | *(.data*) /* .data* sections */ 143 | 144 | . = ALIGN(4); 145 | _edata = .; /* define a global symbol at data end */ 146 | } >RAM AT> FLASH 147 | 148 | 149 | /* Uninitialized data section */ 150 | . = ALIGN(4); 151 | .bss : 152 | { 153 | /* This is used by the startup in order to initialize the .bss secion */ 154 | _sbss = .; /* define a global symbol at bss start */ 155 | __bss_start__ = _sbss; 156 | *(.bss) 157 | *(.bss*) 158 | *(COMMON) 159 | 160 | . = ALIGN(4); 161 | _ebss = .; /* define a global symbol at bss end */ 162 | __bss_end__ = _ebss; 163 | } >RAM 164 | 165 | /* User_heap_stack section, used to check that there is enough RAM left */ 166 | ._user_heap_stack : 167 | { 168 | . = ALIGN(8); 169 | PROVIDE ( end = . ); 170 | PROVIDE ( _end = . ); 171 | . = . + _Min_Heap_Size; 172 | . = . + _Min_Stack_Size; 173 | . = ALIGN(8); 174 | } >RAM 175 | 176 | 177 | 178 | /* Remove information from the standard libraries */ 179 | /DISCARD/ : 180 | { 181 | libc.a ( * ) 182 | libm.a ( * ) 183 | libgcc.a ( * ) 184 | } 185 | 186 | .ARM.attributes 0 : { *(.ARM.attributes) } 187 | } 188 | 189 | 190 | -------------------------------------------------------------------------------- /firmware/USB_DEVICE/App/usb_device.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.c 5 | * @version : v2.0_Cube 6 | * @brief : This file implements the USB Device 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2021 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | 24 | #include "usb_device.h" 25 | #include "usbd_core.h" 26 | #include "usbd_desc.h" 27 | #include "usbd_cdc.h" 28 | #include "usbd_cdc_if.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* USER CODE BEGIN PV */ 35 | /* Private variables ---------------------------------------------------------*/ 36 | 37 | /* USER CODE END PV */ 38 | 39 | /* USER CODE BEGIN PFP */ 40 | /* Private function prototypes -----------------------------------------------*/ 41 | 42 | /* USER CODE END PFP */ 43 | 44 | /* USB Device Core handle declaration. */ 45 | USBD_HandleTypeDef hUsbDeviceFS; 46 | 47 | /* 48 | * -- Insert your variables declaration here -- 49 | */ 50 | /* USER CODE BEGIN 0 */ 51 | 52 | /* USER CODE END 0 */ 53 | 54 | /* 55 | * -- Insert your external function declaration here -- 56 | */ 57 | /* USER CODE BEGIN 1 */ 58 | 59 | /* USER CODE END 1 */ 60 | 61 | /** 62 | * Init USB device Library, add supported class and start the library 63 | * @retval None 64 | */ 65 | void MX_USB_DEVICE_Init(void) 66 | { 67 | /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */ 68 | 69 | /* USER CODE END USB_DEVICE_Init_PreTreatment */ 70 | 71 | /* Init Device Library, add supported class and start the library. */ 72 | if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK) 73 | { 74 | Error_Handler(); 75 | } 76 | if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC) != USBD_OK) 77 | { 78 | Error_Handler(); 79 | } 80 | if (USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS) != USBD_OK) 81 | { 82 | Error_Handler(); 83 | } 84 | if (USBD_Start(&hUsbDeviceFS) != USBD_OK) 85 | { 86 | Error_Handler(); 87 | } 88 | 89 | /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */ 90 | 91 | /* USER CODE END USB_DEVICE_Init_PostTreatment */ 92 | } 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 103 | -------------------------------------------------------------------------------- /firmware/USB_DEVICE/App/usb_device.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usb_device.h 5 | * @version : v2.0_Cube 6 | * @brief : Header for usb_device.c file. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2021 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __USB_DEVICE__H__ 24 | #define __USB_DEVICE__H__ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f0xx.h" 32 | #include "stm32f0xx_hal.h" 33 | #include "usbd_def.h" 34 | 35 | /* USER CODE BEGIN INCLUDE */ 36 | 37 | /* USER CODE END INCLUDE */ 38 | 39 | /** @addtogroup USBD_OTG_DRIVER 40 | * @{ 41 | */ 42 | 43 | /** @defgroup USBD_DEVICE USBD_DEVICE 44 | * @brief Device file for Usb otg low level driver. 45 | * @{ 46 | */ 47 | 48 | /** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables 49 | * @brief Public variables. 50 | * @{ 51 | */ 52 | 53 | /* Private variables ---------------------------------------------------------*/ 54 | /* USER CODE BEGIN PV */ 55 | 56 | /* USER CODE END PV */ 57 | 58 | /* Private function prototypes -----------------------------------------------*/ 59 | /* USER CODE BEGIN PFP */ 60 | 61 | /* USER CODE END PFP */ 62 | 63 | /* 64 | * -- Insert your variables declaration here -- 65 | */ 66 | /* USER CODE BEGIN VARIABLES */ 67 | 68 | /* USER CODE END VARIABLES */ 69 | /** 70 | * @} 71 | */ 72 | 73 | /** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype 74 | * @brief Declaration of public functions for Usb device. 75 | * @{ 76 | */ 77 | 78 | /** USB Device initialization function. */ 79 | void MX_USB_DEVICE_Init(void); 80 | 81 | /* 82 | * -- Insert functions declaration here -- 83 | */ 84 | /* USER CODE BEGIN FD */ 85 | 86 | /* USER CODE END FD */ 87 | /** 88 | * @} 89 | */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif /* __USB_DEVICE__H__ */ 104 | 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /firmware/USB_DEVICE/App/usbd_cdc_if.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usbd_cdc_if.h 5 | * @version : v2.0_Cube 6 | * @brief : Header for usbd_cdc_if.c file. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2021 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __USBD_CDC_IF_H__ 24 | #define __USBD_CDC_IF_H__ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "usbd_cdc.h" 32 | 33 | /* USER CODE BEGIN INCLUDE */ 34 | 35 | /* USER CODE END INCLUDE */ 36 | 37 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY 38 | * @brief For Usb device. 39 | * @{ 40 | */ 41 | 42 | /** @defgroup USBD_CDC_IF USBD_CDC_IF 43 | * @brief Usb VCP device module 44 | * @{ 45 | */ 46 | 47 | /** @defgroup USBD_CDC_IF_Exported_Defines USBD_CDC_IF_Exported_Defines 48 | * @brief Defines. 49 | * @{ 50 | */ 51 | /* Define size for the receive and transmit buffer over CDC */ 52 | #define APP_RX_DATA_SIZE 1000 53 | #define APP_TX_DATA_SIZE 1000 54 | /* USER CODE BEGIN EXPORTED_DEFINES */ 55 | 56 | /* USER CODE END EXPORTED_DEFINES */ 57 | 58 | /** 59 | * @} 60 | */ 61 | 62 | /** @defgroup USBD_CDC_IF_Exported_Types USBD_CDC_IF_Exported_Types 63 | * @brief Types. 64 | * @{ 65 | */ 66 | 67 | /* USER CODE BEGIN EXPORTED_TYPES */ 68 | 69 | /* USER CODE END EXPORTED_TYPES */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @defgroup USBD_CDC_IF_Exported_Macros USBD_CDC_IF_Exported_Macros 76 | * @brief Aliases. 77 | * @{ 78 | */ 79 | 80 | /* USER CODE BEGIN EXPORTED_MACRO */ 81 | 82 | /* USER CODE END EXPORTED_MACRO */ 83 | 84 | /** 85 | * @} 86 | */ 87 | 88 | /** @defgroup USBD_CDC_IF_Exported_Variables USBD_CDC_IF_Exported_Variables 89 | * @brief Public variables. 90 | * @{ 91 | */ 92 | 93 | /** CDC Interface callback. */ 94 | extern USBD_CDC_ItfTypeDef USBD_Interface_fops_FS; 95 | 96 | /* USER CODE BEGIN EXPORTED_VARIABLES */ 97 | 98 | /* USER CODE END EXPORTED_VARIABLES */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | /** @defgroup USBD_CDC_IF_Exported_FunctionsPrototype USBD_CDC_IF_Exported_FunctionsPrototype 105 | * @brief Public functions declaration. 106 | * @{ 107 | */ 108 | 109 | uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len); 110 | 111 | /* USER CODE BEGIN EXPORTED_FUNCTIONS */ 112 | 113 | /* USER CODE END EXPORTED_FUNCTIONS */ 114 | 115 | /** 116 | * @} 117 | */ 118 | 119 | /** 120 | * @} 121 | */ 122 | 123 | /** 124 | * @} 125 | */ 126 | 127 | #ifdef __cplusplus 128 | } 129 | #endif 130 | 131 | #endif /* __USBD_CDC_IF_H__ */ 132 | 133 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 134 | -------------------------------------------------------------------------------- /firmware/USB_DEVICE/App/usbd_desc.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usbd_desc.c 5 | * @version : v2.0_Cube 6 | * @brief : Header for usbd_conf.c file. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2021 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __USBD_DESC__C__ 23 | #define __USBD_DESC__C__ 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Includes ------------------------------------------------------------------*/ 30 | #include "usbd_def.h" 31 | 32 | /* USER CODE BEGIN INCLUDE */ 33 | 34 | /* USER CODE END INCLUDE */ 35 | 36 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY 37 | * @{ 38 | */ 39 | 40 | /** @defgroup USBD_DESC USBD_DESC 41 | * @brief Usb device descriptors module. 42 | * @{ 43 | */ 44 | 45 | /** @defgroup USBD_DESC_Exported_Constants USBD_DESC_Exported_Constants 46 | * @brief Constants. 47 | * @{ 48 | */ 49 | #define DEVICE_ID1 (UID_BASE) 50 | #define DEVICE_ID2 (UID_BASE + 0x4) 51 | #define DEVICE_ID3 (UID_BASE + 0x8) 52 | 53 | #define USB_SIZ_STRING_SERIAL 0x1A 54 | 55 | /* USER CODE BEGIN EXPORTED_CONSTANTS */ 56 | 57 | /* USER CODE END EXPORTED_CONSTANTS */ 58 | 59 | /** 60 | * @} 61 | */ 62 | 63 | /** @defgroup USBD_DESC_Exported_Defines USBD_DESC_Exported_Defines 64 | * @brief Defines. 65 | * @{ 66 | */ 67 | 68 | /* USER CODE BEGIN EXPORTED_DEFINES */ 69 | 70 | /* USER CODE END EXPORTED_DEFINES */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @defgroup USBD_DESC_Exported_TypesDefinitions USBD_DESC_Exported_TypesDefinitions 77 | * @brief Types. 78 | * @{ 79 | */ 80 | 81 | /* USER CODE BEGIN EXPORTED_TYPES */ 82 | 83 | /* USER CODE END EXPORTED_TYPES */ 84 | 85 | /** 86 | * @} 87 | */ 88 | 89 | /** @defgroup USBD_DESC_Exported_Macros USBD_DESC_Exported_Macros 90 | * @brief Aliases. 91 | * @{ 92 | */ 93 | 94 | /* USER CODE BEGIN EXPORTED_MACRO */ 95 | 96 | /* USER CODE END EXPORTED_MACRO */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /** @defgroup USBD_DESC_Exported_Variables USBD_DESC_Exported_Variables 103 | * @brief Public variables. 104 | * @{ 105 | */ 106 | 107 | /** Descriptor for the Usb device. */ 108 | extern USBD_DescriptorsTypeDef FS_Desc; 109 | 110 | /* USER CODE BEGIN EXPORTED_VARIABLES */ 111 | 112 | /* USER CODE END EXPORTED_VARIABLES */ 113 | 114 | /** 115 | * @} 116 | */ 117 | 118 | /** @defgroup USBD_DESC_Exported_FunctionsPrototype USBD_DESC_Exported_FunctionsPrototype 119 | * @brief Public functions declaration. 120 | * @{ 121 | */ 122 | 123 | /* USER CODE BEGIN EXPORTED_FUNCTIONS */ 124 | 125 | /* USER CODE END EXPORTED_FUNCTIONS */ 126 | 127 | /** 128 | * @} 129 | */ 130 | 131 | /** 132 | * @} 133 | */ 134 | 135 | /** 136 | * @} 137 | */ 138 | 139 | #ifdef __cplusplus 140 | } 141 | #endif 142 | 143 | #endif /* __USBD_DESC__C__ */ 144 | 145 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 146 | -------------------------------------------------------------------------------- /firmware/USB_DEVICE/Target/usbd_conf.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : usbd_conf.h 5 | * @version : v2.0_Cube 6 | * @brief : Header for usbd_conf.c file. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2021 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __USBD_CONF__H__ 24 | #define __USBD_CONF__H__ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include 32 | #include 33 | #include 34 | #include "main.h" 35 | #include "stm32f0xx.h" 36 | #include "stm32f0xx_hal.h" 37 | 38 | /* USER CODE BEGIN INCLUDE */ 39 | 40 | /* USER CODE END INCLUDE */ 41 | 42 | /** @addtogroup USBD_OTG_DRIVER 43 | * @{ 44 | */ 45 | 46 | /** @defgroup USBD_CONF USBD_CONF 47 | * @brief Configuration file for Usb otg low level driver. 48 | * @{ 49 | */ 50 | 51 | /** @defgroup USBD_CONF_Exported_Variables USBD_CONF_Exported_Variables 52 | * @brief Public variables. 53 | * @{ 54 | */ 55 | 56 | /** 57 | * @} 58 | */ 59 | 60 | /** @defgroup USBD_CONF_Exported_Defines USBD_CONF_Exported_Defines 61 | * @brief Defines for configuration of the Usb device. 62 | * @{ 63 | */ 64 | 65 | /*---------- -----------*/ 66 | #define USBD_MAX_NUM_INTERFACES 1 67 | /*---------- -----------*/ 68 | #define USBD_MAX_NUM_CONFIGURATION 1 69 | /*---------- -----------*/ 70 | #define USBD_MAX_STR_DESC_SIZ 512 71 | /*---------- -----------*/ 72 | #define USBD_DEBUG_LEVEL 0 73 | /*---------- -----------*/ 74 | #define USBD_SELF_POWERED 1 75 | /*---------- -----------*/ 76 | #define MAX_STATIC_ALLOC_SIZE 512 77 | 78 | /****************************************/ 79 | /* #define for FS and HS identification */ 80 | #define DEVICE_FS 0 81 | 82 | /** 83 | * @} 84 | */ 85 | 86 | /** @defgroup USBD_CONF_Exported_Macros USBD_CONF_Exported_Macros 87 | * @brief Aliases. 88 | * @{ 89 | */ 90 | 91 | /* Memory management macros */ 92 | 93 | /** Alias for memory allocation. */ 94 | #define USBD_malloc (uint32_t *)USBD_static_malloc 95 | 96 | /** Alias for memory release. */ 97 | #define USBD_free USBD_static_free 98 | 99 | /** Alias for memory set. */ 100 | #define USBD_memset /* Not used */ 101 | 102 | /** Alias for memory copy. */ 103 | #define USBD_memcpy /* Not used */ 104 | 105 | /** Alias for delay. */ 106 | #define USBD_Delay HAL_Delay 107 | 108 | /* DEBUG macros */ 109 | 110 | #if (USBD_DEBUG_LEVEL > 0) 111 | #define USBD_UsrLog(...) printf(__VA_ARGS__);\ 112 | printf("\n"); 113 | #else 114 | #define USBD_UsrLog(...) 115 | #endif 116 | 117 | #if (USBD_DEBUG_LEVEL > 1) 118 | 119 | #define USBD_ErrLog(...) printf("ERROR: ") ;\ 120 | printf(__VA_ARGS__);\ 121 | printf("\n"); 122 | #else 123 | #define USBD_ErrLog(...) 124 | #endif 125 | 126 | #if (USBD_DEBUG_LEVEL > 2) 127 | #define USBD_DbgLog(...) printf("DEBUG : ") ;\ 128 | printf(__VA_ARGS__);\ 129 | printf("\n"); 130 | #else 131 | #define USBD_DbgLog(...) 132 | #endif 133 | 134 | /** 135 | * @} 136 | */ 137 | 138 | /** @defgroup USBD_CONF_Exported_Types USBD_CONF_Exported_Types 139 | * @brief Types. 140 | * @{ 141 | */ 142 | 143 | /** 144 | * @} 145 | */ 146 | 147 | /** @defgroup USBD_CONF_Exported_FunctionsPrototype USBD_CONF_Exported_FunctionsPrototype 148 | * @brief Declaration of public functions for Usb device. 149 | * @{ 150 | */ 151 | 152 | /* Exported functions -------------------------------------------------------*/ 153 | void *USBD_static_malloc(uint32_t size); 154 | void USBD_static_free(void *p); 155 | /** 156 | * @} 157 | */ 158 | 159 | /** 160 | * @} 161 | */ 162 | 163 | /** 164 | * @} 165 | */ 166 | 167 | #ifdef __cplusplus 168 | } 169 | #endif 170 | 171 | #endif /* __USBD_CONF__H__ */ 172 | 173 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 174 | -------------------------------------------------------------------------------- /firmware/openocd.cfg: -------------------------------------------------------------------------------- 1 | source [find interface/jlink.cfg] 2 | transport select swd 3 | source [find target/stm32f0x.cfg] 4 | -------------------------------------------------------------------------------- /firmware/otter.jdebug.user: -------------------------------------------------------------------------------- 1 | 2 | GraphedExpression="temp_int" 3 | GraphedExpression="adc[4]", DisplayFormat=DISPLAY_FORMAT_DEC 4 | GraphedExpression="adc[5]", DisplayFormat=DISPLAY_FORMAT_DEC 5 | GraphedExpression="adc[3]", DisplayFormat=DISPLAY_FORMAT_DEC 6 | GraphedExpression="adc[2]", DisplayFormat=DISPLAY_FORMAT_DEC 7 | GraphedExpression="adc[1]", DisplayFormat=DISPLAY_FORMAT_DEC 8 | GraphedExpression="adc[0]", DisplayFormat=DISPLAY_FORMAT_DEC 9 | OpenDocument="main.c", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Src/main.c", Line=32 10 | OpenDocument="startup_stm32f072xb.s", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/startup_stm32f072xb.s", Line=37 11 | OpenDocument="system_stm32f0xx.c", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Core/Src/system_stm32f0xx.c", Line=113 12 | OpenDocument="stm32f0xx_hal_i2c_ex.c", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c", Line=160 13 | OpenDocument="stm32f0xx_hal_tim_ex.c", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c", Line=2041 14 | OpenDocument="stm32f0xx_hal_pcd_ex.c", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd_ex.c", Line=240 15 | OpenDocument="stm32f0xx_hal_spi.c", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c", Line=4033 16 | OpenDocument="stm32f0xx_hal_pcd.c", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pcd.c", Line=177 17 | OpenDocument="stm32f0xx_hal_tim.c", FilePath="/home/janamarie/Documents/AugmentalTech/temperature-logger/firmware/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c", Line=7071 18 | OpenToolbar="Debug", Floating=0, x=0, y=0 19 | OpenWindow="Registers 1", DockArea=RIGHT, x=0, y=2, w=931, h=76, FilterBarShown=0, ToolBarShown=0, FilteredItems=[], RefreshRate=1 20 | OpenWindow="Disassembly", DockArea=RIGHT, x=0, y=1, w=931, h=93, FilterBarShown=0, ToolBarShown=0, ExecCountersShown=0, InstEncodingsShown=0 21 | OpenWindow="Source", x=0, y=0, w=0, h=0, FilterBarShown=0, ToolBarShown=0, ExecCountersShown=0 22 | OpenWindow="Watched Data", DockArea=RIGHT, x=0, y=0, w=931, h=820, FilterBarShown=0, ToolBarShown=0 23 | OpenWindow="Functions", DockArea=LEFT, x=0, y=0, w=86, h=1001, FilterBarShown=1, ToolBarShown=0 24 | OpenWindow="Data Graph", DockArea=BOTTOM, x=0, y=0, w=1937, h=512, FilterBarShown=0, ToolBarShown=0, VisibleTab=2, SamplingFreq=0 Hz, ClearEvent=RESUME, LegendShown=0, UniformSampleSpacing=0, PinCursor=-1, TimePerDiv=1000000 25 | OpenWindow="Console", DockArea=BOTTOM, x=1, y=0, w=882, h=512, FilterBarShown=0, ToolBarShown=0 26 | TableHeader="Watched Data", SortCol="Expression", SortOrder="ASCENDING", VisibleCols=["Expression";"Value";"Location";"Refresh"], ColWidths=[314;308;68;241] 27 | TableHeader="Functions", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Address";"Size";"#Insts";"Source"], ColWidths=[27;112;22;27;254] 28 | TableHeader="Data Graph", SortCol="Index", SortOrder="ASCENDING", VisibleCols=["Index";"Time ";" temp_int";" adc[4]";" adc[5]";" adc[3]";" adc[2]";" adc[1]";" adc[0]"], ColWidths=[84;51;71;35;35;35;35;35;113] 29 | TableHeader="Data Graph", SortCol="Expression", SortOrder="DESCENDING", VisibleCols=["Expression";"Type";"Value";"Min";"Max";"Average";"# Changes";"Min. Change";"Max. Change"], ColWidths=[92;54;58;54;54;75;90;101;1358] 30 | TableHeader="Power Graph", SortCol="Index", SortOrder="ASCENDING", VisibleCols=["Index";"Time";"Channel 0"], ColWidths=[84;119;126] 31 | TableHeader="Registers 1", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Value";"Description"], ColWidths=[120;92;704] 32 | TableHeader="RegisterSelectionDialog", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Auto";"Name";"Address";"Description"], ColWidths=[27;27;27;27] 33 | WatchedExpression="tcnt", RefreshRate=2 34 | WatchedExpression="spidat", RefreshRate=5 35 | WatchedExpression="spidat32", RefreshRate=5 36 | WatchedExpression="tint", RefreshRate=2 37 | WatchedExpression="temp_int", RefreshRate=5, DisplayFormat=DISPLAY_FORMAT_DEC 38 | WatchedExpression="adc", RefreshRate=5 39 | WatchedExpression="tp", RefreshRate=5 40 | WatchedExpression="tsv_str" 41 | WatchedExpression="vadc" -------------------------------------------------------------------------------- /gerber/temperature-logger-B_Mask.gbs: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,6.0.2-378541a8eb~116~ubuntu20.04.1* 2 | G04 #@! TF.CreationDate,2022-03-01T13:47:02+01:00* 3 | G04 #@! TF.ProjectId,temperature-logger,74656d70-6572-4617-9475-72652d6c6f67,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Soldermask,Bot* 6 | G04 #@! TF.FilePolarity,Negative* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 6.0.2-378541a8eb~116~ubuntu20.04.1) date 2022-03-01 13:47:02* 10 | %MOMM*% 11 | %LPD*% 12 | G01* 13 | G04 APERTURE LIST* 14 | G04 Aperture macros list* 15 | %AMRoundRect* 16 | 0 Rectangle with rounded corners* 17 | 0 $1 Rounding radius* 18 | 0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners* 19 | 0 Add a 4 corners polygon primitive as box body* 20 | 4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0* 21 | 0 Add four circle primitives for the rounded corners* 22 | 1,1,$1+$1,$2,$3* 23 | 1,1,$1+$1,$4,$5* 24 | 1,1,$1+$1,$6,$7* 25 | 1,1,$1+$1,$8,$9* 26 | 0 Add four rect primitives between the rounded corners* 27 | 20,1,$1+$1,$2,$3,$4,$5,0* 28 | 20,1,$1+$1,$4,$5,$6,$7,0* 29 | 20,1,$1+$1,$6,$7,$8,$9,0* 30 | 20,1,$1+$1,$8,$9,$2,$3,0*% 31 | G04 Aperture macros list end* 32 | %ADD10C,3.500000*% 33 | %ADD11C,6.400000*% 34 | %ADD12C,0.800000*% 35 | %ADD13C,0.650000*% 36 | %ADD14O,1.000000X1.600000*% 37 | %ADD15O,1.000000X2.100000*% 38 | %ADD16RoundRect,0.250000X0.650000X1.550000X-0.650000X1.550000X-0.650000X-1.550000X0.650000X-1.550000X0*% 39 | %ADD17O,1.800000X3.600000*% 40 | %ADD18C,0.900000*% 41 | %ADD19RoundRect,0.250000X-0.650000X-1.550000X0.650000X-1.550000X0.650000X1.550000X-0.650000X1.550000X0*% 42 | %ADD20R,1.300000X0.700000*% 43 | %ADD21C,0.988060*% 44 | %ADD22C,0.985520*% 45 | %ADD23C,0.784860*% 46 | G04 APERTURE END LIST* 47 | D10* 48 | X142800000Y-81500000D03* 49 | X129200000Y-81500000D03* 50 | X143900000Y-95000000D03* 51 | X128100000Y-95000000D03* 52 | D11* 53 | X55000000Y-55000000D03* 54 | D12* 55 | X53302944Y-53302944D03* 56 | X53302944Y-56697056D03* 57 | X55000000Y-57400000D03* 58 | X56697056Y-53302944D03* 59 | X56697056Y-56697056D03* 60 | X55000000Y-52600000D03* 61 | X57400000Y-55000000D03* 62 | X52600000Y-55000000D03* 63 | X148600000Y-55000000D03* 64 | X152697056Y-53302944D03* 65 | X149302944Y-56697056D03* 66 | D11* 67 | X151000000Y-55000000D03* 68 | D12* 69 | X152697056Y-56697056D03* 70 | X151000000Y-57400000D03* 71 | X153400000Y-55000000D03* 72 | X149302944Y-53302944D03* 73 | X151000000Y-52600000D03* 74 | X56697056Y-96697056D03* 75 | X56697056Y-93302944D03* 76 | X55000000Y-92600000D03* 77 | X53302944Y-96697056D03* 78 | X57400000Y-95000000D03* 79 | X53302944Y-93302944D03* 80 | D11* 81 | X55000000Y-95000000D03* 82 | D12* 83 | X52600000Y-95000000D03* 84 | X55000000Y-97400000D03* 85 | D11* 86 | X151000000Y-95000000D03* 87 | D12* 88 | X152697056Y-96697056D03* 89 | X152697056Y-93302944D03* 90 | X148600000Y-95000000D03* 91 | X153400000Y-95000000D03* 92 | X151000000Y-92600000D03* 93 | X149302944Y-93302944D03* 94 | X149302944Y-96697056D03* 95 | X151000000Y-97400000D03* 96 | D13* 97 | X132110000Y-56305000D03* 98 | X137890000Y-56305000D03* 99 | D14* 100 | X130680000Y-52655000D03* 101 | D15* 102 | X139320000Y-56835000D03* 103 | X130680000Y-56835000D03* 104 | D14* 105 | X139320000Y-52655000D03* 106 | D10* 107 | X120800000Y-81500000D03* 108 | X107200000Y-81500000D03* 109 | X106100000Y-95000000D03* 110 | X121900000Y-95000000D03* 111 | X98800000Y-81500000D03* 112 | X85200000Y-81500000D03* 113 | X84100000Y-95000000D03* 114 | X99900000Y-95000000D03* 115 | X76800000Y-81500000D03* 116 | X63200000Y-81500000D03* 117 | X77900000Y-95000000D03* 118 | X62100000Y-95000000D03* 119 | D16* 120 | X110000000Y-58250000D03* 121 | D17* 122 | X106500000Y-58250000D03* 123 | X103000000Y-58250000D03* 124 | X99500000Y-58250000D03* 125 | X96000000Y-58250000D03* 126 | X92500000Y-58250000D03* 127 | D16* 128 | X85000000Y-58250000D03* 129 | D17* 130 | X81500000Y-58250000D03* 131 | X78000000Y-58250000D03* 132 | X74500000Y-58250000D03* 133 | D18* 134 | X123500000Y-52170000D03* 135 | X120500000Y-52170000D03* 136 | D19* 137 | X134250000Y-91700000D03* 138 | D17* 139 | X137750000Y-91700000D03* 140 | D19* 141 | X112250000Y-91700000D03* 142 | D17* 143 | X115750000Y-91700000D03* 144 | D19* 145 | X90250000Y-91700000D03* 146 | D17* 147 | X93750000Y-91700000D03* 148 | D19* 149 | X68250000Y-91700000D03* 150 | D17* 151 | X71750000Y-91700000D03* 152 | D20* 153 | X122000000Y-51300000D03* 154 | X122000000Y-53200000D03* 155 | D21* 156 | X127700000Y-51510000D03* 157 | D22* 158 | X128716000Y-56590000D03* 159 | X126684000Y-56590000D03* 160 | D23* 161 | X128335000Y-52780000D03* 162 | X127065000Y-52780000D03* 163 | X128335000Y-54050000D03* 164 | X127065000Y-54050000D03* 165 | X128335000Y-55320000D03* 166 | X127065000Y-55320000D03* 167 | M02* 168 | -------------------------------------------------------------------------------- /gerber/temperature-logger-B_Paste.gbp: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,6.0.2-378541a8eb~116~ubuntu20.04.1* 2 | G04 #@! TF.CreationDate,2022-03-01T13:47:01+01:00* 3 | G04 #@! TF.ProjectId,temperature-logger,74656d70-6572-4617-9475-72652d6c6f67,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Paste,Bot* 6 | G04 #@! TF.FilePolarity,Positive* 7 | %FSLAX46Y46*% 8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 9 | G04 Created by KiCad (PCBNEW 6.0.2-378541a8eb~116~ubuntu20.04.1) date 2022-03-01 13:47:01* 10 | %MOMM*% 11 | %LPD*% 12 | G01* 13 | G04 APERTURE LIST* 14 | %ADD10R,1.300000X0.700000*% 15 | G04 APERTURE END LIST* 16 | D10* 17 | X122000000Y-51300000D03* 18 | X122000000Y-53200000D03* 19 | M02* 20 | -------------------------------------------------------------------------------- /gerber/temperature-logger-Edge_Cuts.gm1: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,6.0.2-378541a8eb~116~ubuntu20.04.1* 2 | G04 #@! TF.CreationDate,2022-03-01T13:47:02+01:00* 3 | G04 #@! TF.ProjectId,temperature-logger,74656d70-6572-4617-9475-72652d6c6f67,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Profile,NP* 6 | %FSLAX46Y46*% 7 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 8 | G04 Created by KiCad (PCBNEW 6.0.2-378541a8eb~116~ubuntu20.04.1) date 2022-03-01 13:47:02* 9 | %MOMM*% 10 | %LPD*% 11 | G01* 12 | G04 APERTURE LIST* 13 | G04 #@! TA.AperFunction,Profile* 14 | %ADD10C,0.050000*% 15 | G04 #@! TD* 16 | G04 APERTURE END LIST* 17 | D10* 18 | X151000000Y-50000000D02* 19 | X55000000Y-50000000D01* 20 | X55000000Y-50000000D02* 21 | G75* 22 | G03* 23 | X50000000Y-55000000I0J-5000000D01* 24 | G01* 25 | X151000000Y-100000000D02* 26 | G75* 27 | G03* 28 | X156000000Y-95000000I0J5000000D01* 29 | G01* 30 | X116500000Y-55000000D02* 31 | G75* 32 | G03* 33 | X116500000Y-55000000I-1000000J0D01* 34 | G01* 35 | X156000000Y-55000000D02* 36 | G75* 37 | G03* 38 | X151000000Y-50000000I-5000000J0D01* 39 | G01* 40 | X68500000Y-55000000D02* 41 | G75* 42 | G03* 43 | X68500000Y-55000000I-1000000J0D01* 44 | G01* 45 | X156000000Y-95000000D02* 46 | X156000000Y-55000000D01* 47 | X55000000Y-100000000D02* 48 | X151000000Y-100000000D01* 49 | X50000000Y-55000000D02* 50 | X50000000Y-95000000D01* 51 | X50000000Y-95000000D02* 52 | G75* 53 | G03* 54 | X55000000Y-100000000I5000000J0D01* 55 | G01* 56 | X56000000Y-75000000D02* 57 | G75* 58 | G03* 59 | X56000000Y-75000000I-1000000J0D01* 60 | G01* 61 | X152000000Y-75000000D02* 62 | G75* 63 | G03* 64 | X152000000Y-75000000I-1000000J0D01* 65 | G01* 66 | M02* 67 | -------------------------------------------------------------------------------- /gerber/temperature-logger-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ; DRILL file {KiCad 6.0.2-378541a8eb~116~ubuntu20.04.1} date Tue 01 Mar 2022 01:47:03 PM CET 3 | ; FORMAT={-:-/ absolute / metric / decimal} 4 | ; #@! TF.CreationDate,2022-03-01T13:47:03+01:00 5 | ; #@! TF.GenerationSoftware,Kicad,Pcbnew,6.0.2-378541a8eb~116~ubuntu20.04.1 6 | ; #@! TF.FileFunction,NonPlated,1,4,NPTH 7 | FMAT,2 8 | METRIC 9 | ; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill 10 | T1C0.650 11 | ; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill 12 | T2C0.900 13 | ; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill 14 | T3C0.986 15 | ; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill 16 | T4C0.988 17 | % 18 | G90 19 | G05 20 | T1 21 | X132.11Y-56.305 22 | X137.89Y-56.305 23 | T2 24 | X120.5Y-52.17 25 | X123.5Y-52.17 26 | T3 27 | X126.684Y-56.59 28 | X128.716Y-56.59 29 | T4 30 | X127.7Y-51.51 31 | T0 32 | M30 33 | -------------------------------------------------------------------------------- /gerber/temperature-logger-PTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ; DRILL file {KiCad 6.0.2-378541a8eb~116~ubuntu20.04.1} date Tue 01 Mar 2022 01:47:03 PM CET 3 | ; FORMAT={-:-/ absolute / metric / decimal} 4 | ; #@! TF.CreationDate,2022-03-01T13:47:03+01:00 5 | ; #@! TF.GenerationSoftware,Kicad,Pcbnew,6.0.2-378541a8eb~116~ubuntu20.04.1 6 | ; #@! TF.FileFunction,Plated,1,4,PTH 7 | FMAT,2 8 | METRIC 9 | ; #@! TA.AperFunction,Plated,PTH,ViaDrill 10 | T1C0.300 11 | ; #@! TA.AperFunction,Plated,PTH,ComponentDrill 12 | T2C0.500 13 | ; #@! TA.AperFunction,Plated,PTH,ComponentDrill 14 | T3C0.600 15 | ; #@! TA.AperFunction,Plated,PTH,ComponentDrill 16 | T4C1.200 17 | ; #@! TA.AperFunction,Plated,PTH,ComponentDrill 18 | T5C1.770 19 | ; #@! TA.AperFunction,Plated,PTH,ComponentDrill 20 | T6C3.200 21 | % 22 | G90 23 | G05 24 | T1 25 | X60.975Y-65.5 26 | X61.1Y-68.825 27 | X61.575Y-71.7 28 | X61.875Y-68.2 29 | X62.375Y-79.0 30 | X62.425Y-76.5 31 | X62.675Y-67.3 32 | X62.775Y-64.8 33 | X63.875Y-61.9 34 | X63.875Y-79.0 35 | X63.975Y-69.1 36 | X63.975Y-73.5 37 | X64.375Y-83.9 38 | X65.775Y-75.3 39 | X65.775Y-81.0 40 | X65.875Y-70.4 41 | X66.075Y-68.7 42 | X66.275Y-66.8 43 | X66.575Y-75.9 44 | X66.775Y-77.8 45 | X66.825Y-70.25 46 | X66.875Y-63.4 47 | X67.375Y-79.8 48 | X67.875Y-70.1 49 | X68.075Y-73.7 50 | X68.075Y-75.3 51 | X69.375Y-73.6 52 | X70.845Y-73.015 53 | X72.675Y-79.8 54 | X73.175Y-75.2 55 | X73.275Y-73.1 56 | X73.875Y-55.2 57 | X73.975Y-61.1 58 | X74.025Y-76.95 59 | X74.075Y-81.3 60 | X74.475Y-70.9 61 | X74.775Y-75.2 62 | X75.675Y-79.1 63 | X75.675Y-83.9 64 | X76.275Y-58.0 65 | X76.475Y-61.1 66 | X77.075Y-63.1 67 | X77.575Y-51.4 68 | X78.875Y-75.2 69 | X79.575Y-54.8 70 | X79.775Y-58.0 71 | X79.775Y-60.0 72 | X80.675Y-74.4 73 | X81.875Y-76.4 74 | X82.105Y-78.87 75 | X82.375Y-63.2 76 | X82.475Y-70.9 77 | X82.575Y-55.8 78 | X83.075Y-80.1 79 | X83.275Y-58.0 80 | X83.575Y-53.8 81 | X83.925Y-71.45 82 | X83.975Y-77.4 83 | X84.375Y-75.4 84 | X85.975Y-78.2 85 | X86.175Y-83.8 86 | X86.289Y-71.303 87 | X87.575Y-80.5 88 | X87.78Y-75.95 89 | X88.075Y-69.7 90 | X88.275Y-50.6 91 | X88.675Y-75.9 92 | X88.775Y-77.8 93 | X90.075Y-75.3 94 | X91.375Y-73.68 95 | X92.825Y-72.51 96 | X92.875Y-69.7 97 | X93.175Y-61.6 98 | X93.375Y-54.3 99 | X93.975Y-64.2 100 | X94.225Y-53.15 101 | X95.075Y-50.6 102 | X95.275Y-73.1 103 | X95.275Y-75.2 104 | X95.275Y-78.0 105 | X96.025Y-76.95 106 | X96.475Y-69.3 107 | X96.475Y-80.5 108 | X96.575Y-66.1 109 | X96.875Y-54.2 110 | X96.875Y-61.2 111 | X96.875Y-75.2 112 | X97.175Y-67.1 113 | X97.275Y-68.0 114 | X97.375Y-65.7 115 | X97.475Y-83.9 116 | X97.575Y-79.0 117 | X97.775Y-58.2 118 | X98.175Y-68.6 119 | X99.075Y-67.1 120 | X99.375Y-64.7 121 | X99.575Y-62.3 122 | X100.875Y-69.7 123 | X100.975Y-75.3 124 | X101.275Y-58.2 125 | X101.675Y-68.6 126 | X102.075Y-55.9 127 | X102.675Y-74.45 128 | X102.875Y-64.7 129 | X103.075Y-62.3 130 | X103.875Y-76.6 131 | X104.105Y-78.77 132 | X104.375Y-69.8 133 | X104.575Y-50.7 134 | X104.575Y-54.1 135 | X105.075Y-80.2 136 | X105.175Y-68.6 137 | X105.975Y-77.3 138 | X107.575Y-62.0 139 | X107.975Y-70.2 140 | X107.975Y-75.3 141 | X107.975Y-78.0 142 | X108.175Y-84.0 143 | X108.525Y-64.9 144 | X108.675Y-64.0 145 | X108.975Y-70.2 146 | X109.775Y-80.3 147 | X109.78Y-76.0 148 | X110.775Y-77.8 149 | X111.175Y-50.7 150 | X111.175Y-54.1 151 | X112.075Y-52.36 152 | X112.475Y-75.8 153 | X113.375Y-66.1 154 | X113.375Y-70.2 155 | X113.375Y-73.68 156 | X113.975Y-51.3 157 | X113.975Y-53.3 158 | X114.275Y-61.0 159 | X114.875Y-59.97 160 | X115.075Y-67.9 161 | X115.275Y-64.3 162 | X115.675Y-58.2 163 | X115.675Y-69.8 164 | X116.775Y-59.3 165 | X116.775Y-75.8 166 | X117.075Y-51.3 167 | X117.075Y-53.2 168 | X117.075Y-78.0 169 | X117.275Y-73.1 170 | X117.325Y-68.75 171 | X118.042Y-61.421 172 | X118.075Y-76.95 173 | X118.275Y-54.4 174 | X118.275Y-71.3 175 | X118.575Y-80.4 176 | X118.675Y-75.9 177 | X118.698Y-61.0 178 | X118.875Y-56.2 179 | X119.175Y-63.4 180 | X119.411Y-61.316 181 | X119.675Y-79.2 182 | X119.775Y-69.5 183 | X119.775Y-84.1 184 | X119.875Y-68.6 185 | X120.375Y-61.5 186 | X120.475Y-55.2 187 | X120.825Y-65.55 188 | X120.975Y-64.65 189 | X120.975Y-71.4 190 | X121.075Y-56.5 191 | X121.075Y-68.4 192 | X121.075Y-69.5 193 | X121.075Y-75.2 194 | X121.875Y-55.9 195 | X121.975Y-63.2 196 | X122.175Y-61.4 197 | X122.375Y-54.3 198 | X122.375Y-65.2 199 | X122.375Y-68.4 200 | X122.375Y-69.5 201 | X122.375Y-71.2 202 | X122.475Y-59.1 203 | X122.775Y-79.8 204 | X122.975Y-59.9 205 | X123.215Y-64.34 206 | X123.275Y-53.9 207 | X123.275Y-70.02 208 | X124.018Y-67.257 209 | X124.375Y-61.4 210 | X124.375Y-63.2 211 | X124.725Y-74.45 212 | X125.175Y-72.4 213 | X125.335Y-56.72 214 | X125.475Y-55.32 215 | X125.575Y-69.45 216 | X125.675Y-79.8 217 | X125.775Y-70.9 218 | X125.775Y-76.3 219 | X126.095Y-78.77 220 | X126.375Y-65.2 221 | X126.375Y-67.9 222 | X126.575Y-70.15 223 | X126.675Y-75.5 224 | X126.975Y-72.5 225 | X127.875Y-60.5 226 | X128.0Y-71.453 227 | X128.025Y-69.15 228 | X128.375Y-66.7 229 | X128.375Y-75.5 230 | X128.775Y-58.2 231 | X129.475Y-75.5 232 | X129.575Y-68.5 233 | X129.875Y-78.1 234 | X129.975Y-77.0 235 | X130.075Y-65.0 236 | X130.175Y-76.05 237 | X130.275Y-63.0 238 | X130.375Y-83.8 239 | X130.475Y-71.4 240 | X131.275Y-68.5 241 | X131.475Y-60.5 242 | X131.675Y-80.4 243 | X131.775Y-70.4 244 | X131.975Y-75.7 245 | X132.075Y-62.6 246 | X132.575Y-66.8 247 | X132.775Y-77.8 248 | X133.0Y-62.55 249 | X133.375Y-64.9 250 | X133.575Y-66.8 251 | X133.575Y-69.9 252 | X134.075Y-75.3 253 | X134.775Y-66.8 254 | X134.975Y-68.5 255 | X135.0Y-59.7 256 | X135.0Y-61.8 257 | X135.375Y-73.68 258 | X136.6Y-61.325 259 | X136.755Y-60.35 260 | X137.075Y-75.3 261 | X137.275Y-70.5 262 | X138.175Y-73.8 263 | X138.475Y-62.4 264 | X138.975Y-59.1 265 | X138.975Y-64.0 266 | X138.975Y-78.0 267 | X139.275Y-65.8 268 | X139.275Y-73.1 269 | X139.875Y-75.1 270 | X139.975Y-78.0 271 | X140.075Y-76.95 272 | X140.175Y-63.0 273 | X140.375Y-80.5 274 | X140.575Y-65.8 275 | X140.575Y-67.0 276 | X141.175Y-60.4 277 | X141.175Y-64.1 278 | X141.675Y-79.3 279 | X141.675Y-83.8 280 | X141.825Y-72.05 281 | X141.825Y-77.55 282 | X142.175Y-67.0 283 | X142.475Y-69.2 284 | X142.655Y-70.49 285 | X143.275Y-67.1 286 | X143.325Y-69.514 287 | X145.325Y-72.05 288 | X145.325Y-77.55 289 | X145.575Y-60.9 290 | X148.325Y-72.05 291 | X148.325Y-77.55 292 | T2 293 | X52.6Y-55.0 294 | X52.6Y-95.0 295 | X53.303Y-53.303 296 | X53.303Y-56.697 297 | X53.303Y-93.303 298 | X53.303Y-96.697 299 | X55.0Y-52.6 300 | X55.0Y-57.4 301 | X55.0Y-92.6 302 | X55.0Y-97.4 303 | X56.697Y-53.303 304 | X56.697Y-56.697 305 | X56.697Y-93.303 306 | X56.697Y-96.697 307 | X57.4Y-55.0 308 | X57.4Y-95.0 309 | X148.6Y-55.0 310 | X148.6Y-95.0 311 | X149.303Y-53.303 312 | X149.303Y-56.697 313 | X149.303Y-93.303 314 | X149.303Y-96.697 315 | X151.0Y-52.6 316 | X151.0Y-57.4 317 | X151.0Y-92.6 318 | X151.0Y-97.4 319 | X152.697Y-53.303 320 | X152.697Y-56.697 321 | X152.697Y-93.303 322 | X152.697Y-96.697 323 | X153.4Y-55.0 324 | X153.4Y-95.0 325 | T4 326 | X68.25Y-91.7 327 | X71.75Y-91.7 328 | X74.5Y-58.25 329 | X78.0Y-58.25 330 | X81.5Y-58.25 331 | X85.0Y-58.25 332 | X90.25Y-91.7 333 | X92.5Y-58.25 334 | X93.75Y-91.7 335 | X96.0Y-58.25 336 | X99.5Y-58.25 337 | X103.0Y-58.25 338 | X106.5Y-58.25 339 | X110.0Y-58.25 340 | X112.25Y-91.7 341 | X115.75Y-91.7 342 | X134.25Y-91.7 343 | X137.75Y-91.7 344 | T5 345 | X62.1Y-95.0 346 | X63.2Y-81.5 347 | X76.8Y-81.5 348 | X77.9Y-95.0 349 | X84.1Y-95.0 350 | X85.2Y-81.5 351 | X98.8Y-81.5 352 | X99.9Y-95.0 353 | X106.1Y-95.0 354 | X107.2Y-81.5 355 | X120.8Y-81.5 356 | X121.9Y-95.0 357 | X128.1Y-95.0 358 | X129.2Y-81.5 359 | X142.8Y-81.5 360 | X143.9Y-95.0 361 | T6 362 | X55.0Y-55.0 363 | X55.0Y-95.0 364 | X151.0Y-55.0 365 | X151.0Y-95.0 366 | T3 367 | X130.68Y-52.955G85X130.68Y-52.355 368 | G05 369 | X130.68Y-57.385G85X130.68Y-56.285 370 | G05 371 | X139.32Y-52.955G85X139.32Y-52.355 372 | G05 373 | X139.32Y-57.385G85X139.32Y-56.285 374 | G05 375 | T0 376 | M30 377 | -------------------------------------------------------------------------------- /images/README.md: -------------------------------------------------------------------------------- 1 | ![front](images/front.jpg) 2 | ![open](images/open.jpg) 3 | ![inputs](images/inputs.jpg) 4 | ![back](images/back.jpg) 5 | ![front_connected](images/front_connected.jpg) 6 | ![front_sakura](images/front_sakura.jpg) 7 | -------------------------------------------------------------------------------- /images/back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/images/back.jpg -------------------------------------------------------------------------------- /images/front.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/images/front.jpg -------------------------------------------------------------------------------- /images/front_connected.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/images/front_connected.jpg -------------------------------------------------------------------------------- /images/front_sakura.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/images/front_sakura.jpg -------------------------------------------------------------------------------- /images/inputs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/images/inputs.jpg -------------------------------------------------------------------------------- /images/open.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/images/open.jpg -------------------------------------------------------------------------------- /outfiles/Untitled.scad: -------------------------------------------------------------------------------- 1 | linear_extrude(height = 10, center = true, convexity = 100) 2 | import (file = "temperature-logger-brd.dxf"); -------------------------------------------------------------------------------- /outfiles/part.FCStd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/outfiles/part.FCStd -------------------------------------------------------------------------------- /outfiles/part.FCStd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/outfiles/part.FCStd1 -------------------------------------------------------------------------------- /outfiles/text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 39 | 41 | 42 | 44 | image/svg+xml 45 | 47 | 48 | 49 | 50 | 51 | 55 | 66 | USB-Temperature-Loggerby Jana Marie Hemsing2021-10 v1.0 90 | USB-Temperature-Loggerby Jana Marie Hemsing2021-10 v1.0github.com/Jana-Marie/usb-temperature-logger 119 | 120 | 121 | -------------------------------------------------------------------------------- /outfiles/text856-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/outfiles/text856-3.png -------------------------------------------------------------------------------- /outfiles/text856.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/outfiles/text856.png -------------------------------------------------------------------------------- /temperature-logger-backups/temperature-logger-2022-01-19_162959.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/temperature-logger-backups/temperature-logger-2022-01-19_162959.zip -------------------------------------------------------------------------------- /temperature-logger.csv: -------------------------------------------------------------------------------- 1 | Comment,Designator,Footprint,LCSC 2 | "100n","C12,C7,C10,C11,C1,C2,C3,C4,C5,C24,C13,C15,C17,C19","otter:C_0402","" 3 | "10n","C14,C26,C16,C28,C18,C30,C20,C32","otter:C_0402","" 4 | "DNP","C22","otter:C_0603","" 5 | "DNP","C25,C33,C27,C34,C29,C35,C31,C36,C23,C21","otter:C_0402","" 6 | "1uF","C8,C9,C6","otter:C_0603","" 7 | "GREEN","D10,D2,D4,D6,D8,D14,D13,D12","otter:LED_0603_1608Metric","" 8 | "BLUE","D11","otter:LED_0603_1608Metric","" 9 | "RED","D9,D1,D3,D5,D7","otter:LED_0603_1608Metric","" 10 | "FERRET","FB2,FB1,FB4,FB3,FB6,FB5,FB8,FB7","otter:L_0402","" 11 | "M3","H1,H2,H3,H4","MountingHole:MountingHole_3.2mm_M3_Pad_Via","" 12 | "USB","J1","otter:USB-C 16Pin","" 13 | "THERMOCOUPLE","J2,J3,J4,J5","otter:PCC-SMP","" 14 | "OUT","J6","Connector_Phoenix_MC:PhoenixContact_MC_1,5_6-G-3.5_1x06_P3.50mm_Horizontal","" 15 | "I2C","J7","Connector_Phoenix_MC:PhoenixContact_MC_1,5_4-G-3.5_1x04_P3.50mm_Horizontal","" 16 | "DNP","J8,J9,J10,J11","otter:PhoenixContact_MC_1,5_2-G-3.5_1x02_P3.50mm_Horizontal","" 17 | "DFU","JP1","otter:R_0805","" 18 | "TC2030","P1","otter:TC2030","" 19 | "2N7002","Q1,Q3,Q5","Package_TO_SOT_SMD:SOT-23","" 20 | "BC817","Q2,Q4,Q6","Package_TO_SOT_SMD:SOT-23","" 21 | "5k1","R1,R2,R3,R27,R28,R16,R17","otter:R_0402","" 22 | "220","R24,R25,R26,R4,R5,R7,R8,R10,R11,R13,R14,R19,R18,R21,R20,R23,R22,R59,R58,R57","otter:R_0402","" 23 | "DNP","R35,R33,R29,R32,R31,R34,R30,R42,R40,R36,R39,R38,R41,R37,R49,R47,R43,R46,R45,R48,R44,R56,R54,R50,R53,R52,R55,R51","otter:R_0402","" 24 | "10","R6,R9,R12,R15","otter:R_0402","" 25 | "SCPI_CSV","SW1","Button_Switch_SMD:SW_SPDT_PCM12","" 26 | "NTC","TH1","otter:R_0603","" 27 | "USBLC6-4","U1,U13","Package_TO_SOT_SMD:SOT-23-6","" 28 | "AP2204R-3.3","U2","Package_TO_SOT_SMD:SOT-89-3","" 29 | "STM32F072C8Tx","U3","Package_QFP:LQFP-48_7x7mm_P0.5mm","" 30 | "MAX31855KASA","U4,U5,U6,U7","Package_SO:SOIC-8_3.9x4.9mm_P1.27mm","" 31 | "DRV8837","U8","Package_SON:WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm","" 32 | "TLV9001","U9,U10,U11,U12","Package_TO_SOT_SMD:SOT-23-5","" -------------------------------------------------------------------------------- /temperature-logger.kicad_prl: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "active_layer": 0, 4 | "active_layer_preset": "", 5 | "auto_track_width": true, 6 | "hidden_nets": [], 7 | "high_contrast_mode": 0, 8 | "net_color_mode": 1, 9 | "opacity": { 10 | "pads": 1.0, 11 | "tracks": 1.0, 12 | "vias": 1.0, 13 | "zones": 0.6 14 | }, 15 | "ratsnest_display_mode": 0, 16 | "selection_filter": { 17 | "dimensions": true, 18 | "footprints": true, 19 | "graphics": true, 20 | "keepouts": true, 21 | "lockedItems": true, 22 | "otherItems": true, 23 | "pads": true, 24 | "text": true, 25 | "tracks": true, 26 | "vias": true, 27 | "zones": true 28 | }, 29 | "visible_items": [ 30 | 0, 31 | 1, 32 | 2, 33 | 3, 34 | 4, 35 | 5, 36 | 8, 37 | 9, 38 | 10, 39 | 11, 40 | 12, 41 | 13, 42 | 14, 43 | 15, 44 | 16, 45 | 17, 46 | 18, 47 | 19, 48 | 20, 49 | 21, 50 | 22, 51 | 23, 52 | 24, 53 | 25, 54 | 26, 55 | 27, 56 | 28, 57 | 29, 58 | 30, 59 | 32, 60 | 33, 61 | 34, 62 | 35, 63 | 36 64 | ], 65 | "visible_layers": "000ffff_80000007", 66 | "zone_display_mode": 0 67 | }, 68 | "meta": { 69 | "filename": "temperature-logger.kicad_prl", 70 | "version": 3 71 | }, 72 | "project": { 73 | "files": [] 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /temperature-logger.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jana-Marie/temperature-logger/fa80da42b0d462c2c5406b45c135e0b280243b2a/temperature-logger.pdf --------------------------------------------------------------------------------