├── firmware └── Project │ ├── API │ ├── api_gpio.c │ ├── api_spi.c │ ├── api_tim.h │ ├── api_gpio.h │ ├── api_sys.h │ ├── api_sys.c │ ├── api_task.h │ ├── api_tim.c │ ├── api_uart.h │ ├── api_spi.h │ ├── api_task.c │ └── api_uart.c │ ├── EWARM │ ├── settings │ │ ├── Project.wspos │ │ ├── Project.crun │ │ ├── Project.Project.driver.xcl │ │ ├── Project.Project.general.xcl │ │ ├── Project_Project.jlink │ │ ├── Project.Project.cspy.bat │ │ ├── Project.dni │ │ ├── Project.wsdt │ │ └── Project.dbgdt │ ├── Project │ │ ├── Obj │ │ │ ├── main.pbi │ │ │ ├── Project.pbd │ │ │ ├── api_gpio.pbi │ │ │ ├── api_spi.pbi │ │ │ ├── api_sys.pbi │ │ │ ├── api_task.pbi │ │ │ ├── api_tim.pbi │ │ │ ├── api_uart.pbi │ │ │ ├── apl_task.pbi │ │ │ ├── bsp_key.pbi │ │ │ ├── bsp_hub75.pbi │ │ │ ├── bsp_w25qx.pbi │ │ │ ├── apl_font_text.pbi │ │ │ ├── apl_key_menu.pbi │ │ │ ├── apl_sys_data.pbi │ │ │ ├── apl_uart_link.pbi │ │ │ ├── stm32f1xx_hal.pbi │ │ │ ├── stm32f1xx_it.pbi │ │ │ ├── Project.pbd.browse │ │ │ ├── apl_led_matrix.pbi │ │ │ ├── stm32f1xx_hal_crc.pbi │ │ │ ├── stm32f1xx_hal_dma.pbi │ │ │ ├── stm32f1xx_hal_exti.pbi │ │ │ ├── stm32f1xx_hal_gpio.pbi │ │ │ ├── stm32f1xx_hal_msp.pbi │ │ │ ├── stm32f1xx_hal_pcd.pbi │ │ │ ├── stm32f1xx_hal_pwr.pbi │ │ │ ├── stm32f1xx_hal_rcc.pbi │ │ │ ├── stm32f1xx_hal_rtc.pbi │ │ │ ├── stm32f1xx_hal_spi.pbi │ │ │ ├── stm32f1xx_hal_tim.pbi │ │ │ ├── stm32f1xx_hal_uart.pbi │ │ │ ├── stm32f1xx_ll_usb.pbi │ │ │ ├── system_stm32f1xx.pbi │ │ │ ├── stm32f1xx_hal_cortex.pbi │ │ │ ├── stm32f1xx_hal_flash.pbi │ │ │ ├── stm32f1xx_hal_pcd_ex.pbi │ │ │ ├── stm32f1xx_hal_rcc_ex.pbi │ │ │ ├── stm32f1xx_hal_rtc_ex.pbi │ │ │ ├── stm32f1xx_hal_tim_ex.pbi │ │ │ ├── stm32f1xx_hal_flash_ex.pbi │ │ │ ├── stm32f1xx_hal_gpio_ex.pbi │ │ │ └── Project.pbd.linf │ │ └── Exe │ │ │ └── Project.sim │ ├── Project.eww │ ├── stm32f103xb_flash.icf │ └── stm32f103xb_sram.icf │ ├── FONT │ ├── GBK12.FON │ ├── GBK16.FON │ └── GBK24.FON │ ├── Drivers │ ├── CMSIS │ │ ├── Device │ │ │ └── ST │ │ │ │ └── STM32F1xx │ │ │ │ └── Include │ │ │ │ ├── stm32f103xb.h │ │ │ │ ├── stm32f1xx.h │ │ │ │ └── system_stm32f1xx.h │ │ └── Include │ │ │ ├── cmsis_version.h │ │ │ └── tz_context.h │ └── STM32F1xx_HAL_Driver │ │ ├── License.md │ │ ├── Inc │ │ ├── stm32f1xx_hal_pcd_ex.h │ │ ├── stm32f1xx_hal_crc.h │ │ └── stm32f1xx_ll_crc.h │ │ └── Src │ │ └── stm32f1xx_hal_gpio_ex.c │ ├── APL │ ├── apl_led_matrix.h │ ├── apl_task.h │ ├── apl_uart_link.h │ ├── includes.h │ ├── apl_key_menu.h │ ├── apl_sys_data.h │ ├── apl_led_matrix.c │ ├── apl_sys_data.c │ ├── apl_font_text.h │ └── apl_task.c │ ├── BSP │ ├── bsp_key.h │ ├── bsp_key.c │ ├── bsp_w25qx.h │ ├── bsp_hub75.h │ └── bsp_w25qx.c │ └── Inc │ ├── stm32f1xx_it.h │ └── main.h ├── images ├── pwmbcm.gif ├── scan116.gif ├── Tiny Matrix.png ├── imageplanes.png ├── stm32minisystem.jpg ├── HUB75-E interface.png ├── ezgif-4-36eb6aafa0.gif ├── led_matrix_eagle_1.png ├── led_matrix_eagle_2.png ├── led_matrix_step_3.png ├── led_matrix_step_4.png └── Led Matrix Controller.png ├── hardware ├── LED_Matrix_Control │ ├── Eagle_PCB_File │ │ ├── CAM │ │ │ ├── CAMOutputs │ │ │ │ ├── Assembly │ │ │ │ │ ├── PnP_led_matrix_back.txt │ │ │ │ │ ├── PnP_led_matrix_front.txt │ │ │ │ │ └── led_matrix.txt │ │ │ │ ├── GerberFiles │ │ │ │ │ ├── silkscreen_bottom.gbr │ │ │ │ │ ├── solderpaste_bottom.gbr │ │ │ │ │ ├── gerber_job.gbrjob │ │ │ │ │ ├── drill_1_16.xln │ │ │ │ │ ├── solderpaste_top.gbr │ │ │ │ │ ├── soldermask_bottom.gbr │ │ │ │ │ └── soldermask_top.gbr │ │ │ │ └── DrillFiles │ │ │ │ │ └── drill_1_16.xln │ │ │ └── CAMOutputs.rar │ │ ├── led_matrix.pdf │ │ └── led_matrix.png │ └── KiCad_EDA_File │ │ ├── led_matrix-eagle-import.dcm │ │ ├── fp-lib-table │ │ ├── sym-lib-table │ │ ├── empty.kicad_wks │ │ ├── led_matrix.pro │ │ └── led_matrix.pretty │ │ ├── 3,0.kicad_mod │ │ ├── CHIP-LED0805.kicad_mod │ │ ├── ESD_10.00.kicad_mod │ │ ├── DO214AC.kicad_mod │ │ ├── C0805.kicad_mod │ │ ├── R0805.kicad_mod │ │ ├── L4532P.kicad_mod │ │ ├── OSHW-LOGO-L.kicad_mod │ │ ├── 153CLV-0605.kicad_mod │ │ ├── TL4XPO.kicad_mod │ │ ├── B2B-XH-A.kicad_mod │ │ ├── SOIC-8.kicad_mod │ │ ├── TO263-5.kicad_mod │ │ ├── NINIGI4C.kicad_mod │ │ ├── 1X04.kicad_mod │ │ ├── SPC4077.kicad_mod │ │ └── B3F-10XX.kicad_mod └── STM32_Core_Board │ ├── CAMOutputs │ ├── STM32_Core_Board-NPTH.drl │ ├── STM32_Core_Board-Edge_Cuts.gbr │ ├── STM32_Core_Board-PTH.drl │ └── STM32_Core_Board-job.gbrjob │ └── STM32_Core_Board.pro ├── .gitignore ├── LICENSE └── README.md /firmware/Project/API/api_gpio.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | -------------------------------------------------------------------------------- /images/pwmbcm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/pwmbcm.gif -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/Assembly/PnP_led_matrix_back.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/scan116.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/scan116.gif -------------------------------------------------------------------------------- /images/Tiny Matrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/Tiny Matrix.png -------------------------------------------------------------------------------- /images/imageplanes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/imageplanes.png -------------------------------------------------------------------------------- /firmware/Project/EWARM/settings/Project.wspos: -------------------------------------------------------------------------------- 1 | [MainWindow] 2 | WindowPlacement=_ 129 120 1569 879 3 3 | -------------------------------------------------------------------------------- /images/stm32minisystem.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/stm32minisystem.jpg -------------------------------------------------------------------------------- /images/HUB75-E interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/HUB75-E interface.png -------------------------------------------------------------------------------- /images/ezgif-4-36eb6aafa0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/ezgif-4-36eb6aafa0.gif -------------------------------------------------------------------------------- /images/led_matrix_eagle_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/led_matrix_eagle_1.png -------------------------------------------------------------------------------- /images/led_matrix_eagle_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/led_matrix_eagle_2.png -------------------------------------------------------------------------------- /images/led_matrix_step_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/led_matrix_step_3.png -------------------------------------------------------------------------------- /images/led_matrix_step_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/led_matrix_step_4.png -------------------------------------------------------------------------------- /firmware/Project/FONT/GBK12.FON: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/FONT/GBK12.FON -------------------------------------------------------------------------------- /firmware/Project/FONT/GBK16.FON: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/FONT/GBK16.FON -------------------------------------------------------------------------------- /firmware/Project/FONT/GBK24.FON: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/FONT/GBK24.FON -------------------------------------------------------------------------------- /images/Led Matrix Controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/images/Led Matrix Controller.png -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix-eagle-import.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/main.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/main.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Exe/Project.sim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Exe/Project.sim -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/Project.pbd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/Project.pbd -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/api_gpio.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/api_gpio.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/api_spi.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/api_spi.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/api_sys.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/api_sys.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/api_task.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/api_task.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/api_tim.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/api_tim.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/api_uart.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/api_uart.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/apl_task.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/apl_task.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/bsp_key.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/bsp_key.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/bsp_hub75.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/bsp_hub75.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/bsp_w25qx.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/bsp_w25qx.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/apl_font_text.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/apl_font_text.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/apl_key_menu.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/apl_key_menu.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/apl_sys_data.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/apl_sys_data.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/apl_uart_link.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/apl_uart_link.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_it.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_it.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/Project.pbd.browse: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/Project.pbd.browse -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/apl_led_matrix.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/apl_led_matrix.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_crc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_crc.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_dma.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_dma.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_exti.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_exti.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_gpio.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_gpio.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_msp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_msp.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_pcd.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_pcd.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_pwr.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_pwr.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_rcc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_rcc.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_rtc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_rtc.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_spi.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_spi.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_tim.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_tim.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_uart.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_uart.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_ll_usb.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_ll_usb.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/system_stm32f1xx.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/system_stm32f1xx.pbi -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/led_matrix.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/hardware/LED_Matrix_Control/Eagle_PCB_File/led_matrix.pdf -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/led_matrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/hardware/LED_Matrix_Control/Eagle_PCB_File/led_matrix.png -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_cortex.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_cortex.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_flash.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_flash.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_pcd_ex.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_pcd_ex.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_rcc_ex.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_rcc_ex.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_rtc_ex.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_rtc_ex.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_tim_ex.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_tim_ex.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_flash_ex.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_flash_ex.pbi -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_gpio_ex.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/EWARM/Project/Obj/stm32f1xx_hal_gpio_ex.pbi -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs.rar -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name led_matrix)(type KiCad)(uri "$(KIPRJMOD)/led_matrix.pretty")(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /firmware/Project/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h -------------------------------------------------------------------------------- /firmware/Project/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkjl/TinyMatrix/HEAD/firmware/Project/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project.eww: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $WS_DIR$\Project.ewp 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/sym-lib-table: -------------------------------------------------------------------------------- 1 | (sym_lib_table 2 | (lib (name led_matrix-eagle-import)(type Legacy)(uri ${KIPRJMOD}/led_matrix-eagle-import.lib)(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/empty.kicad_wks: -------------------------------------------------------------------------------- 1 | (page_layout 2 | (setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15) 3 | (left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10)) 4 | (line (name segm1:Line) (start 0 0) (end 0 0)) 5 | ) 6 | -------------------------------------------------------------------------------- /firmware/Project/API/api_spi.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | void api_spi_init(void) 4 | { 5 | SPI1_CS1_H(); 6 | SPI1_CS2_H(); 7 | SPI1_CS3_H(); 8 | 9 | SPI2_CS0_H(); 10 | SPI2_CS1_H(); 11 | SPI2_CS2_H(); 12 | SPI2_CS3_H(); 13 | 14 | } 15 | 16 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/GerberFiles/silkscreen_bottom.gbr: -------------------------------------------------------------------------------- 1 | G04 EAGLE Gerber RS-274X export* 2 | G75* 3 | %MOMM*% 4 | %FSLAX34Y34*% 5 | %LPD*% 6 | %INSilkscreen Bottom*% 7 | %IPPOS*% 8 | %AMOC8* 9 | 5,1,8,0,0,1.08239X$1,22.5*% 10 | G01* 11 | 12 | 13 | M02* 14 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/GerberFiles/solderpaste_bottom.gbr: -------------------------------------------------------------------------------- 1 | G04 EAGLE Gerber RS-274X export* 2 | G75* 3 | %MOMM*% 4 | %FSLAX34Y34*% 5 | %LPD*% 6 | %INSolderpaste Bottom*% 7 | %IPPOS*% 8 | %AMOC8* 9 | 5,1,8,0,0,1.08239X$1,22.5*% 10 | G01* 11 | 12 | 13 | M02* 14 | -------------------------------------------------------------------------------- /firmware/Project/API/api_tim.h: -------------------------------------------------------------------------------- 1 | #ifndef __API_TIM_H_ 2 | #define __API_TIM_H_ 3 | 4 | extern TIM_HandleTypeDef htim2; 5 | extern uint8_t tim2_is_up; 6 | 7 | void api_tim_start(void); 8 | void api_tim_stop(void); 9 | void api_tim_handle(void); 10 | 11 | #endif /* __API_TIM_H_ */ 12 | 13 | -------------------------------------------------------------------------------- /firmware/Project/APL/apl_led_matrix.h: -------------------------------------------------------------------------------- 1 | #ifndef __APL_LED_MATRIX_H_ 2 | #define __APL_LED_MATRIX_H_ 3 | 4 | void apl_led_matrix_write_pixel(uint16_t x, uint16_t y, uint8_t color); 5 | uint8_t apl_led_matrix_read_pixel(uint16_t x, uint16_t y); 6 | void apl_led_matrix_left_shift(uint16_t y, uint16_t height, uint16_t count); 7 | 8 | #endif /* __APL_LED_MATRIX_H_ */ 9 | 10 | -------------------------------------------------------------------------------- /hardware/STM32_Core_Board/CAMOutputs/STM32_Core_Board-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ; DRILL file {KiCad (5.1.9)-1} date 02/16/21 15:23:04 3 | ; FORMAT={-:-/ absolute / inch / decimal} 4 | ; #@! TF.CreationDate,2021-02-16T15:23:04+08:00 5 | ; #@! TF.GenerationSoftware,Kicad,Pcbnew,(5.1.9)-1 6 | ; #@! TF.FileFunction,NonPlated,1,2,NPTH 7 | FMAT,2 8 | INCH 9 | % 10 | G90 11 | G05 12 | T0 13 | M30 14 | -------------------------------------------------------------------------------- /firmware/Project/API/api_gpio.h: -------------------------------------------------------------------------------- 1 | #ifndef __API_GPIO_H_ 2 | #define __API_GPIO_H_ 3 | 4 | /* gpio definition */ 5 | 6 | #define LED1_ON() HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_RESET) 7 | #define LED1_OFF() HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_SET) 8 | #define LED1_TOGGLE() HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin) 9 | 10 | #endif /* __API_GPIO_H_ */ 11 | 12 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/settings/Project.crun: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | 7 | * 8 | * 9 | * 10 | 0 11 | 1 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /firmware/Project/API/api_sys.h: -------------------------------------------------------------------------------- 1 | #ifndef __API_SYS_H_ 2 | #define __API_SYS_H_ 3 | 4 | 5 | #define delay_ms(x) HAL_Delay(x) 6 | /* iar delay */ 7 | #define CPU_F (double)(72000000u) //MCLK:72MHZ 8 | //#define delay_us(x) __delay_cycles((unsigned long)(CPU_F * (double)x / 1000000.0)) 9 | //#define delay_ms(x) __delay_cycles((unsigned long)(CPU_F * (double)x / 1000.0)) 10 | void delay_us(uint32_t n_us); 11 | 12 | 13 | #endif /* __API_SYS_H_ */ 14 | 15 | -------------------------------------------------------------------------------- /firmware/Project/APL/apl_task.h: -------------------------------------------------------------------------------- 1 | #ifndef __APL_TASK_H_ 2 | #define __APL_TASK_H_ 3 | 4 | void Task_Handle(void); 5 | void Task_Start(void); 6 | 7 | void Task_SysdataHandle(void); 8 | void Task_MatrixDisplay(void); 9 | void Task_MatrixTest(void); 10 | void Task_LED1(void); 11 | void Task_KeyScan(void); 12 | void Task_MatrixBlink(void); 13 | void Task_MatrixShift(void); 14 | void Task_MenuHandle(void); 15 | void Task_FontHandle(void); 16 | void Task_UartTx(void); 17 | 18 | #endif /* __APL_TASK_H_ */ 19 | 20 | -------------------------------------------------------------------------------- /firmware/Project/API/api_sys.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | #pragma optimize= none 4 | void delay_us(uint32_t n_us) 5 | { 6 | uint32_t n = (uint32_t)(CPU_F * (double)n_us / 1000000.0); 7 | 8 | while(n--) 9 | { 10 | __no_operation(); 11 | } 12 | } 13 | 14 | void HAL_SYSTICK_Callback(void) 15 | { 16 | api_task_tick(); 17 | api_uart_tick(); 18 | } 19 | 20 | void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) 21 | { 22 | /* POWER_FAIL_5V_Pin */ 23 | if(GPIO_Pin == GPIO_PIN_8) 24 | { 25 | 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/settings/Project.Project.driver.xcl: -------------------------------------------------------------------------------- 1 | "--endian=little" 2 | 3 | "--cpu=Cortex-M3" 4 | 5 | "--fpu=None" 6 | 7 | "-p" 8 | 9 | "D:\Program Files\IAR Systems\Embedded Workbench 7.5\arm\CONFIG\debugger\ST\STM32F103C8.ddf" 10 | 11 | "--drv_verify_download" 12 | 13 | "--semihosting=none" 14 | 15 | "--device=STM32F103C8" 16 | 17 | "--drv_communication=USB0" 18 | 19 | "--drv_interface_speed=100" 20 | 21 | "--jlink_reset_strategy=0,0" 22 | 23 | "--drv_interface=SWD" 24 | 25 | "--drv_catch_exceptions=0x000" 26 | 27 | "--drv_swo_clock_setup=72000000,0,2000000" 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/settings/Project.Project.general.xcl: -------------------------------------------------------------------------------- 1 | "D:\Program Files\IAR Systems\Embedded Workbench 7.5\arm\bin\armproc.dll" 2 | 3 | "D:\Program Files\IAR Systems\Embedded Workbench 7.5\arm\bin\armjlink2.dll" 4 | 5 | "F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Exe\Project.out" 6 | 7 | --plugin "D:\Program Files\IAR Systems\Embedded Workbench 7.5\arm\bin\armbat.dll" 8 | 9 | --device_macro "D:\Program Files\IAR Systems\Embedded Workbench 7.5\arm\config\debugger\ST\STM32F1xx_XL.dmac" 10 | 11 | --flash_loader "D:\Program Files\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\ST\FlashSTM32F10xx8.board" 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/GerberFiles/gerber_job.gbrjob: -------------------------------------------------------------------------------- 1 | { 2 | "Header": { 3 | "Comment": "All values are metric (mm)", 4 | "CreationDate": "2020-08-10T13:56:09Z", 5 | "GenerationSoftware": { 6 | "Application": "EAGLE", 7 | "Vendor": "Autodesk", 8 | "Version": "9.6.2" 9 | }, 10 | "Part": "Single" 11 | }, 12 | "Overall": { 13 | "BoardThickness": 1.57, 14 | "LayerNumber": 2, 15 | "Name": { 16 | "ProjectId": "led_matrix" 17 | }, 18 | "Owner": "Spark Zheng <916578518@qq.com>", 19 | "Size": { 20 | "X": 100.33, 21 | "Y": 63.5 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /firmware/Project/APL/apl_uart_link.h: -------------------------------------------------------------------------------- 1 | #ifndef __APL_UART_LINK_H_ 2 | #define __APL_UART_LINK_H_ 3 | 4 | /* uart protocol data length */ 5 | #define UARTLINK_NUM (uint8_t)(255u) 6 | 7 | /* uart protocol definition */ 8 | typedef struct 9 | { 10 | uint8_t addr; /* target address */ 11 | uint8_t func; /* function code */ 12 | uint8_t tick; /* increasing tick: 0-255 */ 13 | 14 | uint8_t length; /* data length */ 15 | uint8_t data[UARTLINK_NUM]; /* data field */ 16 | 17 | uint8_t crc16[2]; /* crc16 check */ 18 | } UartLink_HandleTypeDef; 19 | 20 | extern UartLink_HandleTypeDef ulink; 21 | 22 | extern uint8_t apl_ulink_handle(void); 23 | 24 | #endif /* __APL_UART_LINK_H_ */ 25 | 26 | -------------------------------------------------------------------------------- /firmware/Project/API/api_task.h: -------------------------------------------------------------------------------- 1 | #ifndef __API_TASK_H_ 2 | #define __API_TASK_H_ 3 | 4 | /* task number definition */ 5 | #define TASK_NUM (uint8_t)(64u) 6 | 7 | /* task handler definition */ 8 | typedef struct 9 | { 10 | uint8_t run; /* task execute flag */ 11 | uint16_t tick; /* task execute tick */ 12 | uint16_t time; /* task execute time */ 13 | 14 | void (*p_task)(void); /* task function */ 15 | } Task_HandleTypeDef; 16 | 17 | 18 | static Task_HandleTypeDef htask[TASK_NUM]; 19 | static uint8_t htask_index; 20 | 21 | void api_task_tick(void); 22 | void api_task_handle(void); 23 | 24 | uint8_t api_task_create(void (*p_task)(void), uint16_t run_time); 25 | uint8_t api_task_delete(void (*p_task)(void)); 26 | 27 | #endif /* __API_TASK_H_ */ 28 | 29 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/settings/Project_Project.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 0 26 | Device="ARM7" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/Assembly/PnP_led_matrix_front.txt: -------------------------------------------------------------------------------- 1 | C1 15.24 47.80 90.00 220uF 153CLV-0605 2 | C10 75.69 49.53 0.00 104 C0805 3 | C11 75.69 69.85 0.00 104 C0805 4 | C2 17.78 55.88 90.00 104 C0805 5 | C3 41.91 47.80 90.00 220uF 153CLV-0605 6 | C4 41.91 55.88 90.00 104 C0805 7 | C5 43.18 62.23 180.00 104 C0805 8 | C6 19.23 34.29 270.00 104 C0805 9 | C7 27.21 34.29 270.00 104 C0805 10 | C8 35.20 34.29 270.00 104 C0805 11 | C9 43.18 34.29 270.00 104 C0805 12 | D1 34.29 52.07 90.00 SS34 DO214AC 13 | IC1 25.40 49.56 0.00 LM2596S TO263-5 14 | IC2 80.01 60.96 0.00 74HC245DW SO20W 15 | IC3 80.01 40.64 0.00 74HC245DW SO20W 16 | L2 34.42 45.09 0.00 L4532P 17 | LED1 25.40 64.77 90.00 CHIP-LED0805 18 | R1 19.05 64.77 0.00 10K R0805 19 | R2 15.24 34.29 270.00 47K R0805 20 | R3 23.22 34.29 270.00 47K R0805 21 | R4 31.21 34.29 270.00 47K R0805 22 | R5 39.19 34.29 270.00 47K R0805 23 | U1 43.18 67.31 270.00 W25Q32FV SOIC-8 24 | -------------------------------------------------------------------------------- /firmware/Project/APL/includes.h: -------------------------------------------------------------------------------- 1 | #ifndef __INCLUDES_H_ 2 | #define __INCLUDES_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "stm32f1xx_hal.h" 8 | //#include "stm32f2xx_hal.h" 9 | //#include "stm32f4xx_hal.h" 10 | 11 | /* APL Layer -----------------------------------------------------------------*/ 12 | #include "main.h" 13 | #include "apl_task.h" 14 | #include "apl_sys_data.h" 15 | #include "apl_uart_link.h" 16 | #include "apl_key_menu.h" 17 | #include "apl_led_matrix.h" 18 | #include "apl_font_text.h" 19 | 20 | /* BSP Layer -----------------------------------------------------------------*/ 21 | #include "bsp_hub75.h" 22 | #include "bsp_w25qx.h" 23 | #include "bsp_key.h" 24 | 25 | /* API Layer -----------------------------------------------------------------*/ 26 | #include "api_sys.h" 27 | #include "api_task.h" 28 | #include "api_gpio.h" 29 | #include "api_uart.h" 30 | #include "api_spi.h" 31 | #include "api_tim.h" 32 | 33 | #endif /* __INCLUDES_H_ */ 34 | 35 | -------------------------------------------------------------------------------- /firmware/Project/BSP/bsp_key.h: -------------------------------------------------------------------------------- 1 | #ifndef __BSP_KEY_H_ 2 | #define __BSP_KEY_H_ 3 | 4 | /* key interface definition */ 5 | #define KEY_SHORT_COUNT (uint8_t)(3u) 6 | #define KEY_LONG_COUNT (uint8_t)(30u) 7 | 8 | /* key handler definition */ 9 | typedef struct 10 | { 11 | uint8_t key1; /* key1 count */ 12 | uint8_t key2; /* key2 count */ 13 | uint8_t key3; /* key3 count */ 14 | uint8_t key4; /* key4 count */ 15 | 16 | } Key_HandleTypeDef; 17 | 18 | typedef enum 19 | { 20 | KEY1_SHORT = 0x01U, 21 | KEY1_LONG = 0x03U, 22 | KEY2_SHORT = 0x11U, 23 | KEY2_LONG = 0x13U, 24 | KEY3_SHORT = 0x21U, 25 | KEY3_LONG = 0x23U, 26 | KEY4_SHORT = 0x31U, 27 | KEY4_LONG = 0x33U 28 | 29 | } Key_ValueTypeDef; 30 | 31 | static Key_HandleTypeDef key; 32 | 33 | void bsp_key_scan(void); 34 | uint8_t bsp_key_read(void); 35 | 36 | #endif /* __BSP_KEY_H_ */ 37 | 38 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pro: -------------------------------------------------------------------------------- 1 | update=2021/2/14 12:09:51 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | [schematic_editor] 35 | version=1 36 | PageLayoutDescrFile=empty.kicad_wks 37 | PlotDirectoryName= 38 | SubpartIdSeparator=0 39 | SubpartFirstId=65 40 | NetFmtName= 41 | SpiceAjustPassiveValues=0 42 | LabSize=50 43 | ERC_TestSimilarLabels=1 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 槿良 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /firmware/Project/APL/apl_key_menu.h: -------------------------------------------------------------------------------- 1 | #ifndef __APL_KEY_MENU_H_ 2 | #define __APL_KEY_MENU_H_ 3 | 4 | typedef enum 5 | { 6 | Menu_R, 7 | 8 | Menu_M, 9 | Menu_1, 10 | Menu_2, 11 | Menu_3, 12 | Menu_4, 13 | 14 | Menu_1_1, 15 | Menu_4_1, 16 | Menu_4_2, 17 | 18 | } Menu_StateTypeDef; 19 | 20 | static Menu_StateTypeDef menu_state; 21 | static uint8_t menu_item; 22 | static uint8_t key_value; 23 | 24 | void apl_menu_init(void); 25 | void apl_menu_handle(void); 26 | void apl_menu_r_callback(void); 27 | void apl_menu_r_display(uint8_t page); 28 | void apl_menu_m_callback(void); 29 | void apl_menu_m_display(uint8_t page); 30 | void apl_menu_1_callback(void); 31 | void apl_menu_1_display(uint8_t page); 32 | void apl_menu_2_callback(void); 33 | void apl_menu_2_display(uint8_t page); 34 | void apl_menu_4_callback(void); 35 | void apl_menu_4_display(uint8_t page); 36 | void apl_menu_1_1_callback(void); 37 | void apl_menu_1_1_display(uint8_t page); 38 | void apl_menu_4_1_callback(void); 39 | void apl_menu_4_1_display(uint8_t page); 40 | void apl_menu_4_2_callback(void); 41 | void apl_menu_4_2_display(uint8_t page); 42 | 43 | #endif /* __APL_KEY_MENU_H_ */ 44 | 45 | -------------------------------------------------------------------------------- /firmware/Project/APL/apl_sys_data.h: -------------------------------------------------------------------------------- 1 | #ifndef __APL_SYS_DATA_H_ 2 | #define __APL_SYS_DATA_H_ 3 | 4 | #define SYS_PRODUCT_SN "PAD20201220" /* product SN number */ 5 | #define SYS_FIRMWARE_SN "FAD20201220" /* firmware SN number */ 6 | #define SYS_DATA_ADDR 0x00000000U /* system data addr in spi flash */ 7 | #define SYS_FONT_ADDR 0x00200000U /* system font addr in spi flash */ 8 | 9 | /* system data definition */ 10 | typedef struct 11 | { 12 | uint32_t check_code; 13 | uint32_t initial_code; 14 | uint8_t product_SN[40]; 15 | uint8_t firmware_SN[40]; 16 | uint8_t display_color; 17 | uint8_t display_mode; 18 | uint8_t display_language; 19 | uint8_t font_size; 20 | uint8_t font_text[6][128]; 21 | uint16_t display_freq; 22 | uint16_t shift_period; 23 | uint8_t reserved[160]; // 1024bytes in total 24 | 25 | } System_DataTypeDef; 26 | 27 | extern System_DataTypeDef sys_data; 28 | 29 | void apl_sys_data_read(void); 30 | void apl_sys_data_write(void); 31 | uint8_t apl_sys_data_changed(void); 32 | 33 | #endif /* __APL_SYS_DATA_H_ */ 34 | 35 | -------------------------------------------------------------------------------- /firmware/Project/BSP/bsp_key.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | void bsp_key_scan(void) 4 | { 5 | if(HAL_GPIO_ReadPin(KEY_1_GPIO_Port, KEY_1_Pin) == GPIO_PIN_RESET) 6 | key.key1++; 7 | 8 | if(HAL_GPIO_ReadPin(KEY_2_GPIO_Port, KEY_2_Pin) == GPIO_PIN_RESET) 9 | key.key2++; 10 | 11 | if(HAL_GPIO_ReadPin(KEY_3_GPIO_Port, KEY_3_Pin) == GPIO_PIN_RESET) 12 | key.key3++; 13 | 14 | if(HAL_GPIO_ReadPin(KEY_4_GPIO_Port, KEY_4_Pin) == GPIO_PIN_RESET) 15 | key.key4++; 16 | 17 | } 18 | 19 | uint8_t bsp_key_read(void) 20 | { 21 | uint8_t key_value = 0; 22 | uint8_t *p_key = NULL; 23 | 24 | if((HAL_GPIO_ReadPin(KEY_1_GPIO_Port, KEY_1_Pin) == GPIO_PIN_SET) && 25 | (HAL_GPIO_ReadPin(KEY_2_GPIO_Port, KEY_2_Pin) == GPIO_PIN_SET) && 26 | (HAL_GPIO_ReadPin(KEY_3_GPIO_Port, KEY_3_Pin) == GPIO_PIN_SET) && 27 | (HAL_GPIO_ReadPin(KEY_4_GPIO_Port, KEY_4_Pin) == GPIO_PIN_SET)) 28 | { 29 | p_key = &key.key1; 30 | for(uint8_t i=0; i<4; i++) 31 | { 32 | if(*p_key >= KEY_SHORT_COUNT) 33 | { 34 | key_value = i; 35 | key_value <<= 4; 36 | key_value |= 0x01; 37 | if(*p_key >= KEY_LONG_COUNT) 38 | key_value |= 0x02; 39 | } 40 | p_key++; 41 | } 42 | p_key = &key.key1; 43 | memset(p_key, 0, 4); 44 | } 45 | 46 | return key_value; 47 | } 48 | 49 | -------------------------------------------------------------------------------- /firmware/Project/API/api_tim.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | uint8_t tim2_is_up = 0; 4 | 5 | void api_tim_start(void) 6 | { 7 | HAL_TIM_Base_Start_IT(&htim2); 8 | } 9 | 10 | void api_tim_stop(void) 11 | { 12 | HAL_TIM_Base_Stop_IT(&htim2); 13 | } 14 | 15 | void api_tim_handle(void) 16 | { 17 | static uint8_t tim_count = 15; 18 | 19 | /* 20 | HUB75_PANEL_HEIGHT = 64pix 21 | Freq(LED_Matrix) = 60Hz 22 | Freq(TIM_Period) = Freq(LED_Matrix) * HUB75_PANEL_HEIGHT / 2 * 15 = 60 * 64 / 2 * 15 = 28800Hz 23 | Period(LED_Matrix_PLANE_0) = TIM_Period * 8; 24 | Period(LED_Matrix_PLANE_1) = TIM_Period * 4; 25 | Period(LED_Matrix_PLANE_2) = TIM_Period * 2; 26 | Period(LED_Matrix_PLANE_3) = TIM_Period * 1; 27 | */ 28 | 29 | #if 0 30 | //if( (tim_count == 15) || (tim_count == 7) || (tim_count == 3) || (tim_count == 1) ) 31 | //{ 32 | bsp_hub75_write_pixel(hub75_panel_buff); 33 | //} 34 | #else 35 | if(tim_count == 1) 36 | { 37 | bsp_hub75_write_byte(hub75_buff, hub75_color); 38 | } 39 | #endif 40 | 41 | if(tim_count-- == 1) 42 | { 43 | //tim_count = 15; 44 | tim_count = 15 / (sys_data.display_freq / 60); 45 | } 46 | 47 | } 48 | 49 | void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) 50 | { 51 | if(htim->Instance == TIM2) 52 | { 53 | //api_tim_handle(); 54 | tim2_is_up = 1; 55 | } 56 | 57 | } 58 | 59 | 60 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/3,0.kicad_mod: -------------------------------------------------------------------------------- 1 | (module 3,0 (layer F.Cu) (tedit 0) 2 | (descr "MOUNTING HOLE 3.0 mm with drill center") 3 | (fp_text reference U$5 (at 0 0) (layer F.SilkS) hide 4 | (effects (font (size 1.27 1.27) (thickness 0.15)) (justify right top)) 5 | ) 6 | (fp_text value "" (at 0 0) (layer F.SilkS) hide 7 | (effects (font (size 1.27 1.27) (thickness 0.15)) (justify right top)) 8 | ) 9 | (fp_arc (start 0 0) (end -2.159 0) (angle -90) (layer F.Fab) (width 2.4892)) 10 | (fp_arc (start 0 0) (end 0 -2.159) (angle 90) (layer F.Fab) (width 2.4892)) 11 | (fp_circle (center 0 0) (end 3.429 0) (layer F.SilkS) (width 0.1524)) 12 | (fp_circle (center 0 0) (end 0.762 0) (layer F.Fab) (width 0.4572)) 13 | (fp_circle (center 0 0) (end 3.048 0) (layer Dwgs.User) (width 2.032)) 14 | (fp_circle (center 0 0) (end 3.048 0) (layer Dwgs.User) (width 2.032)) 15 | (fp_circle (center 0 0) (end 3.048 0) (layer Dwgs.User) (width 2.032)) 16 | (fp_circle (center 0 0) (end 3.048 0) (layer Dwgs.User) (width 2.032)) 17 | (fp_circle (center 0 0) (end 3.048 0) (layer Dwgs.User) (width 2.032)) 18 | (fp_circle (center 0 0) (end 1.6 0) (layer F.SilkS) (width 0.2032)) 19 | (fp_text user 3,0 (at -1.27 3.81) (layer Cmts.User) 20 | (effects (font (size 1.2065 1.2065) (thickness 0.1016)) (justify left bottom)) 21 | ) 22 | (pad "" np_thru_hole circle (at 0 0) (size 3 3) (drill 3) (layers *.Cu *.Mask)) 23 | ) 24 | -------------------------------------------------------------------------------- /firmware/Project/API/api_uart.h: -------------------------------------------------------------------------------- 1 | #ifndef __API_UART_H_ 2 | #define __API_UART_H_ 3 | 4 | 5 | //#define RS485_EN_H HAL_GPIO_WritePin(GPIOC, GPIO_PIN_8, GPIO_PIN_SET) 6 | //#define RS485_EN_L HAL_GPIO_WritePin(GPIOC, GPIO_PIN_8, GPIO_PIN_RESET) 7 | 8 | #define UART_RT_TIMEOUT (uint16_t)(2u) //set timeout: 2ms 9 | #define UART_BUFF_LEN (uint16_t)(512u) //buffer length 10 | 11 | /* uart handler definition */ 12 | typedef struct 13 | { 14 | uint8_t rx_state; 15 | uint8_t rx_cache; 16 | uint8_t rx_buff[UART_BUFF_LEN]; 17 | uint16_t rx_count; 18 | uint16_t rx_tick; 19 | 20 | uint8_t tx_state; 21 | uint8_t tx_buff[UART_BUFF_LEN]; 22 | uint16_t tx_count; 23 | uint16_t tx_tick; 24 | 25 | } Uart_StructTypeDef; 26 | 27 | /* uart state definition */ 28 | typedef enum 29 | { 30 | UART_READY = 00U, 31 | UART_BUSY = 01U, 32 | UART_OVER = 02U 33 | 34 | } Uart_StateTypeDef; 35 | 36 | extern Uart_StructTypeDef uart1, uart2, uart3; 37 | extern UART_HandleTypeDef huart1, huart2, huart3; 38 | 39 | void api_uart_tick(void); 40 | void api_uart_init(void); 41 | void api_uart_rx_start(Uart_StructTypeDef *p_uart); 42 | void api_uart_tx_start(Uart_StructTypeDef *p_uart, uint8_t *p_data, uint16_t size); 43 | void api_uart_buff_fill(uint8_t *p_buff, uint16_t *p_count, uint8_t *p_data, uint16_t size); 44 | 45 | #endif /* __API_UART_H_ */ 46 | 47 | -------------------------------------------------------------------------------- /hardware/STM32_Core_Board/CAMOutputs/STM32_Core_Board-Edge_Cuts.gbr: -------------------------------------------------------------------------------- 1 | %TF.GenerationSoftware,KiCad,Pcbnew,(5.1.9)-1*% 2 | %TF.CreationDate,2021-02-16T15:18:36+08:00*% 3 | %TF.ProjectId,STM32_Core_Board,53544d33-325f-4436-9f72-655f426f6172,rev?*% 4 | %TF.SameCoordinates,Original*% 5 | %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.9)-1) date 2021-02-16 15:18:36* 9 | %MOMM*% 10 | %LPD*% 11 | G01* 12 | G04 APERTURE LIST* 13 | %TA.AperFunction,Profile*% 14 | %ADD10C,0.050000*% 15 | %TD*% 16 | G04 APERTURE END LIST* 17 | D10* 18 | X56134000Y-154305000D02* 19 | X56134000Y-154051000D01* 20 | X55372000Y-155067000D02* 21 | G75* 22 | G03* 23 | X56134000Y-154305000I0J762000D01* 24 | G01* 25 | X56134000Y-147955000D02* 26 | G75* 27 | G03* 28 | X55372000Y-147193000I-762000J0D01* 29 | G01* 30 | X50800000Y-155067000D02* 31 | X55372000Y-155067000D01* 32 | X50800000Y-162560000D02* 33 | X50800000Y-155067000D01* 34 | X56134000Y-147955000D02* 35 | X56134000Y-154051000D01* 36 | X50800000Y-147193000D02* 37 | X55372000Y-147193000D01* 38 | X50800000Y-139700000D02* 39 | X50800000Y-147193000D01* 40 | X104140000Y-139700000D02* 41 | X104140000Y-156210000D01* 42 | X102870000Y-139700000D02* 43 | X104140000Y-139700000D01* 44 | X50800000Y-139700000D02* 45 | X102870000Y-139700000D01* 46 | X104140000Y-162560000D02* 47 | X104140000Y-156210000D01* 48 | X50800000Y-162560000D02* 49 | X104140000Y-162560000D01* 50 | M02* 51 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/stm32f103xb_flash.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20004FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x800; 13 | define symbol __ICFEDIT_size_heap__ = 0x400; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | 17 | define memory mem with size = 4G; 18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 20 | 21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 23 | 24 | initialize by copy { readwrite }; 25 | do not initialize { section .noinit }; 26 | 27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 28 | 29 | place in ROM_region { readonly }; 30 | place in RAM_region { readwrite, 31 | block CSTACK, block HEAP }; 32 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/stm32f103xb_sram.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000; 6 | /*-Memory Regions-*/ 7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ; 8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF; 9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400; 10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20004FFF; 11 | /*-Sizes-*/ 12 | define symbol __ICFEDIT_size_cstack__ = 0x800; 13 | define symbol __ICFEDIT_size_heap__ = 0x400; 14 | /**** End of ICF editor section. ###ICF###*/ 15 | 16 | 17 | define memory mem with size = 4G; 18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 20 | 21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 23 | 24 | initialize by copy { readwrite }; 25 | do not initialize { section .noinit }; 26 | 27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 28 | 29 | place in ROM_region { readonly }; 30 | place in RAM_region { readwrite, 31 | block CSTACK, block HEAP }; 32 | -------------------------------------------------------------------------------- /firmware/Project/Drivers/STM32F1xx_HAL_Driver/License.md: -------------------------------------------------------------------------------- 1 | Copyright 2016(-2021) STMicroelectronics. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its contributors 15 | may be used to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/CHIP-LED0805.kicad_mod: -------------------------------------------------------------------------------- 1 | (module CHIP-LED0805 (layer F.Cu) (tedit 6028ED50) 2 | (descr "Hyper CHIPLED Hyper-Bright LED

\nLB R99A
\nSource: http://www.osram.convergy.de/ ... lb_r99a.pdf") 3 | (fp_text reference LED1 (at -0.635 2.54 -90) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 5 | ) 6 | (fp_text value Val** (at 2.54 1.27 -90) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 8 | ) 9 | (fp_poly (pts (xy -0.675 1.05) (xy 0.675 1.05) (xy 0.675 0.45) (xy -0.675 0.45)) (layer F.Fab) (width 0)) 10 | (fp_poly (pts (xy -0.675 -0.45) (xy 0.675 -0.45) (xy 0.675 -1.05) (xy -0.675 -1.05)) (layer F.Fab) (width 0)) 11 | (fp_poly (pts (xy -0.15 0) (xy 0.15 0) (xy 0.15 -0.3) (xy -0.15 -0.3)) (layer F.SilkS) (width 0)) 12 | (fp_poly (pts (xy 0.525 0) (xy 0.675 0) (xy 0.675 -0.3) (xy 0.525 -0.3)) (layer F.SilkS) (width 0)) 13 | (fp_poly (pts (xy -0.675 0) (xy -0.525 0) (xy -0.525 -0.3) (xy -0.675 -0.3)) (layer F.SilkS) (width 0)) 14 | (fp_line (start 0.625 -0.45) (end 0.625 0.475) (layer F.Fab) (width 0.1016)) 15 | (fp_line (start -0.625 -0.45) (end -0.625 0.45) (layer F.Fab) (width 0.1016)) 16 | (pad C smd rect (at 0 -1.05) (size 1.2 1.2) (layers F.Cu F.Paste F.Mask) 17 | (solder_mask_margin 0.1016)) 18 | (pad A smd rect (at 0 1.05) (size 1.2 1.2) (layers F.Cu F.Paste F.Mask) 19 | (solder_mask_margin 0.1016)) 20 | (model ${KISYS3DMOD}/LED_SMD.3dshapes/LED_0805_2012Metric_Castellated.wrl 21 | (at (xyz 0 0 0)) 22 | (scale (xyz 1 1 1)) 23 | (rotate (xyz 0 0 90)) 24 | ) 25 | ) 26 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/ESD_10.00.kicad_mod: -------------------------------------------------------------------------------- 1 | (module ESD_10.00 (layer F.Cu) (tedit 0) 2 | (descr "Logo ESD 10 mm") 3 | (fp_text reference U$6 (at 0 0) (layer F.SilkS) hide 4 | (effects (font (size 1.27 1.27) (thickness 0.15))) 5 | ) 6 | (fp_text value "" (at 0 0) (layer F.SilkS) hide 7 | (effects (font (size 1.27 1.27) (thickness 0.15))) 8 | ) 9 | (fp_poly (pts (xy 0.0943 -0.0943) (xy 2.2156 -3.8184) (xy 3.1113 -3.3942) (xy 2.9699 -3.1585) 10 | (xy 2.9228 -3.0642) (xy 2.9228 -2.6871) (xy 3.0642 -0.8014) (xy 3.1585 -0.8014) 11 | (xy 3.2999 -0.8957) (xy 3.3942 -1.0843) (xy 3.4885 -1.3671) (xy 3.5356 -1.7914) 12 | (xy 3.5356 -2.6871) (xy 3.7713 -3.017) (xy 3.9127 -3.017) (xy 5.1855 -2.4042) 13 | (xy 5.1855 -2.3571) (xy 4.2899 -1.5557) (xy 4.1013 -1.2728) (xy 4.007 -1.0843) 14 | (xy 4.007 -0.9428) (xy 4.0542 -0.8485) (xy 4.1013 -0.8014) (xy 4.1956 -0.8014) 15 | (xy 4.5256 -0.99) (xy 4.9027 -1.2257) (xy 5.2327 -1.4614) (xy 5.657 -1.7442) 16 | (xy 6.0341 -1.9799) (xy 6.1284 -1.9799) (xy 10.0411 -0.1886) (xy 10.0411 -0.0943)) (layer F.SilkS) (width 0)) 17 | (fp_poly (pts (xy 2.6399 -4.337) (xy 5.0913 -8.5797) (xy 6.9769 -5.327) (xy 6.9769 -5.2327) 18 | (xy 4.7141 -4.8084) (xy 4.667 -4.7613) (xy 3.677 -3.8656) (xy 3.5827 -3.8656)) (layer F.SilkS) (width 0)) 19 | (fp_poly (pts (xy 4.5256 -3.3942) (xy 4.8556 -3.6299) (xy 4.9498 -3.6299) (xy 5.4213 -3.4885) 20 | (xy 5.5627 -3.3942) (xy 5.657 -3.2528) (xy 5.6098 -3.0642) (xy 5.5155 -2.9228)) (layer F.SilkS) (width 0)) 21 | (fp_poly (pts (xy 9.2868 -1.2257) (xy 6.9298 -2.3571) (xy 6.9298 -2.4042) (xy 7.9669 -3.5356)) (layer F.SilkS) (width 0)) 22 | ) 23 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/DO214AC.kicad_mod: -------------------------------------------------------------------------------- 1 | (module DO214AC (layer F.Cu) (tedit 6028EC7B) 2 | (descr DIODE) 3 | (fp_text reference D1 (at 3.826 -0.9382 -90) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.12065)) (justify left bottom)) 5 | ) 6 | (fp_text value SS34 (at -2.64 2.556) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.12065)) (justify left bottom)) 8 | ) 9 | (fp_poly (pts (xy -1 1.05) (xy -0.7 1.05) (xy -0.7 -1.05) (xy -1 -1.05)) (layer F.SilkS) (width 0)) 10 | (fp_poly (pts (xy 2.4 0.7) (xy 2.65 0.7) (xy 2.65 -0.65) (xy 2.4 -0.65)) (layer F.Fab) (width 0)) 11 | (fp_poly (pts (xy -2.65 0.7) (xy -2.4 0.7) (xy -2.4 -0.65) (xy -2.65 -0.65)) (layer F.Fab) (width 0)) 12 | (fp_line (start 0.25 0.7) (end -0.8 0) (layer F.SilkS) (width 0.254)) 13 | (fp_line (start 0.25 -0.75) (end 0.25 0.7) (layer F.SilkS) (width 0.254)) 14 | (fp_line (start -0.8 0) (end 0.25 -0.75) (layer F.SilkS) (width 0.254)) 15 | (fp_line (start -2.3 0.95) (end -2.3 -1) (layer F.Fab) (width 0.254)) 16 | (fp_line (start 2.3 0.95) (end -2.3 0.95) (layer F.Fab) (width 0.254)) 17 | (fp_line (start 2.3 -1) (end 2.3 0.95) (layer F.Fab) (width 0.254)) 18 | (fp_line (start -2.3 -1) (end 2.3 -1) (layer F.Fab) (width 0.254)) 19 | (pad C smd rect (at -2.05 0) (size 1.8 1.7) (layers F.Cu F.Paste F.Mask) 20 | (solder_mask_margin 0.1016)) 21 | (pad A smd rect (at 2.05 0) (size 1.8 1.7) (layers F.Cu F.Paste F.Mask) 22 | (solder_mask_margin 0.1016)) 23 | (model ${KISYS3DMOD}/Diode_SMD.3dshapes/D_SMA.wrl 24 | (at (xyz 0 0 0)) 25 | (scale (xyz 1 1 1)) 26 | (rotate (xyz 0 0 0)) 27 | ) 28 | ) 29 | -------------------------------------------------------------------------------- /firmware/Project/API/api_spi.h: -------------------------------------------------------------------------------- 1 | #ifndef __API_SPI_H_ 2 | #define __API_SPI_H_ 3 | 4 | /* SPI1 CS */ 5 | #define SPI1_CS1_H() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_3, GPIO_PIN_SET) 6 | #define SPI1_CS1_L() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_3, GPIO_PIN_RESET) 7 | #define SPI1_CS2_H() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_4, GPIO_PIN_SET) 8 | #define SPI1_CS2_L() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_4, GPIO_PIN_RESET) 9 | #define SPI1_CS3_H() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_5, GPIO_PIN_SET) 10 | #define SPI1_CS3_L() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_5, GPIO_PIN_RESET) 11 | 12 | /* SPI2 CS */ 13 | #define SPI2_CS0_H() HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, GPIO_PIN_SET) 14 | #define SPI2_CS0_L() HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, GPIO_PIN_RESET) 15 | #define SPI2_CS1_H() HAL_GPIO_WritePin(GPIOB, GPIO_PIN_2, GPIO_PIN_SET) 16 | #define SPI2_CS1_L() HAL_GPIO_WritePin(GPIOB, GPIO_PIN_2, GPIO_PIN_RESET) 17 | #define SPI2_CS2_H() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_8, GPIO_PIN_SET) 18 | #define SPI2_CS2_L() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_8, GPIO_PIN_RESET) 19 | #define SPI2_CS3_H() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_1, GPIO_PIN_SET) 20 | #define SPI2_CS3_L() HAL_GPIO_WritePin(GPIOC, GPIO_PIN_1, GPIO_PIN_RESET) 21 | #define SPI2_RST_H() HAL_GPIO_WritePin(GPIOB, GPIO_PIN_7, GPIO_PIN_SET) 22 | #define SPI2_RST_L() HAL_GPIO_WritePin(GPIOB, GPIO_PIN_7, GPIO_PIN_RESET) 23 | 24 | extern SPI_HandleTypeDef hspi1; 25 | extern SPI_HandleTypeDef hspi2; 26 | extern SPI_HandleTypeDef hspi3; 27 | 28 | void api_spi_init(void); 29 | 30 | #endif /* __API_SPI_H_ */ 31 | 32 | -------------------------------------------------------------------------------- /firmware/Project/APL/apl_led_matrix.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | void apl_led_matrix_write_pixel(uint16_t x, uint16_t y, uint8_t color) 4 | { 5 | uint32_t index = 0; 6 | uint8_t mask = 0; 7 | 8 | if((x >= HUB75_PANEL_WIDTH) || (y >= HUB75_PANEL_HEIGHT)) 9 | return; 10 | 11 | index = x / 8 + y * (HUB75_PANEL_WIDTH/8); 12 | mask = 0x80 >> (x % 8); 13 | 14 | if(color) 15 | hub75_buff[index] |= mask; 16 | else 17 | hub75_buff[index] &= ~mask; 18 | 19 | return; 20 | } 21 | 22 | uint8_t apl_led_matrix_read_pixel(uint16_t x, uint16_t y) 23 | { 24 | uint32_t index = 0; 25 | uint8_t mask = 0; 26 | uint8_t color = 0; 27 | 28 | if((x >= HUB75_PANEL_WIDTH) || (y >= HUB75_PANEL_HEIGHT)) 29 | return 0; 30 | 31 | index = x / 8 + y * (HUB75_PANEL_WIDTH/8); 32 | mask = 0x80 >> (x % 8); 33 | 34 | if(hub75_buff[index] & mask) 35 | color = 1; 36 | else 37 | color = 0; 38 | 39 | return color; 40 | } 41 | 42 | void apl_led_matrix_left_shift(uint16_t y, uint16_t height, uint16_t count) 43 | { 44 | uint16_t y0 = y; 45 | uint16_t i = 0; 46 | 47 | while(count--) 48 | { 49 | y = y0; 50 | while(y < (y0 + height)) 51 | { 52 | for(i=0; i> 7); 56 | else 57 | hub75_buff[y*HUB75_PANEL_WIDTH/8+i] = (hub75_buff[y*HUB75_PANEL_WIDTH/8+i] << 1); 58 | } 59 | 60 | y++; 61 | if(y >= HUB75_PANEL_HEIGHT) 62 | break; 63 | } 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/C0805.kicad_mod: -------------------------------------------------------------------------------- 1 | (module C0805 (layer F.Cu) (tedit 6028D37D) 2 | (descr CAPACITOR

) 3 | (fp_text reference C10 (at -1.27 -1.27) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 5 | ) 6 | (fp_text value 104 (at -1.27 2.54) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 8 | ) 9 | (fp_poly (pts (xy -0.1001 0.4001) (xy 0.1001 0.4001) (xy 0.1001 -0.4001) (xy -0.1001 -0.4001)) (layer F.Adhes) (width 0)) 10 | (fp_poly (pts (xy 0.3556 0.7239) (xy 1.1057 0.7239) (xy 1.1057 -0.7262) (xy 0.3556 -0.7262)) (layer F.Fab) (width 0)) 11 | (fp_poly (pts (xy -1.0922 0.7239) (xy -0.3421 0.7239) (xy -0.3421 -0.7262) (xy -1.0922 -0.7262)) (layer F.Fab) (width 0)) 12 | (fp_line (start 1.973 -0.983) (end 1.973 0.983) (layer Dwgs.User) (width 0.0508)) 13 | (fp_line (start -0.356 0.66) (end 0.381 0.66) (layer F.Fab) (width 0.1016)) 14 | (fp_line (start -0.381 -0.66) (end 0.381 -0.66) (layer F.Fab) (width 0.1016)) 15 | (fp_line (start -1.973 0.983) (end -1.973 -0.983) (layer Dwgs.User) (width 0.0508)) 16 | (fp_line (start 1.973 0.983) (end -1.973 0.983) (layer Dwgs.User) (width 0.0508)) 17 | (fp_line (start -1.973 -0.983) (end 1.973 -0.983) (layer Dwgs.User) (width 0.0508)) 18 | (pad 1 smd rect (at -0.95 0) (size 1.3 1.5) (layers F.Cu F.Paste F.Mask) 19 | (solder_mask_margin 0.1016)) 20 | (pad 2 smd rect (at 0.95 0) (size 1.3 1.5) (layers F.Cu F.Paste F.Mask) 21 | (solder_mask_margin 0.1016)) 22 | (model ${KISYS3DMOD}/Capacitor_SMD.3dshapes/C_0805_2012Metric.wrl 23 | (at (xyz 0 0 0)) 24 | (scale (xyz 1 1 1)) 25 | (rotate (xyz 0 0 0)) 26 | ) 27 | ) 28 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/R0805.kicad_mod: -------------------------------------------------------------------------------- 1 | (module R0805 (layer F.Cu) (tedit 6028D309) 2 | (descr RESISTOR

) 3 | (fp_text reference R5 (at 3.9116 0.9144 -270) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 5 | ) 6 | (fp_text value 47K (at -6.604 0 -180) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 8 | ) 9 | (fp_poly (pts (xy -0.1999 0.5001) (xy 0.1999 0.5001) (xy 0.1999 -0.5001) (xy -0.1999 -0.5001)) (layer F.Adhes) (width 0)) 10 | (fp_poly (pts (xy -1.0668 0.6985) (xy -0.4168 0.6985) (xy -0.4168 -0.7015) (xy -1.0668 -0.7015)) (layer F.Fab) (width 0)) 11 | (fp_poly (pts (xy 0.4064 0.6985) (xy 1.0564 0.6985) (xy 1.0564 -0.7015) (xy 0.4064 -0.7015)) (layer F.Fab) (width 0)) 12 | (fp_line (start -1.973 0.983) (end -1.973 -0.983) (layer Dwgs.User) (width 0.0508)) 13 | (fp_line (start 1.973 0.983) (end -1.973 0.983) (layer Dwgs.User) (width 0.0508)) 14 | (fp_line (start 1.973 -0.983) (end 1.973 0.983) (layer Dwgs.User) (width 0.0508)) 15 | (fp_line (start -1.973 -0.983) (end 1.973 -0.983) (layer Dwgs.User) (width 0.0508)) 16 | (fp_line (start -0.41 0.635) (end 0.41 0.635) (layer F.Fab) (width 0.1524)) 17 | (fp_line (start -0.41 -0.635) (end 0.41 -0.635) (layer F.Fab) (width 0.1524)) 18 | (pad 1 smd rect (at -0.95 0) (size 1.3 1.5) (layers F.Cu F.Paste F.Mask) 19 | (solder_mask_margin 0.1016)) 20 | (pad 2 smd rect (at 0.95 0) (size 1.3 1.5) (layers F.Cu F.Paste F.Mask) 21 | (solder_mask_margin 0.1016)) 22 | (model ${KISYS3DMOD}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl 23 | (at (xyz 0 0 0)) 24 | (scale (xyz 1 1 1)) 25 | (rotate (xyz 0 0 0)) 26 | ) 27 | ) 28 | -------------------------------------------------------------------------------- /firmware/Project/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/Project/EWARM/settings/Project.Project.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM Note that this file is generated every time a new debug session 6 | @REM is initialized, so you may want to move or rename the file before 7 | @REM making changes. 8 | @REM 9 | @REM You can launch cspybat by typing the name of this batch file followed 10 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 11 | @REM 12 | @REM Read about available command line parameters in the C-SPY Debugging 13 | @REM Guide. Hints about additional command line parameters that may be 14 | @REM useful in specific cases: 15 | @REM --download_only Downloads a code image without starting a debug 16 | @REM session afterwards. 17 | @REM --silent Omits the sign-on message. 18 | @REM --timeout Limits the maximum allowed execution time. 19 | @REM 20 | 21 | 22 | @echo off 23 | 24 | if not "%~1" == "" goto debugFile 25 | 26 | @echo on 27 | 28 | "D:\Program Files\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\settings\Project.Project.general.xcl" --backend -f "F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\settings\Project.Project.driver.xcl" 29 | 30 | @echo off 31 | goto end 32 | 33 | :debugFile 34 | 35 | @echo on 36 | 37 | "D:\Program Files\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\settings\Project.Project.general.xcl" "--debug_file=%~1" --backend -f "F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\settings\Project.Project.driver.xcl" 38 | 39 | @echo off 40 | :end -------------------------------------------------------------------------------- /firmware/Project/APL/apl_sys_data.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | System_DataTypeDef sys_data, sys_data_pre; 4 | 5 | void apl_sys_data_read(void) 6 | { 7 | bsp_w25qx_read((uint8_t *)&sys_data, SYS_DATA_ADDR, sizeof(sys_data)); 8 | 9 | if(sys_data.initial_code != 0xAB54EF96) 10 | { 11 | sys_data.initial_code = 0xAB54EF96; 12 | strcpy((char*)sys_data.product_SN, SYS_PRODUCT_SN); 13 | strcpy((char*)sys_data.firmware_SN, SYS_FIRMWARE_SN); 14 | sys_data.display_color = HUB75_Color_Pink; 15 | sys_data.display_mode = 1; 16 | sys_data.display_language = 1; 17 | sys_data.font_size = 16; 18 | 19 | strcpy((char*)sys_data.font_text[0], "1st line display text: "); 20 | strcpy((char*)sys_data.font_text[1], "2nd line display text: "); 21 | strcpy((char*)sys_data.font_text[2], "3rd line display text: "); 22 | strcpy((char*)sys_data.font_text[3], "4th line display text: "); 23 | strcpy((char*)sys_data.font_text[4], "5th line display text: "); 24 | strcpy((char*)sys_data.font_text[5], "6th line display text: "); 25 | 26 | sys_data.display_freq = 900; 27 | sys_data.shift_period = 100; 28 | bsp_w25qx_write_sector((uint8_t *)&sys_data, SYS_DATA_ADDR, sizeof(sys_data)); 29 | } 30 | 31 | memcpy(&sys_data_pre, &sys_data, sizeof(sys_data)); 32 | 33 | hub75_color = sys_data.display_color; 34 | if(hub75_color == HUB75_Color_Black) 35 | hub75_blink = 1; 36 | else 37 | hub75_blink = 0; 38 | } 39 | 40 | void apl_sys_data_write(void) 41 | { 42 | bsp_w25qx_write_sector((uint8_t *)&sys_data, SYS_DATA_ADDR, sizeof(sys_data)); 43 | 44 | memcpy(&sys_data_pre, &sys_data, sizeof(sys_data)); 45 | } 46 | 47 | uint8_t apl_sys_data_changed(void) 48 | { 49 | uint8_t reval = 0; 50 | 51 | if(memcmp(&sys_data, &sys_data_pre, sizeof(sys_data)) == 0) 52 | reval = 0; 53 | else 54 | reval = 1; 55 | 56 | return reval; 57 | } 58 | 59 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/L4532P.kicad_mod: -------------------------------------------------------------------------------- 1 | (module L4532P (layer F.Cu) (tedit 6028EA5C) 2 | (descr "INDUCTOR

\nprecision wire wound") 3 | (fp_text reference L2 (at -1.905 -2.54) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 5 | ) 6 | (fp_text value Val** (at -1.905 3.81) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 8 | ) 9 | (fp_poly (pts (xy -0.5001 1) (xy 0.5001 1) (xy 0.5001 -1) (xy -0.5001 -1)) (layer F.Adhes) (width 0)) 10 | (fp_circle (center 0 0) (end 1.3211 0) (layer F.Fab) (width 0.1524)) 11 | (fp_line (start 1.448 -1.626) (end 1.448 1.626) (layer F.Fab) (width 0.1524)) 12 | (fp_line (start -1.448 -1.651) (end -1.448 1.626) (layer F.Fab) (width 0.1524)) 13 | (fp_line (start 2.311 -1.675) (end 2.311 1.626) (layer F.Fab) (width 0.1524)) 14 | (fp_line (start -2.311 -1.626) (end -2.311 1.626) (layer F.Fab) (width 0.1524)) 15 | (fp_line (start -2.311 1.653) (end 2.311 1.653) (layer F.Fab) (width 0.1524)) 16 | (fp_line (start 2.973 -1.983) (end 2.973 1.983) (layer Dwgs.User) (width 0.0508)) 17 | (fp_line (start -2.311 -1.675) (end 2.311 -1.675) (layer F.Fab) (width 0.1524)) 18 | (fp_line (start -2.973 1.983) (end -2.973 -1.983) (layer Dwgs.User) (width 0.0508)) 19 | (fp_line (start 2.973 1.983) (end -2.973 1.983) (layer Dwgs.User) (width 0.0508)) 20 | (fp_line (start -2.973 -1.983) (end 2.973 -1.983) (layer Dwgs.User) (width 0.0508)) 21 | (pad 1 smd rect (at -2 0) (size 1.8 3.6) (layers F.Cu F.Paste F.Mask) 22 | (solder_mask_margin 0.1016)) 23 | (pad 2 smd rect (at 2 0) (size 1.8 3.6) (layers F.Cu F.Paste F.Mask) 24 | (solder_mask_margin 0.1016)) 25 | (model "F:/03_Project/01_LED_Matrix/01_Hardware/V3/LED_Matrix_Control/3D_Package/SRN6045 Series.STEP" 26 | (at (xyz 0 0 0)) 27 | (scale (xyz 0.9 0.9 0.9)) 28 | (rotate (xyz -90 0 -90)) 29 | ) 30 | ) 31 | -------------------------------------------------------------------------------- /firmware/Project/API/api_task.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | //Task_HandleTypeDef htask[TASK_NUM]; 4 | //uint8_t htask_index; 5 | 6 | void api_task_tick(void) 7 | { 8 | uint8_t i = 0; 9 | 10 | for(i=0; iOpen-Source Hardware (OSHW) Logo - Large - Silkscreen\n

Silkscreen logo for open-source hardware designs.

\n

Devices using:\n

") 3 | (fp_text reference U$7 (at 0 0) (layer F.SilkS) hide 4 | (effects (font (size 1.27 1.27) (thickness 0.15))) 5 | ) 6 | (fp_text value "" (at 0 0) (layer F.SilkS) hide 7 | (effects (font (size 1.27 1.27) (thickness 0.15))) 8 | ) 9 | (fp_poly (pts (xy 0.9209 2.2231) (xy 1.2751 2.0407) (xy 2.1548 2.758) (xy 2.758 2.1548) 10 | (xy 2.0407 1.2751) (xy 2.3446 0.5413) (xy 3.4739 0.4265) (xy 3.4739 -0.4265) 11 | (xy 2.3446 -0.5413) (xy 2.223135 -0.920825) (xy 2.0407 -1.2751) (xy 2.758 -2.1548) 12 | (xy 2.1548 -2.758) (xy 1.2751 -2.0407) (xy 0.920825 -2.223135) (xy 0.5413 -2.3446) 13 | (xy 0.4265 -3.4739) (xy -0.4265 -3.4739) (xy -0.5413 -2.3446) (xy -0.920825 -2.223135) 14 | (xy -1.2751 -2.0407) (xy -2.1548 -2.758) (xy -2.758 -2.1548) (xy -2.0407 -1.2751) 15 | (xy -2.3446 -0.5413) (xy -3.4739 -0.4265) (xy -3.4739 0.4265) (xy -2.3446 0.5413) 16 | (xy -2.0407 1.2751) (xy -2.758 2.1548) (xy -2.1548 2.758) (xy -1.2751 2.0407) 17 | (xy -0.9209 2.2231) (xy -0.4186 1.0105) (xy -0.642938 0.884874) (xy -0.831748 0.710347) 18 | (xy -0.974596 0.496562) (xy -1.0938 0) (xy -1.0938 -0.000001) (xy -1.072784 -0.213384) 19 | (xy -1.010543 -0.418567) (xy -0.909469 -0.607666) (xy -0.773446 -0.773413) (xy -0.607701 -0.909438) 20 | (xy -0.418604 -1.010516) (xy -0.213422 -1.07276) (xy -0.000039 -1.09378) (xy 0.213345 -1.072767) 21 | (xy 0.41853 -1.01053) (xy 0.60763 -0.909459) (xy 0.773379 -0.773439) (xy 0.909408 -0.607697) 22 | (xy 1.010488 -0.418602) (xy 1.072736 -0.213421) (xy 1.09376 -0.000038) (xy 1.072751 0.213346) 23 | (xy 1.010517 0.418532) (xy 0.90945 0.607634) (xy 0.773433 0.773385) (xy 0.4186 1.0105)) (layer F.SilkS) (width 0)) 24 | ) 25 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/153CLV-0605.kicad_mod: -------------------------------------------------------------------------------- 1 | (module 153CLV-0605 (layer F.Cu) (tedit 6028F51F) 2 | (descr "Aluminum electrolytic capacitors

\nSMD (Chip) Long Life Vertical 153 CLV

\nhttp://www.bccomponents.com/") 3 | (fp_text reference C3 (at -6.53 -1.0042 -90) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 5 | ) 6 | (fp_text value 220uF (at -3.425 4.885) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 8 | ) 9 | (fp_line (start 2.4 -3.3) (end 3.3 -2.4) (layer F.SilkS) (width 0.2032)) 10 | (fp_line (start 3.3 2.4) (end 2.4 3.3) (layer F.SilkS) (width 0.2032)) 11 | (fp_line (start 3.3 1.1) (end 3.3 2.4) (layer F.SilkS) (width 0.2032)) 12 | (fp_line (start 3.3 -1.1) (end 3.3 1.1) (layer F.Fab) (width 0.2032)) 13 | (fp_line (start 3.3 -2.4) (end 3.3 -1.1) (layer F.SilkS) (width 0.2032)) 14 | (fp_line (start -3.3 -3.3) (end 2.4 -3.3) (layer F.SilkS) (width 0.2032)) 15 | (fp_line (start -3.3 -1.1) (end -3.3 -3.3) (layer F.SilkS) (width 0.2032)) 16 | (fp_line (start -3.3 1.1) (end -3.3 -1.1) (layer F.Fab) (width 0.2032)) 17 | (fp_line (start -3.3 3.3) (end -3.3 1.1) (layer F.SilkS) (width 0.2032)) 18 | (fp_line (start 2.4 3.3) (end -3.3 3.3) (layer F.SilkS) (width 0.2032)) 19 | (fp_arc (start 0.007838 0) (end -2.95 0.9) (angle -145.181395) (layer F.SilkS) (width 0.2032)) 20 | (fp_arc (start 0 -0.025) (end -2.95 0.9) (angle 34.818605) (layer F.Fab) (width 0.2032)) 21 | (fp_arc (start -0.007838 0) (end -2.95 -0.95) (angle 145.181395) (layer F.SilkS) (width 0.2032)) 22 | (fp_arc (start 0 0.025) (end 2.95 0.95) (angle -34.818605) (layer F.Fab) (width 0.2032)) 23 | (pad + smd rect (at 2.7 0) (size 3.5 1.6) (layers F.Cu F.Paste F.Mask) 24 | (solder_mask_margin 0.1016)) 25 | (pad - smd rect (at -2.7 0) (size 3.5 1.6) (layers F.Cu F.Paste F.Mask) 26 | (solder_mask_margin 0.1016)) 27 | (model ${KISYS3DMOD}/Capacitor_SMD.3dshapes/CP_Elec_6.3x7.7.wrl 28 | (at (xyz 0 0 0)) 29 | (scale (xyz 1 1 1)) 30 | (rotate (xyz 0 0 180)) 31 | ) 32 | ) 33 | -------------------------------------------------------------------------------- /firmware/Project/APL/apl_font_text.h: -------------------------------------------------------------------------------- 1 | #ifndef __FONT_H_ 2 | #define __FONT_H_ 3 | 4 | #define HZ_FONT_SIZE_0 0x0008D000U /* song12 font size: 577,536 bytes */ 5 | #define HZ_FONT_SIZE_1 0x000BC000U /* song16 font size: 770,048 bytes */ 6 | #define HZ_FONT_SIZE_2 0x001A5000U /* song24 font size: 1,724,416 bytes */ 7 | 8 | #define HZ_FONT_ADDR_0 SYS_FONT_ADDR /* song12 font addr in spi flash */ 9 | #define HZ_FONT_ADDR_1 HZ_FONT_ADDR_0 + HZ_FONT_SIZE_0 /* song16 font addr in spi flash */ 10 | #define HZ_FONT_ADDR_2 HZ_FONT_ADDR_1 + HZ_FONT_SIZE_1 /* song24 font addr in spi flash */ 11 | #define HZ_FONT_ADDR_END HZ_FONT_ADDR_2 + HZ_FONT_SIZE_2 /* end font addr in spi flash */ 12 | 13 | 14 | #define ASCII_FONT_STYLE 15 | 16 | //extern unsigned char ascii_1206[95][12]; 17 | //extern unsigned char ascii_1608[95][16]; 18 | //extern unsigned char ascii_2412[95][36]; 19 | 20 | extern uint32_t font_size; 21 | extern uint8_t font_mode; 22 | extern uint8_t font_buff[256]; 23 | 24 | /* rolling display handler definition */ 25 | typedef struct 26 | { 27 | uint16_t x_dis; 28 | uint16_t offset; 29 | uint16_t p_dev; 30 | 31 | } Roll_DisplayTypeDef; 32 | 33 | extern Roll_DisplayTypeDef roll[16]; 34 | 35 | uint8_t apl_font_erase(uint8_t index); 36 | void apl_font_upgrade(uint8_t *p_buff, uint16_t size); 37 | 38 | void apl_font_init(void); 39 | void apl_font_display_char(uint16_t x, uint16_t y, uint8_t ch, uint8_t size, uint8_t mode); 40 | void apl_font_display_string(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *p_str, uint8_t size); 41 | void apl_font_gethz(uint8_t *p_hz, uint8_t *p_data, uint8_t size); 42 | void apl_font_display_hz(uint16_t x, uint16_t y, uint8_t *p_hz, uint8_t size, uint8_t mode); 43 | void apl_font_display(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *p_str, uint8_t size, uint8_t mode); 44 | void apl_font_rolling(uint16_t y, uint8_t *p_str, uint8_t size, Roll_DisplayTypeDef *p_roll); 45 | void apl_font_reverse(uint16_t x, uint16_t y, uint16_t width, uint16_t height); 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /hardware/STM32_Core_Board/CAMOutputs/STM32_Core_Board-PTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | ; DRILL file {KiCad (5.1.9)-1} date 02/16/21 15:23:04 3 | ; FORMAT={-:-/ absolute / inch / decimal} 4 | ; #@! TF.CreationDate,2021-02-16T15:23:04+08:00 5 | ; #@! TF.GenerationSoftware,Kicad,Pcbnew,(5.1.9)-1 6 | ; #@! TF.FileFunction,Plated,1,2,PTH 7 | FMAT,2 8 | INCH 9 | T1C0.0079 10 | T2C0.0157 11 | T3C0.0236 12 | T4C0.0315 13 | T5C0.0394 14 | T6C0.0400 15 | % 16 | G90 17 | G05 18 | T1 19 | X2.425Y-6.185 20 | X2.595Y-6.14 21 | X3.025Y-6.06 22 | X3.175Y-5.775 23 | X3.31Y-6.065 24 | T2 25 | X2.275Y-5.825 26 | X2.275Y-6.075 27 | X2.325Y-5.755 28 | X2.325Y-6.145 29 | X2.4Y-5.9 30 | X2.44Y-6.145 31 | X2.59Y-5.94 32 | X2.5909Y-5.9801 33 | X2.782Y-5.875 34 | X2.782Y-6.008 35 | X2.954Y-5.896 36 | X3.0046Y-5.8996 37 | X3.05Y-6.16 38 | X3.075Y-5.865 39 | X3.12Y-6.02 40 | X3.1418Y-5.9 41 | X3.191Y-5.95 42 | X3.2034Y-5.7827 43 | X3.31Y-5.95 44 | X3.315Y-5.806 45 | X3.35Y-6.0 46 | X3.48Y-5.85 47 | X3.567Y-5.884 48 | X3.63Y-5.89 49 | X3.6901Y-6.1369 50 | X3.693Y-5.884 51 | X3.7Y-5.78 52 | X3.94Y-5.735 53 | X3.9737Y-6.1137 54 | T4 55 | X3.41Y-5.8529 56 | X3.41Y-6.045 57 | T5 58 | X3.87Y-5.8 59 | X3.87Y-5.9 60 | X3.87Y-6.0 61 | X3.87Y-6.1 62 | T6 63 | X2.1Y-5.65 64 | X2.1Y-6.25 65 | X2.2Y-5.65 66 | X2.2Y-6.25 67 | X2.3Y-5.65 68 | X2.3Y-6.25 69 | X2.4Y-5.65 70 | X2.4Y-6.25 71 | X2.49Y-5.77 72 | X2.49Y-5.87 73 | X2.5Y-5.65 74 | X2.5Y-6.25 75 | X2.59Y-5.77 76 | X2.59Y-5.87 77 | X2.6Y-5.65 78 | X2.6Y-6.25 79 | X2.69Y-5.77 80 | X2.69Y-5.87 81 | X2.7Y-5.65 82 | X2.7Y-6.25 83 | X2.8Y-5.65 84 | X2.8Y-6.25 85 | X2.9Y-5.65 86 | X2.9Y-6.25 87 | X3.0Y-5.65 88 | X3.0Y-6.25 89 | X3.1Y-5.65 90 | X3.1Y-6.25 91 | X3.2Y-5.65 92 | X3.2Y-6.25 93 | X3.3Y-5.65 94 | X3.3Y-6.25 95 | X3.4Y-5.65 96 | X3.4Y-6.25 97 | X3.5Y-5.65 98 | X3.5Y-6.25 99 | X3.6Y-5.65 100 | X3.6Y-6.25 101 | X3.7Y-5.65 102 | X3.7Y-6.25 103 | X3.8Y-5.65 104 | X3.8Y-6.25 105 | X3.9Y-5.65 106 | X3.9Y-6.25 107 | X4.0Y-5.65 108 | X4.0Y-6.25 109 | T3 110 | G00X2.0957Y-5.7551 111 | M15 112 | G01X2.0484Y-5.7551 113 | M16 114 | G05 115 | G00X2.0957Y-6.1449 116 | M15 117 | G01X2.0484Y-6.1449 118 | M16 119 | G05 120 | G00X2.2472Y-5.7551 121 | M15 122 | G01X2.2118Y-5.7551 123 | M16 124 | G05 125 | G00X2.2472Y-6.1449 126 | M15 127 | G01X2.2118Y-6.1449 128 | M16 129 | G05 130 | T0 131 | M30 132 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/TL4XPO.kicad_mod: -------------------------------------------------------------------------------- 1 | (module TL4XPO (layer F.Cu) (tedit 6028CAEA) 2 | (descr "TINY SWITCH

\nSource: http://www2.produktinfo.conrad.com/datenblaetter/700000-724999/705152-da-01-de-Subminiaturschalter_TL_36YO.pdf") 3 | (fp_text reference S1 (at 7.62 1.27 -270) (layer F.SilkS) 4 | (effects (font (size 1.6891 1.6891) (thickness 0.135128)) (justify left bottom)) 5 | ) 6 | (fp_text value TL46PO (at -5.08 -5.08 -180) (layer F.Fab) 7 | (effects (font (size 1.6891 1.6891) (thickness 0.135128)) (justify left bottom)) 8 | ) 9 | (fp_circle (center -3.175 0) (end -1.905 0) (layer F.Fab) (width 0.2032)) 10 | (fp_line (start -3.175 1.27) (end 0 1.27) (layer F.Fab) (width 0.2032)) 11 | (fp_line (start -3.175 -1.27) (end 0 -1.27) (layer F.Fab) (width 0.2032)) 12 | (fp_line (start -5.08 4.41) (end -5.08 -4.41) (layer F.SilkS) (width 0.2032)) 13 | (fp_line (start 5.08 4.41) (end -5.08 4.41) (layer F.SilkS) (width 0.2032)) 14 | (fp_line (start 5.08 -4.41) (end 5.08 4.41) (layer F.SilkS) (width 0.2032)) 15 | (fp_line (start -5.08 -4.41) (end 5.08 -4.41) (layer F.SilkS) (width 0.2032)) 16 | (fp_arc (start 0 0) (end 0 -1.27) (angle 180) (layer F.Fab) (width 0.2032)) 17 | (fp_arc (start 0 -0.000728) (end -1.375 -1.275) (angle 273.242292) (layer F.Fab) (width 0.2032)) 18 | (pad 1 thru_hole circle (at -2.54 -2.54 90) (size 1.6764 1.6764) (drill 1.1) (layers *.Cu *.Mask) 19 | (solder_mask_margin 0.1016)) 20 | (pad 2 thru_hole circle (at 0 -2.54 90) (size 1.6764 1.6764) (drill 1.1) (layers *.Cu *.Mask) 21 | (solder_mask_margin 0.1016)) 22 | (pad 3 thru_hole circle (at 2.54 -2.54 90) (size 1.6764 1.6764) (drill 1.1) (layers *.Cu *.Mask) 23 | (solder_mask_margin 0.1016)) 24 | (pad 4 thru_hole circle (at -2.54 2.54 90) (size 1.6764 1.6764) (drill 1.1) (layers *.Cu *.Mask) 25 | (solder_mask_margin 0.1016)) 26 | (pad 5 thru_hole circle (at 0 2.54 90) (size 1.6764 1.6764) (drill 1.1) (layers *.Cu *.Mask) 27 | (solder_mask_margin 0.1016)) 28 | (pad 6 thru_hole circle (at 2.54 2.54 90) (size 1.6764 1.6764) (drill 1.1) (layers *.Cu *.Mask) 29 | (solder_mask_margin 0.1016)) 30 | (model F:/03_Project/01_LED_Matrix/01_Hardware/V3/LED_Matrix_Control/3D_Package/PVA1EEH1--3DModel-STEP-56544.STEP 31 | (at (xyz 0 0 0)) 32 | (scale (xyz 1 1 1)) 33 | (rotate (xyz -90 0 -90)) 34 | ) 35 | ) 36 | -------------------------------------------------------------------------------- /firmware/Project/Inc/stm32f1xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f1xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 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 __STM32F1xx_IT_H 23 | #define __STM32F1xx_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 MemManage_Handler(void); 53 | void BusFault_Handler(void); 54 | void UsageFault_Handler(void); 55 | void SVC_Handler(void); 56 | void DebugMon_Handler(void); 57 | void PendSV_Handler(void); 58 | void SysTick_Handler(void); 59 | void TIM2_IRQHandler(void); 60 | void USART1_IRQHandler(void); 61 | /* USER CODE BEGIN EFP */ 62 | 63 | /* USER CODE END EFP */ 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif /* __STM32F1xx_IT_H */ 70 | -------------------------------------------------------------------------------- /firmware/Project/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 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 stm32f10x_system 25 | * @{ 26 | */ 27 | 28 | /** 29 | * @brief Define to prevent recursive inclusion 30 | */ 31 | #ifndef __SYSTEM_STM32F10X_H 32 | #define __SYSTEM_STM32F10X_H 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @addtogroup STM32F10x_System_Includes 39 | * @{ 40 | */ 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | 47 | /** @addtogroup STM32F10x_System_Exported_types 48 | * @{ 49 | */ 50 | 51 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 52 | extern const uint8_t AHBPrescTable[16U]; /*!< AHB prescalers table values */ 53 | extern const uint8_t APBPrescTable[8U]; /*!< APB prescalers table values */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/DrillFiles/drill_1_16.xln: -------------------------------------------------------------------------------- 1 | M48 2 | ;GenerationSoftware,Autodesk,EAGLE,9.6.2*% 3 | ;CreationDate,2020-08-10T13:56:09Z*% 4 | FMAT,2 5 | ICI,OFF 6 | METRIC,TZ,000.000 7 | T8C0.350 8 | T7C0.800 9 | T6C0.914 10 | T5C1.000 11 | T4C1.016 12 | T3C1.100 13 | T2C1.600 14 | T1C3.000 15 | % 16 | G90 17 | M71 18 | T1 19 | X6350Y73660 20 | X6350Y22860 21 | X93980Y22860 22 | X93980Y73660 23 | T2 24 | X85950Y26670 25 | X81990Y26670 26 | X78030Y26670 27 | X74070Y26670 28 | T3 29 | X7620Y33020 30 | X2540Y38100 31 | X2540Y35560 32 | X2540Y33020 33 | X7620Y38100 34 | X7620Y35560 35 | T4 36 | X52070Y44450 37 | X52070Y46990 38 | X52070Y49530 39 | X52070Y52070 40 | X52070Y54610 41 | X52070Y57150 42 | X52070Y59690 43 | X52070Y62230 44 | X52070Y64770 45 | X52070Y67310 46 | X52070Y69850 47 | X52070Y72390 48 | X27661Y22149 49 | X23139Y22149 50 | X67310Y57150 51 | X23139Y28651 52 | X27661Y28651 53 | X30759Y22149 54 | X35281Y22149 55 | X30759Y28651 56 | X35281Y28651 57 | X38379Y22149 58 | X42901Y22149 59 | X38379Y28651 60 | X42901Y28651 61 | X83820Y74930 62 | X81280Y74930 63 | X78740Y74930 64 | X15519Y22149 65 | X20041Y22149 66 | X15519Y28651 67 | X20041Y28651 68 | X67310Y24130 69 | X67310Y26670 70 | X67310Y29210 71 | X67310Y31750 72 | X67310Y34290 73 | X67310Y36830 74 | X67310Y39370 75 | X67310Y41910 76 | X67310Y44450 77 | X67310Y46990 78 | X67310Y49530 79 | X67310Y52070 80 | X67310Y54610 81 | X76200Y74930 82 | X67310Y59690 83 | X67310Y62230 84 | X67310Y64770 85 | X67310Y67310 86 | X67310Y69850 87 | X67310Y72390 88 | X52070Y24130 89 | X52070Y26670 90 | X52070Y29210 91 | X52070Y31750 92 | X52070Y34290 93 | X52070Y36830 94 | X52070Y39370 95 | X52070Y41910 96 | T5 97 | X5080Y47010 98 | X5080Y49510 99 | X14430Y60960 100 | T6 101 | X95250Y54610 102 | X92710Y39370 103 | X92710Y44450 104 | X95250Y41910 105 | X92710Y41910 106 | X95250Y44450 107 | X95250Y46990 108 | X92710Y46990 109 | X95250Y49530 110 | X92710Y49530 111 | X95250Y52070 112 | X92710Y52070 113 | X92710Y57150 114 | X92710Y54610 115 | X95250Y39370 116 | X95250Y57150 117 | T7 118 | X8430Y60960 119 | X11430Y56160 120 | T8 121 | X85725Y38735 122 | X17780Y52070 123 | X76835Y64135 124 | X43180Y68580 125 | X46990Y62230 126 | X90170Y66040 127 | X80645Y64135 128 | X81915Y64135 129 | X76200Y47625 130 | X79375Y64135 131 | X78105Y64135 132 | X87630Y44450 133 | X80645Y53975 134 | X79375Y53975 135 | X78105Y53975 136 | X74295Y54000 137 | X74295Y60960 138 | X27940Y42545 139 | X73025Y33630 140 | X72390Y69850 141 | X35560Y40640 142 | X60960Y66040 143 | X73025Y45593 144 | M30 -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/GerberFiles/drill_1_16.xln: -------------------------------------------------------------------------------- 1 | M48 2 | ;GenerationSoftware,Autodesk,EAGLE,9.6.2*% 3 | ;CreationDate,2020-08-10T13:56:09Z*% 4 | FMAT,2 5 | ICI,OFF 6 | METRIC,TZ,000.000 7 | T8C0.350 8 | T7C0.800 9 | T6C0.914 10 | T5C1.000 11 | T4C1.016 12 | T3C1.100 13 | T2C1.600 14 | T1C3.000 15 | % 16 | G90 17 | M71 18 | T1 19 | X6350Y73660 20 | X6350Y22860 21 | X93980Y22860 22 | X93980Y73660 23 | T2 24 | X85950Y26670 25 | X81990Y26670 26 | X78030Y26670 27 | X74070Y26670 28 | T3 29 | X7620Y33020 30 | X2540Y38100 31 | X2540Y35560 32 | X2540Y33020 33 | X7620Y38100 34 | X7620Y35560 35 | T4 36 | X52070Y44450 37 | X52070Y46990 38 | X52070Y49530 39 | X52070Y52070 40 | X52070Y54610 41 | X52070Y57150 42 | X52070Y59690 43 | X52070Y62230 44 | X52070Y64770 45 | X52070Y67310 46 | X52070Y69850 47 | X52070Y72390 48 | X27661Y22149 49 | X23139Y22149 50 | X67310Y57150 51 | X23139Y28651 52 | X27661Y28651 53 | X30759Y22149 54 | X35281Y22149 55 | X30759Y28651 56 | X35281Y28651 57 | X38379Y22149 58 | X42901Y22149 59 | X38379Y28651 60 | X42901Y28651 61 | X83820Y74930 62 | X81280Y74930 63 | X78740Y74930 64 | X15519Y22149 65 | X20041Y22149 66 | X15519Y28651 67 | X20041Y28651 68 | X67310Y24130 69 | X67310Y26670 70 | X67310Y29210 71 | X67310Y31750 72 | X67310Y34290 73 | X67310Y36830 74 | X67310Y39370 75 | X67310Y41910 76 | X67310Y44450 77 | X67310Y46990 78 | X67310Y49530 79 | X67310Y52070 80 | X67310Y54610 81 | X76200Y74930 82 | X67310Y59690 83 | X67310Y62230 84 | X67310Y64770 85 | X67310Y67310 86 | X67310Y69850 87 | X67310Y72390 88 | X52070Y24130 89 | X52070Y26670 90 | X52070Y29210 91 | X52070Y31750 92 | X52070Y34290 93 | X52070Y36830 94 | X52070Y39370 95 | X52070Y41910 96 | T5 97 | X5080Y47010 98 | X5080Y49510 99 | X14430Y60960 100 | T6 101 | X95250Y54610 102 | X92710Y39370 103 | X92710Y44450 104 | X95250Y41910 105 | X92710Y41910 106 | X95250Y44450 107 | X95250Y46990 108 | X92710Y46990 109 | X95250Y49530 110 | X92710Y49530 111 | X95250Y52070 112 | X92710Y52070 113 | X92710Y57150 114 | X92710Y54610 115 | X95250Y39370 116 | X95250Y57150 117 | T7 118 | X8430Y60960 119 | X11430Y56160 120 | T8 121 | X85725Y38735 122 | X17780Y52070 123 | X76835Y64135 124 | X43180Y68580 125 | X46990Y62230 126 | X90170Y66040 127 | X80645Y64135 128 | X81915Y64135 129 | X76200Y47625 130 | X79375Y64135 131 | X78105Y64135 132 | X87630Y44450 133 | X80645Y53975 134 | X79375Y53975 135 | X78105Y53975 136 | X74295Y54000 137 | X74295Y60960 138 | X27940Y42545 139 | X73025Y33630 140 | X72390Y69850 141 | X35560Y40640 142 | X60960Y66040 143 | X73025Y45593 144 | M30 -------------------------------------------------------------------------------- /firmware/Project/EWARM/settings/Project.dni: -------------------------------------------------------------------------------- 1 | [Stack] 2 | FillEnabled=0 3 | OverflowWarningsEnabled=1 4 | WarningThreshold=90 5 | SpWarningsEnabled=1 6 | WarnLogOnly=1 7 | UseTrigger=1 8 | TriggerName=main 9 | LimitSize=0 10 | ByteLimit=50 11 | [StLinkDriver] 12 | CStepIntDis=_ 0 13 | LeaveTargetRunning=_ 0 14 | [JLinkDriver] 15 | CStepIntDis=_ 0 16 | LeaveTargetRunning=_ 0 17 | TraceBufferSize=0x00010000 18 | TraceStallIfFIFOFull=0x00000000 19 | TracePortSize=0x00000000 20 | [DebugChecksum] 21 | Checksum=-87046997 22 | [Exceptions] 23 | StopOnUncaught=_ 0 24 | StopOnThrow=_ 0 25 | [CodeCoverage] 26 | Enabled=_ 0 27 | [CallStack] 28 | ShowArgs=0 29 | [Disassembly] 30 | MixedMode=1 31 | [SWOTraceHWSettings] 32 | OverrideDefaultClocks=0 33 | CpuClock=72000000 34 | ClockAutoDetect=0 35 | ClockWanted=2000000 36 | JtagSpeed=2000000 37 | Prescaler=36 38 | TimeStampPrescIndex=0 39 | TimeStampPrescData=0 40 | PcSampCYCTAP=1 41 | PcSampPOSTCNT=15 42 | PcSampIndex=0 43 | DataLogMode=0 44 | ITMportsEnable=0 45 | ITMportsTermIO=0 46 | ITMportsLogFile=0 47 | ITMlogFile=$PROJ_DIR$\ITM.log 48 | [struct_types] 49 | Fmt0=System_DataTypeDef-check_code 4 0 50 | Fmt1=System_DataTypeDef-initial_code 4 0 51 | [array_types] 52 | Fmt0=uint8_t[255] 4 0 53 | Fmt1=uint8_t[256] 4 0 54 | Fmt2=uint8_t[2] 4 0 55 | Fmt3=uint8_t[512] 4 0 56 | Fmt4=uint8_t[548] 4 0 57 | Fmt5=uint8_t[6144] 4 0 58 | [Trace1] 59 | Enabled=0 60 | ShowSource=1 61 | [Trace2] 62 | Enabled=0 63 | ShowSource=0 64 | [SWOTraceWindow] 65 | PcSampling=0 66 | InterruptLogs=0 67 | ForcedTimeStamps=0 68 | EventCPI=0 69 | EventEXC=0 70 | EventFOLD=0 71 | EventLSU=0 72 | EventSLEEP=0 73 | [PowerLog] 74 | Title_0=I0 75 | Symbol_0=0 4 0 76 | LogEnabled=0 77 | GraphEnabled=0 78 | ShowTimeLog=1 79 | LiveEnabled=0 80 | LiveFile=PowerLogLive.log 81 | [DataLog] 82 | LogEnabled=0 83 | GraphEnabled=0 84 | ShowTimeLog=1 85 | SumEnabled=0 86 | ShowTimeSum=1 87 | [EventLog] 88 | Title_0=Ch3 89 | Symbol_0=0 4 1 90 | Title_1=Ch2 91 | Symbol_1=0 4 1 92 | Title_2=Ch1 93 | Symbol_2=0 4 1 94 | Title_3=Ch0 95 | Symbol_3=0 4 1 96 | LogEnabled=0 97 | GraphEnabled=0 98 | ShowTimeLog=1 99 | SumEnabled=0 100 | ShowTimeSum=1 101 | SumSortOrder=0 102 | [InterruptLog] 103 | LogEnabled=0 104 | GraphEnabled=0 105 | ShowTimeLog=1 106 | SumEnabled=0 107 | ShowTimeSum=1 108 | SumSortOrder=0 109 | [Log file] 110 | LoggingEnabled=_ 0 111 | LogFile=_ "" 112 | Category=_ 0 113 | [TermIOLog] 114 | LoggingEnabled=_ 0 115 | LogFile=_ "" 116 | [DriverProfiling] 117 | Enabled=0 118 | Mode=1 119 | Graph=0 120 | Symbiont=0 121 | Exclusions= 122 | [CallStackLog] 123 | Enabled=0 124 | [CallStackStripe] 125 | ShowTiming=1 126 | [PowerProbe] 127 | Frequency=10000 128 | Probe0=I0 129 | ProbeSetup0=2 1 1 2 0 0 130 | [Disassemble mode] 131 | mode=0 132 | [Breakpoints2] 133 | Count=0 134 | [Aliases] 135 | Count=0 136 | SuppressDialog=0 137 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/B2B-XH-A.kicad_mod: -------------------------------------------------------------------------------- 1 | (module B2B-XH-A (layer F.Cu) (tedit 6028F18C) 2 | (descr "JST XH series header 2.50mm pitch disconnectable crimp style connectors, vertical (top entry type), 2 pins

\n\n") 3 | (fp_text reference X1 (at -5.735 -0.254 -90) (layer F.SilkS) 4 | (effects (font (size 0.9652 0.9652) (thickness 0.077216)) (justify right top)) 5 | ) 6 | (fp_text value B2B-XH-A (at 3.79 5.08) (layer F.Fab) 7 | (effects (font (size 0.9652 0.9652) (thickness 0.077216)) (justify right bottom)) 8 | ) 9 | (fp_poly (pts (xy 1.25 2.2) (xy 0.95 1.7) (xy 1.55 1.7)) (layer F.Fab) (width 0)) 10 | (fp_poly (pts (xy -1.57 0.32) (xy -0.93 0.32) (xy -0.93 -0.32) (xy -1.57 -0.32)) (layer F.Fab) (width 0)) 11 | (fp_poly (pts (xy 0.93 0.32) (xy 1.57 0.32) (xy 1.57 -0.32) (xy 0.93 -0.32)) (layer F.Fab) (width 0)) 12 | (fp_line (start -1.6 1.9) (end -1.6 2.35) (layer F.Fab) (width 0.1524)) 13 | (fp_line (start 1.6 1.9) (end 1.6 2.35) (layer F.Fab) (width 0.1524)) 14 | (fp_line (start 3.3 -2.95) (end 3.3 1.9) (layer F.Fab) (width 0.1524)) 15 | (fp_line (start 1.6 1.9) (end 3.3 1.9) (layer F.Fab) (width 0.1524)) 16 | (fp_line (start 0.6 1.9) (end 1.6 1.9) (layer F.Fab) (width 0.1524)) 17 | (fp_line (start -0.6 1.9) (end 0.6 1.9) (layer F.Fab) (width 0.1524)) 18 | (fp_line (start -1.6 1.9) (end -0.6 1.9) (layer F.Fab) (width 0.1524)) 19 | (fp_line (start -3.3 1.9) (end -1.6 1.9) (layer F.Fab) (width 0.1524)) 20 | (fp_line (start -3.3 -2.95) (end -3.3 1.9) (layer F.Fab) (width 0.1524)) 21 | (fp_line (start -3.3 -2.95) (end 3.3 -2.95) (layer F.Fab) (width 0.1524)) 22 | (fp_line (start -3.75 2.35) (end -3.75 -3.4) (layer F.Fab) (width 0.1524)) 23 | (fp_line (start -1.6 2.35) (end -3.75 2.35) (layer F.Fab) (width 0.1524)) 24 | (fp_line (start -0.6 2.35) (end -1.6 2.35) (layer F.Fab) (width 0.1524)) 25 | (fp_line (start 0.6 2.35) (end -0.6 2.35) (layer F.Fab) (width 0.1524)) 26 | (fp_line (start 1.6 2.35) (end 0.6 2.35) (layer F.Fab) (width 0.1524)) 27 | (fp_line (start 3.75 2.35) (end 1.6 2.35) (layer F.Fab) (width 0.1524)) 28 | (fp_line (start 3.75 -3.4) (end 3.75 2.35) (layer F.Fab) (width 0.1524)) 29 | (fp_line (start -3.75 -3.4) (end 3.75 -3.4) (layer F.Fab) (width 0.1524)) 30 | (fp_line (start -3.75 2.35) (end -3.75 -3.4) (layer F.SilkS) (width 0.1524)) 31 | (fp_line (start 3.75 2.35) (end -3.75 2.35) (layer F.SilkS) (width 0.1524)) 32 | (fp_line (start 3.75 -3.4) (end 3.75 2.35) (layer F.SilkS) (width 0.1524)) 33 | (fp_line (start -3.75 -3.4) (end 3.75 -3.4) (layer F.SilkS) (width 0.1524)) 34 | (pad 1 thru_hole rect (at 1.25 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask) 35 | (solder_mask_margin 0.1016)) 36 | (pad 2 thru_hole circle (at -1.25 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask) 37 | (solder_mask_margin 0.1016)) 38 | (model ${KISYS3DMOD}/Connector_JST.3dshapes/JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical.wrl 39 | (offset (xyz 1.25 0 0)) 40 | (scale (xyz 1 1 1)) 41 | (rotate (xyz 0 0 180)) 42 | ) 43 | ) 44 | -------------------------------------------------------------------------------- /firmware/Project/BSP/bsp_w25qx.h: -------------------------------------------------------------------------------- 1 | #ifndef __BSP_W25QX_H_ 2 | #define __BSP_W25QX_H_ 3 | 4 | /* w25qx definition */ 5 | #define W25QX_PAGE_SIZE (256u) // Page Size: 256 bytes 6 | #define W25QX_SECTOR_SIZE (W25QX_PAGE_SIZE * 16u) // Sector Size: 4 Kbytes 7 | #define W25QX_BLOCK_SIZE (W25QX_PAGE_SIZE * 256u) // Block Size: 64 Kbytes 8 | #define W25QX_DEVICE_ID (0xEF) // Winbond 9 | #define W25QX_JEDEC_ID (0x4018) // Manufacturer ID/Device ID/Memory Type (ID15-ID8)/Capacity (ID7-ID0) 10 | 11 | /* JEDEC definition */ 12 | #define JEDEC_CMD_WRSR (0x01) // Write Status Register 13 | #define JEDEC_CMD_PP (0x02) // Page Program 14 | #define JEDEC_CMD_READ (0x03) // Read Data 15 | #define JEDEC_CMD_WRDI (0x04) // Write Disable 16 | #define JEDEC_CMD_RDSR1 (0x05) // Read Status Register-1 17 | #define JEDEC_CMD_WREN (0x06) // Write Enable 18 | #define JEDEC_CMD_FAST_READ (0x0B) // Fast Read 19 | #define JEDEC_CMD_ERASE_4K (0x20) // 4KB Sector Erase 20 | #define JEDEC_CMD_RDSR2 (0x35) // Read Status Register-2 21 | #define JEDEC_CMD_WSREN (0x50) // Volatile SR Write Enable 22 | #define JEDEC_CMD_ERASE_32K (0x52) // 32KB Black Erase 23 | #define JEDEC_CMD_Device_ID (0x90) // Read Device ID 24 | #define JEDEC_CMD_JEDEC_ID (0x9F) // Read JEDEC ID 25 | #define JEDEC_CMD_ERASE_full (0xC7) // Chip Erase 26 | #define JEDEC_CMD_ERASE_64K (0xD8) // 64KB Block Erase 27 | 28 | #define W25QX_SPI_TIMEOUT (100u) 29 | #define W25QX_SPI_CS_H() SPI2_CS0_H() 30 | #define W25QX_SPI_CS_L() SPI2_CS0_L() 31 | 32 | extern SPI_HandleTypeDef hspi2; 33 | 34 | uint8_t bsp_w25qx_read_id(uint8_t *p_id); 35 | uint8_t bsp_w25qx_read(uint8_t *p_buff, uint32_t addr, uint16_t size); 36 | uint8_t bsp_w25qx_write_sector(uint8_t *p_buff, uint32_t addr, uint16_t size); 37 | uint8_t bsp_w25qx_write_page(uint8_t *p_buff, uint32_t addr, uint16_t size); 38 | uint8_t bsp_w25qx_write(uint8_t *p_buff, uint32_t addr, uint16_t size); 39 | uint8_t bsp_w25qx_erase_sector(uint16_t sector); 40 | uint8_t bsp_w25qx_erase_chip(void); 41 | static uint8_t bsp_w25qx_read_sr(uint8_t *p_sr); 42 | static uint8_t bsp_w25qx_write_sr(uint8_t *p_sr); 43 | static uint8_t bsp_w25qx_wait_busy(void); 44 | static uint8_t bsp_w25qx_write_enable(void); 45 | static uint8_t bsp_w25qx_write_disable(void); 46 | 47 | #endif /* __BSP_W25QX_H_ */ 48 | 49 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/GerberFiles/solderpaste_top.gbr: -------------------------------------------------------------------------------- 1 | G04 EAGLE Gerber RS-274X export* 2 | G75* 3 | %MOMM*% 4 | %FSLAX34Y34*% 5 | %LPD*% 6 | %INSolderpaste Top*% 7 | %IPPOS*% 8 | %AMOC8* 9 | 5,1,8,0,0,1.08239X$1,22.5*% 10 | G01* 11 | %ADD10R,10.800000X10.410000*% 12 | %ADD11R,1.066800X2.159000*% 13 | %ADD12R,1.600000X3.500000*% 14 | %ADD13R,1.700000X1.800000*% 15 | %ADD14R,1.500000X1.300000*% 16 | %ADD15R,1.200000X1.200000*% 17 | %ADD16R,1.300000X1.500000*% 18 | %ADD17R,1.701800X0.609600*% 19 | %ADD18R,0.660400X2.032000*% 20 | %ADD19R,1.800000X3.600000*% 21 | 22 | 23 | D10* 24 | X254000Y537210D03* 25 | D11* 26 | X219964Y453898D03* 27 | X236982Y453898D03* 28 | X254000Y453898D03* 29 | X271018Y453898D03* 30 | X288036Y453898D03* 31 | D12* 32 | X152400Y505028D03* 33 | X152400Y451028D03* 34 | D13* 35 | X342900Y500200D03* 36 | X342900Y541200D03* 37 | D14* 38 | X177800Y549300D03* 39 | X177800Y568300D03* 40 | D15* 41 | X243500Y647700D03* 42 | X264500Y647700D03* 43 | D16* 44 | X181000Y647700D03* 45 | X200000Y647700D03* 46 | D17* 47 | X399288Y692150D03* 48 | X399288Y679450D03* 49 | X399288Y666750D03* 50 | X399288Y654050D03* 51 | X464312Y654050D03* 52 | X464312Y666750D03* 53 | X464312Y679450D03* 54 | X464312Y692150D03* 55 | D18* 56 | X742950Y559308D03* 57 | X755650Y559308D03* 58 | X768350Y559308D03* 59 | X781050Y559308D03* 60 | X793750Y559308D03* 61 | X806450Y559308D03* 62 | X819150Y559308D03* 63 | X831850Y559308D03* 64 | X831850Y659892D03* 65 | X819150Y659892D03* 66 | X806450Y659892D03* 67 | X793750Y659892D03* 68 | X781050Y659892D03* 69 | X768350Y659892D03* 70 | X755650Y659892D03* 71 | X742950Y659892D03* 72 | X844550Y559308D03* 73 | X857250Y559308D03* 74 | X844550Y659892D03* 75 | X857250Y659892D03* 76 | D12* 77 | X419100Y505028D03* 78 | X419100Y451028D03* 79 | D14* 80 | X419100Y549300D03* 81 | X419100Y568300D03* 82 | D18* 83 | X742950Y356108D03* 84 | X755650Y356108D03* 85 | X768350Y356108D03* 86 | X781050Y356108D03* 87 | X793750Y356108D03* 88 | X806450Y356108D03* 89 | X819150Y356108D03* 90 | X831850Y356108D03* 91 | X831850Y456692D03* 92 | X819150Y456692D03* 93 | X806450Y456692D03* 94 | X793750Y456692D03* 95 | X781050Y456692D03* 96 | X768350Y456692D03* 97 | X755650Y456692D03* 98 | X742950Y456692D03* 99 | X844550Y356108D03* 100 | X857250Y356108D03* 101 | X844550Y456692D03* 102 | X857250Y456692D03* 103 | D16* 104 | X441300Y622300D03* 105 | X422300Y622300D03* 106 | D14* 107 | X192314Y352400D03* 108 | X192314Y333400D03* 109 | X152400Y352400D03* 110 | X152400Y333400D03* 111 | X272143Y352400D03* 112 | X272143Y333400D03* 113 | X232229Y352400D03* 114 | X232229Y333400D03* 115 | X351971Y352400D03* 116 | X351971Y333400D03* 117 | X312057Y352400D03* 118 | X312057Y333400D03* 119 | X431800Y352400D03* 120 | X431800Y333400D03* 121 | X391886Y352400D03* 122 | X391886Y333400D03* 123 | D16* 124 | X747420Y698500D03* 125 | X766420Y698500D03* 126 | X747420Y495300D03* 127 | X766420Y495300D03* 128 | D19* 129 | X324170Y450850D03* 130 | X364170Y450850D03* 131 | M02* 132 | -------------------------------------------------------------------------------- /firmware/Project/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/Project/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f1xx_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 STM32F1xx_HAL_PCD_EX_H 22 | #define STM32F1xx_HAL_PCD_EX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f1xx_hal_def.h" 30 | 31 | #if defined (USB) || defined (USB_OTG_FS) 32 | /** @addtogroup STM32F1xx_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 | #if defined (USB_OTG_FS) 51 | HAL_StatusTypeDef HAL_PCDEx_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size); 52 | HAL_StatusTypeDef HAL_PCDEx_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size); 53 | #endif /* defined (USB_OTG_FS) */ 54 | 55 | #if defined (USB) 56 | HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr, 57 | uint16_t ep_kind, uint32_t pmaadress); 58 | 59 | void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state); 60 | #endif /* defined (USB) */ 61 | void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg); 62 | void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg); 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** 69 | * @} 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** 77 | * @} 78 | */ 79 | #endif /* defined (USB) || defined (USB_OTG_FS) */ 80 | 81 | #ifdef __cplusplus 82 | } 83 | #endif 84 | 85 | 86 | #endif /* STM32F1xx_HAL_PCD_EX_H */ 87 | 88 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 89 | -------------------------------------------------------------------------------- /hardware/STM32_Core_Board/CAMOutputs/STM32_Core_Board-job.gbrjob: -------------------------------------------------------------------------------- 1 | { 2 | "Header": 3 | { 4 | "GenerationSoftware": 5 | { 6 | "Vendor": "KiCad", 7 | "Application": "Pcbnew", 8 | "Version": "(5.1.9)-1" 9 | }, 10 | "CreationDate": "2021-02-16T15:18:36+08:00" 11 | }, 12 | "GeneralSpecs": 13 | { 14 | "ProjectId": 15 | { 16 | "Name": "STM32_Core_Board", 17 | "GUID": "53544d33-325f-4436-9f72-655f426f6172", 18 | "Revision": "rev?" 19 | }, 20 | "Size": 21 | { 22 | "X": 53.390, 23 | "Y": 22.910 24 | }, 25 | "LayerNumber": 2, 26 | "BoardThickness": 1.600 27 | }, 28 | "DesignRules": 29 | [ 30 | { 31 | "Layers": "Outer", 32 | "PadToPad": 0.127, 33 | "PadToTrack": 0.127, 34 | "TrackToTrack": 0.127, 35 | "MinLineWidth": 0.250, 36 | "TrackToRegion": 0.128, 37 | "RegionToRegion": 0.128 38 | } 39 | ], 40 | "FilesAttributes": 41 | [ 42 | { 43 | "Path": "STM32_Core_Board-F_Cu.gbr", 44 | "FileFunction": "Copper,L1,Top", 45 | "FilePolarity": "Positive" 46 | }, 47 | { 48 | "Path": "STM32_Core_Board-B_Cu.gbr", 49 | "FileFunction": "Copper,L2,Bot", 50 | "FilePolarity": "Positive" 51 | }, 52 | { 53 | "Path": "STM32_Core_Board-F_Paste.gbr", 54 | "FileFunction": "SolderPaste,Top", 55 | "FilePolarity": "Positive" 56 | }, 57 | { 58 | "Path": "STM32_Core_Board-B_Paste.gbr", 59 | "FileFunction": "SolderPaste,Bot", 60 | "FilePolarity": "Positive" 61 | }, 62 | { 63 | "Path": "STM32_Core_Board-F_SilkS.gbr", 64 | "FileFunction": "Legend,Top", 65 | "FilePolarity": "Positive" 66 | }, 67 | { 68 | "Path": "STM32_Core_Board-B_SilkS.gbr", 69 | "FileFunction": "Legend,Bot", 70 | "FilePolarity": "Positive" 71 | }, 72 | { 73 | "Path": "STM32_Core_Board-F_Mask.gbr", 74 | "FileFunction": "SolderMask,Top", 75 | "FilePolarity": "Negative" 76 | }, 77 | { 78 | "Path": "STM32_Core_Board-B_Mask.gbr", 79 | "FileFunction": "SolderMask,Bot", 80 | "FilePolarity": "Negative" 81 | }, 82 | { 83 | "Path": "STM32_Core_Board-Edge_Cuts.gbr", 84 | "FileFunction": "Profile", 85 | "FilePolarity": "Positive" 86 | } 87 | ], 88 | "MaterialStackup": 89 | [ 90 | { 91 | "Type": "Legend", 92 | "Notes": "Layer F.SilkS" 93 | }, 94 | { 95 | "Type": "SolderPaste", 96 | "Notes": "Layer F.Paste" 97 | }, 98 | { 99 | "Type": "SolderMask", 100 | "Notes": "Layer F.Mask" 101 | }, 102 | { 103 | "Type": "Copper", 104 | "Notes": "Layer F.Cu" 105 | }, 106 | { 107 | "Type": "Dielectric", 108 | "Material": "FR4", 109 | "Notes": "Layers L1/L2" 110 | }, 111 | { 112 | "Type": "Copper", 113 | "Notes": "Layer B.Cu" 114 | }, 115 | { 116 | "Type": "SolderMask", 117 | "Notes": "Layer B.Mask" 118 | }, 119 | { 120 | "Type": "SolderPaste", 121 | "Notes": "Layer B.Paste" 122 | }, 123 | { 124 | "Type": "Legend", 125 | "Notes": "Layer B.SilkS" 126 | } 127 | ] 128 | } 129 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/SOIC-8.kicad_mod: -------------------------------------------------------------------------------- 1 | (module SOIC-8 (layer F.Cu) (tedit 6028A809) 2 | (descr "8-Pin SOIC 208-mil") 3 | (fp_text reference U1 (at -2.9845 0 -270) (layer F.SilkS) 4 | (effects (font (size 0.57912 0.57912) (thickness 0.115824)) (justify bottom)) 5 | ) 6 | (fp_text value W25Q32FV (at 2.9845 0 -270) (layer F.Fab) 7 | (effects (font (size 0.57912 0.57912) (thickness 0.115824)) (justify right top)) 8 | ) 9 | (fp_poly (pts (xy -1.7272 -3.95) (xy -2.0828 -3.95) (xy -2.0828 -2.64) (xy -1.7272 -2.64)) (layer F.Fab) (width 0)) 10 | (fp_poly (pts (xy -0.4572 -3.95) (xy -0.8128 -3.95) (xy -0.8128 -2.64) (xy -0.4572 -2.64)) (layer F.Fab) (width 0)) 11 | (fp_poly (pts (xy 0.8128 -3.95) (xy 0.4572 -3.95) (xy 0.4572 -2.64) (xy 0.8128 -2.64)) (layer F.Fab) (width 0)) 12 | (fp_poly (pts (xy 2.0828 -3.95) (xy 1.7272 -3.95) (xy 1.7272 -2.64) (xy 2.0828 -2.64)) (layer F.Fab) (width 0)) 13 | (fp_poly (pts (xy 1.7272 3.95) (xy 2.0828 3.95) (xy 2.0828 2.64) (xy 1.7272 2.64)) (layer F.Fab) (width 0)) 14 | (fp_poly (pts (xy 0.4572 3.95) (xy 0.8128 3.95) (xy 0.8128 2.64) (xy 0.4572 2.64)) (layer F.Fab) (width 0)) 15 | (fp_poly (pts (xy -0.8128 3.95) (xy -0.4572 3.95) (xy -0.4572 2.64) (xy -0.8128 2.64)) (layer F.Fab) (width 0)) 16 | (fp_poly (pts (xy -2.0828 3.95) (xy -1.7272 3.95) (xy -1.7272 2.64) (xy -2.0828 2.64)) (layer F.Fab) (width 0)) 17 | (fp_line (start -2.767 2.767) (end -2.44 2.767) (layer F.SilkS) (width 0.2032)) 18 | (fp_line (start 2.44 2.767) (end 2.767 2.767) (layer F.SilkS) (width 0.2032)) 19 | (fp_line (start 2.767 -2.767) (end 2.44 -2.767) (layer F.SilkS) (width 0.2032)) 20 | (fp_line (start -2.44 -2.767) (end -2.767 -2.767) (layer F.SilkS) (width 0.2032)) 21 | (fp_line (start 2.64 2.64) (end 2.64 -2.64) (layer F.Fab) (width 0.1524)) 22 | (fp_line (start -2.64 -2.64) (end -2.64 2.64) (layer F.Fab) (width 0.1524)) 23 | (fp_line (start -2.767 -2.767) (end -2.767 2.767) (layer F.SilkS) (width 0.2032)) 24 | (fp_line (start 2.64 -2.64) (end -2.64 -2.64) (layer F.Fab) (width 0.1524)) 25 | (fp_line (start 2.767 2.767) (end 2.767 -2.767) (layer F.SilkS) (width 0.2032)) 26 | (fp_line (start -2.64 2.64) (end 2.64 2.64) (layer F.Fab) (width 0.1524)) 27 | (fp_circle (center -3.194 2.051) (end -3.044 2.051) (layer F.SilkS) (width 0.3)) 28 | (pad 1 smd rect (at -1.905 3.2512) (size 0.6096 1.7018) (layers F.Cu F.Paste F.Mask) 29 | (solder_mask_margin 0.1016)) 30 | (pad 2 smd rect (at -0.635 3.2512) (size 0.6096 1.7018) (layers F.Cu F.Paste F.Mask) 31 | (solder_mask_margin 0.1016)) 32 | (pad 3 smd rect (at 0.635 3.2512) (size 0.6096 1.7018) (layers F.Cu F.Paste F.Mask) 33 | (solder_mask_margin 0.1016)) 34 | (pad 4 smd rect (at 1.905 3.2512) (size 0.6096 1.7018) (layers F.Cu F.Paste F.Mask) 35 | (solder_mask_margin 0.1016)) 36 | (pad 5 smd rect (at 1.905 -3.2512) (size 0.6096 1.7018) (layers F.Cu F.Paste F.Mask) 37 | (solder_mask_margin 0.1016)) 38 | (pad 6 smd rect (at 0.635 -3.2512) (size 0.6096 1.7018) (layers F.Cu F.Paste F.Mask) 39 | (solder_mask_margin 0.1016)) 40 | (pad 7 smd rect (at -0.635 -3.2512) (size 0.6096 1.7018) (layers F.Cu F.Paste F.Mask) 41 | (solder_mask_margin 0.1016)) 42 | (pad 8 smd rect (at -1.905 -3.2512) (size 0.6096 1.7018) (layers F.Cu F.Paste F.Mask) 43 | (solder_mask_margin 0.1016)) 44 | (model ${KISYS3DMOD}/Package_SO.3dshapes/SOIC-8_5.275x5.275mm_P1.27mm.wrl 45 | (at (xyz 0 0 0)) 46 | (scale (xyz 1 1 1)) 47 | (rotate (xyz 0 0 -90)) 48 | ) 49 | ) 50 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/TO263-5.kicad_mod: -------------------------------------------------------------------------------- 1 | (module TO263-5 (layer F.Cu) (tedit 6028D07C) 2 | (descr TO-263) 3 | (fp_text reference IC1 (at 1.8796 8.636) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 5 | ) 6 | (fp_text value LM2596S (at 6.858 5.588 90) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 8 | ) 9 | (fp_poly (pts (xy -5.1054 -7.267) (xy -5.1054 -7.6782) (xy -3.3782 -8.1354) (xy 3.3782 -8.1354) 10 | (xy 5.1054 -7.6782) (xy 5.1054 -7.267)) (layer F.Fab) (width 0)) 11 | (fp_poly (pts (xy 2.921 4.4704) (xy 3.8862 4.4704) (xy 3.8862 2.794) (xy 2.921 2.794)) (layer F.SilkS) (width 0)) 12 | (fp_poly (pts (xy 1.2192 4.4704) (xy 2.1844 4.4704) (xy 2.1844 2.794) (xy 1.2192 2.794)) (layer F.SilkS) (width 0)) 13 | (fp_poly (pts (xy -0.4826 4.4704) (xy 0.4826 4.4704) (xy 0.4826 2.794) (xy -0.4826 2.794)) (layer F.SilkS) (width 0)) 14 | (fp_poly (pts (xy -2.1844 4.4704) (xy -1.2192 4.4704) (xy -1.2192 2.794) (xy -2.1844 2.794)) (layer F.SilkS) (width 0)) 15 | (fp_poly (pts (xy 2.921 6.604) (xy 3.8862 6.604) (xy 3.8862 4.445) (xy 2.921 4.445)) (layer F.Fab) (width 0)) 16 | (fp_poly (pts (xy 1.2192 6.604) (xy 2.1844 6.604) (xy 2.1844 4.445) (xy 1.2192 4.445)) (layer F.Fab) (width 0)) 17 | (fp_poly (pts (xy -0.4826 6.604) (xy 0.4826 6.604) (xy 0.4826 4.445) (xy -0.4826 4.445)) (layer F.Fab) (width 0)) 18 | (fp_poly (pts (xy -2.1844 6.604) (xy -1.2192 6.604) (xy -1.2192 4.445) (xy -2.1844 4.445)) (layer F.Fab) (width 0)) 19 | (fp_poly (pts (xy -3.8862 4.4704) (xy -2.921 4.4704) (xy -2.921 2.794) (xy -3.8862 2.794)) (layer F.SilkS) (width 0)) 20 | (fp_poly (pts (xy -3.8862 6.604) (xy -2.921 6.604) (xy -2.921 4.445) (xy -3.8862 4.445)) (layer F.Fab) (width 0)) 21 | (fp_line (start 5.105 -7.267) (end -5.105 -7.267) (layer F.Fab) (width 0.2032)) 22 | (fp_line (start 5.105 -7.678) (end 5.105 -7.267) (layer F.Fab) (width 0.2032)) 23 | (fp_line (start 3.378 -8.135) (end 5.105 -7.678) (layer F.Fab) (width 0.2032)) 24 | (fp_line (start -3.378 -8.135) (end 3.378 -8.135) (layer F.Fab) (width 0.2032)) 25 | (fp_line (start -5.105 -7.678) (end -3.378 -8.135) (layer F.Fab) (width 0.2032)) 26 | (fp_line (start -5.105 -7.267) (end -5.105 -7.678) (layer F.Fab) (width 0.2032)) 27 | (fp_line (start -5.094 -7.165) (end 5.094 -7.165) (layer F.Fab) (width 0.2032)) 28 | (fp_line (start -5.094 2.88) (end -5.094 -7.165) (layer F.Fab) (width 0.2032)) 29 | (fp_line (start 5.094 2.88) (end -5.094 2.88) (layer F.SilkS) (width 0.2032)) 30 | (fp_line (start 5.094 -7.165) (end 5.094 2.88) (layer F.Fab) (width 0.2032)) 31 | (pad 6 smd rect (at 0 -2.54) (size 10.8 10.41) (layers F.Cu F.Paste F.Mask) 32 | (solder_mask_margin 0.1016)) 33 | (pad 1 smd rect (at -3.4036 5.7912) (size 1.0668 2.159) (layers F.Cu F.Paste F.Mask) 34 | (solder_mask_margin 0.1016)) 35 | (pad 2 smd rect (at -1.7018 5.7912) (size 1.0668 2.159) (layers F.Cu F.Paste F.Mask) 36 | (solder_mask_margin 0.1016)) 37 | (pad 3 smd rect (at 0 5.7912) (size 1.0668 2.159) (layers F.Cu F.Paste F.Mask) 38 | (solder_mask_margin 0.1016)) 39 | (pad 4 smd rect (at 1.7018 5.7912) (size 1.0668 2.159) (layers F.Cu F.Paste F.Mask) 40 | (solder_mask_margin 0.1016)) 41 | (pad 5 smd rect (at 3.4036 5.7912) (size 1.0668 2.159) (layers F.Cu F.Paste F.Mask) 42 | (solder_mask_margin 0.1016)) 43 | (model ${KISYS3DMOD}/Package_TO_SOT_SMD.3dshapes/TO-263-5_TabPin6.wrl 44 | (offset (xyz 0 0.5 0)) 45 | (scale (xyz 1 1 1)) 46 | (rotate (xyz 0 0 -90)) 47 | ) 48 | ) 49 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/settings/Project.wsdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Project/Project 7 | 8 | 9 | 10 | 11 | 12 | 201861 13 | 14 | 15 | 16 | 17 | 18 | 19 | 37727270 20 | 21 | 20139537293664941138664941138 22 | 23 | 24 | 25 | 26 | 27 | 28 | TabID-2802-25067 29 | Workspace 30 | Workspace 31 | 32 | 33 | ProjectProject/APIProject/APLProject/Output 34 | 35 | 36 | 37 | 0 38 | 39 | 40 | TabID-13551-25070 41 | Debug Log 42 | Debug-Log 43 | 44 | 45 | TabID-23735-26516BuildBuildTabID-31870-31686Ambiguous DefinitionsSelect-Ambiguous-DefinitionsTabID-471-6615DeclarationsFind-All-Declarations 46 | 47 | 1 48 | 49 | 50 | 51 | 52 | 53 | TextEditor$WS_DIR$\..\Src\main.c00000462410241000100000010000001 54 | 55 | 56 | 57 | 58 | 59 | 60 | iaridepm.enu1-2-2685451-2-2363403189063404213235938689067-2-22671922-2-219242691002083269809189063404213 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/NINIGI4C.kicad_mod: -------------------------------------------------------------------------------- 1 | (module NINIGI4C (layer F.Cu) (tedit 602908F8) 2 | (fp_text reference XS1 (at 2.413 6.858 -180) (layer F.SilkS) 3 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 4 | ) 5 | (fp_text value Val** (at -7.874 6.731 -180) (layer F.Fab) 6 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 7 | ) 8 | (fp_line (start 7.705246 4.715) (end 7.705246 -5.285) (layer F.SilkS) (width 0.162)) 9 | (fp_line (start -7.704762 4.715) (end -7.704762 -5.285) (layer F.SilkS) (width 0.162)) 10 | (fp_line (start -7.704762 2.149212) (end 7.705246 2.149212) (layer F.SilkS) (width 0.162)) 11 | (fp_line (start 7.705246 4.715) (end -7.704762 4.715) (layer F.SilkS) (width 0.162)) 12 | (fp_line (start -6.239271 -0.300484) (end -5.639271 -0.300484) (layer F.SilkS) (width 0.162)) 13 | (fp_line (start -5.639271 -0.300484) (end -5.639271 0.299515) (layer F.SilkS) (width 0.162)) 14 | (fp_line (start -5.639271 0.299515) (end -6.239271 0.299515) (layer F.SilkS) (width 0.162)) 15 | (fp_line (start -6.239271 0.299515) (end -6.239271 -0.300484) (layer F.SilkS) (width 0.162)) 16 | (fp_line (start -2.280243 -0.300484) (end -1.680243 -0.300484) (layer F.SilkS) (width 0.162)) 17 | (fp_line (start -1.680243 -0.300484) (end -1.680243 0.299515) (layer F.SilkS) (width 0.162)) 18 | (fp_line (start -1.680243 0.299515) (end -2.280243 0.299515) (layer F.SilkS) (width 0.162)) 19 | (fp_line (start -2.280243 0.299515) (end -2.280243 -0.300484) (layer F.SilkS) (width 0.162)) 20 | (fp_line (start 2.279756 -0.300484) (end 1.679756 -0.300484) (layer F.SilkS) (width 0.162)) 21 | (fp_line (start 1.679756 -0.300484) (end 1.679756 0.299515) (layer F.SilkS) (width 0.162)) 22 | (fp_line (start 1.679756 0.299515) (end 2.279756 0.299515) (layer F.SilkS) (width 0.162)) 23 | (fp_line (start 2.279756 0.299515) (end 2.279756 -0.300484) (layer F.SilkS) (width 0.162)) 24 | (fp_line (start 6.239756 -0.300484) (end 5.639756 -0.300484) (layer F.SilkS) (width 0.162)) 25 | (fp_line (start 5.639756 -0.300484) (end 5.639756 0.299515) (layer F.SilkS) (width 0.162)) 26 | (fp_line (start 5.639756 0.299515) (end 6.239756 0.299515) (layer F.SilkS) (width 0.162)) 27 | (fp_line (start 6.239756 0.299515) (end 6.239756 -0.300484) (layer F.SilkS) (width 0.162)) 28 | (fp_line (start -7.704762 -5.285) (end -4.764762 -5.285) (layer F.SilkS) (width 0.162)) 29 | (fp_line (start 4.765246 -5.285) (end 7.705246 -5.285) (layer F.SilkS) (width 0.162)) 30 | (fp_line (start -4.764762 -5.285) (end -4.764762 -4.87639) (layer F.SilkS) (width 0.162)) 31 | (fp_line (start 4.765246 -4.87639) (end 4.765246 -5.285) (layer F.SilkS) (width 0.162)) 32 | (fp_line (start -3.154756 -4.87639) (end -3.154756 -5.285) (layer F.SilkS) (width 0.162)) 33 | (fp_line (start 3.15524 -5.285) (end 3.15524 -4.87639) (layer F.SilkS) (width 0.162)) 34 | (fp_line (start -3.154756 -5.285) (end 3.15524 -5.285) (layer F.SilkS) (width 0.162)) 35 | (fp_line (start -4.764762 -4.87639) (end -3.154756 -4.87639) (layer F.SilkS) (width 0.162)) 36 | (fp_line (start 3.15524 -4.87639) (end 4.765246 -4.87639) (layer F.SilkS) (width 0.162)) 37 | (pad 1 thru_hole circle (at -5.94 0) (size 3 3) (drill 1.6) (layers *.Cu *.Mask) 38 | (solder_mask_margin 0.1016)) 39 | (pad 2 thru_hole circle (at -1.98 0) (size 3 3) (drill 1.6) (layers *.Cu *.Mask) 40 | (solder_mask_margin 0.1016)) 41 | (pad 3 thru_hole circle (at 1.98 0) (size 3 3) (drill 1.6) (layers *.Cu *.Mask) 42 | (solder_mask_margin 0.1016)) 43 | (pad 4 thru_hole circle (at 5.94 0) (size 3 3) (drill 1.6) (layers *.Cu *.Mask) 44 | (solder_mask_margin 0.1016)) 45 | (model F:/03_Project/01_LED_Matrix/01_Hardware/V3/LED_Matrix_Control/3D_Package/B4P-VH-O.STEP 46 | (offset (xyz 0 0.3 0)) 47 | (scale (xyz 1 1 1)) 48 | (rotate (xyz 0 0 180)) 49 | ) 50 | ) 51 | -------------------------------------------------------------------------------- /firmware/Project/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) 2020 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 "stm32f1xx_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 LED1_Pin GPIO_PIN_13 62 | #define LED1_GPIO_Port GPIOC 63 | #define HUB75_DR1_Pin GPIO_PIN_0 64 | #define HUB75_DR1_GPIO_Port GPIOA 65 | #define HUB75_DG1_Pin GPIO_PIN_1 66 | #define HUB75_DG1_GPIO_Port GPIOA 67 | #define HUB75_DB1_Pin GPIO_PIN_2 68 | #define HUB75_DB1_GPIO_Port GPIOA 69 | #define HUB75_DR2_Pin GPIO_PIN_3 70 | #define HUB75_DR2_GPIO_Port GPIOA 71 | #define HUB75_DG2_Pin GPIO_PIN_4 72 | #define HUB75_DG2_GPIO_Port GPIOA 73 | #define HUB75_DB2_Pin GPIO_PIN_5 74 | #define HUB75_DB2_GPIO_Port GPIOA 75 | #define HUB75_A_Pin GPIO_PIN_6 76 | #define HUB75_A_GPIO_Port GPIOA 77 | #define HUB75_B_Pin GPIO_PIN_7 78 | #define HUB75_B_GPIO_Port GPIOA 79 | #define HUB75_OE_Pin GPIO_PIN_0 80 | #define HUB75_OE_GPIO_Port GPIOB 81 | #define HUB75_CLK_Pin GPIO_PIN_1 82 | #define HUB75_CLK_GPIO_Port GPIOB 83 | #define HUB75_LAT_Pin GPIO_PIN_10 84 | #define HUB75_LAT_GPIO_Port GPIOB 85 | #define SPI2_CS_Pin GPIO_PIN_12 86 | #define SPI2_CS_GPIO_Port GPIOB 87 | #define HUB75_C_Pin GPIO_PIN_8 88 | #define HUB75_C_GPIO_Port GPIOA 89 | #define HUB75_D_Pin GPIO_PIN_9 90 | #define HUB75_D_GPIO_Port GPIOA 91 | #define HUB75_E_Pin GPIO_PIN_10 92 | #define HUB75_E_GPIO_Port GPIOA 93 | #define KEY_4_Pin GPIO_PIN_15 94 | #define KEY_4_GPIO_Port GPIOA 95 | #define KEY_3_Pin GPIO_PIN_3 96 | #define KEY_3_GPIO_Port GPIOB 97 | #define KEY_2_Pin GPIO_PIN_4 98 | #define KEY_2_GPIO_Port GPIOB 99 | #define KEY_1_Pin GPIO_PIN_5 100 | #define KEY_1_GPIO_Port GPIOB 101 | /* USER CODE BEGIN Private defines */ 102 | 103 | /* USER CODE END Private defines */ 104 | 105 | #ifdef __cplusplus 106 | } 107 | #endif 108 | 109 | #endif /* __MAIN_H */ 110 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/Project/Obj/Project.pbd.linf: -------------------------------------------------------------------------------- 1 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\Project.pbd.linf 2 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\api_gpio.pbi 3 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\api_spi.pbi 4 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\api_sys.pbi 5 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\api_task.pbi 6 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\api_tim.pbi 7 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\api_uart.pbi 8 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\apl_font_text.pbi 9 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\apl_key_menu.pbi 10 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\apl_led_matrix.pbi 11 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\apl_sys_data.pbi 12 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\apl_task.pbi 13 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\apl_uart_link.pbi 14 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\bsp_hub75.pbi 15 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\bsp_key.pbi 16 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\bsp_w25qx.pbi 17 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\main.pbi 18 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal.pbi 19 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_cortex.pbi 20 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_crc.pbi 21 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_dma.pbi 22 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_exti.pbi 23 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_flash.pbi 24 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_flash_ex.pbi 25 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_gpio.pbi 26 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_gpio_ex.pbi 27 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_msp.pbi 28 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_pcd.pbi 29 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_pcd_ex.pbi 30 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_pwr.pbi 31 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_rcc.pbi 32 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_rcc_ex.pbi 33 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_rtc.pbi 34 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_rtc_ex.pbi 35 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_spi.pbi 36 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_tim.pbi 37 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_tim_ex.pbi 38 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_hal_uart.pbi 39 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_it.pbi 40 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\stm32f1xx_ll_usb.pbi 41 | F:\03_Project\01_LED_Matrix\TinyMatrix\firmware\Project\EWARM\Project\Obj\system_stm32f1xx.pbi 42 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/1X04.kicad_mod: -------------------------------------------------------------------------------- 1 | (module 1X04 (layer F.Cu) (tedit 6028F7A8) 2 | (descr "PIN HEADER") 3 | (fp_text reference JP3 (at -1.27 -3.81 -180) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.12065)) (justify left bottom)) 5 | ) 6 | (fp_text value Val** (at -5.08 3.175 -180) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 8 | ) 9 | (fp_line (start 0 -0.635) (end 0.635 -1.27) (layer F.SilkS) (width 0.1524)) 10 | (fp_line (start 0.635 -1.27) (end 1.905 -1.27) (layer F.SilkS) (width 0.1524)) 11 | (fp_line (start 1.905 -1.27) (end 2.54 -0.635) (layer F.SilkS) (width 0.1524)) 12 | (fp_line (start 2.54 -0.635) (end 2.54 0.635) (layer F.SilkS) (width 0.1524)) 13 | (fp_line (start 2.54 0.635) (end 1.905 1.27) (layer F.SilkS) (width 0.1524)) 14 | (fp_line (start 1.905 1.27) (end 0.635 1.27) (layer F.SilkS) (width 0.1524)) 15 | (fp_line (start 0.635 1.27) (end 0 0.635) (layer F.SilkS) (width 0.1524)) 16 | (fp_line (start -4.445 -1.27) (end -3.175 -1.27) (layer F.SilkS) (width 0.1524)) 17 | (fp_line (start -3.175 -1.27) (end -2.54 -0.635) (layer F.SilkS) (width 0.1524)) 18 | (fp_line (start -2.54 -0.635) (end -2.54 0.635) (layer F.SilkS) (width 0.1524)) 19 | (fp_line (start -2.54 0.635) (end -3.175 1.27) (layer F.SilkS) (width 0.1524)) 20 | (fp_line (start -2.54 -0.635) (end -1.905 -1.27) (layer F.SilkS) (width 0.1524)) 21 | (fp_line (start -1.905 -1.27) (end -0.635 -1.27) (layer F.SilkS) (width 0.1524)) 22 | (fp_line (start -0.635 -1.27) (end 0 -0.635) (layer F.SilkS) (width 0.1524)) 23 | (fp_line (start 0 -0.635) (end 0 0.635) (layer F.SilkS) (width 0.1524)) 24 | (fp_line (start 0 0.635) (end -0.635 1.27) (layer F.SilkS) (width 0.1524)) 25 | (fp_line (start -0.635 1.27) (end -1.905 1.27) (layer F.SilkS) (width 0.1524)) 26 | (fp_line (start -1.905 1.27) (end -2.54 0.635) (layer F.SilkS) (width 0.1524)) 27 | (fp_line (start -5.08 -0.635) (end -5.08 0.635) (layer F.SilkS) (width 0.1524)) 28 | (fp_line (start -4.445 -1.27) (end -5.08 -0.635) (layer F.SilkS) (width 0.1524)) 29 | (fp_line (start -5.08 0.635) (end -4.445 1.27) (layer F.SilkS) (width 0.1524)) 30 | (fp_line (start -3.175 1.27) (end -4.445 1.27) (layer F.SilkS) (width 0.1524)) 31 | (fp_line (start 3.175 -1.27) (end 4.445 -1.27) (layer F.SilkS) (width 0.1524)) 32 | (fp_line (start 4.445 -1.27) (end 5.08 -0.635) (layer F.SilkS) (width 0.1524)) 33 | (fp_line (start 5.08 -0.635) (end 5.08 0.635) (layer F.SilkS) (width 0.1524)) 34 | (fp_line (start 5.08 0.635) (end 4.445 1.27) (layer F.SilkS) (width 0.1524)) 35 | (fp_line (start 3.175 -1.27) (end 2.54 -0.635) (layer F.SilkS) (width 0.1524)) 36 | (fp_line (start 2.54 0.635) (end 3.175 1.27) (layer F.SilkS) (width 0.1524)) 37 | (fp_line (start 4.445 1.27) (end 3.175 1.27) (layer F.SilkS) (width 0.1524)) 38 | (fp_poly (pts (xy 1.016 0.254) (xy 1.524 0.254) (xy 1.524 -0.254) (xy 1.016 -0.254)) (layer F.Fab) (width 0)) 39 | (fp_poly (pts (xy -1.524 0.254) (xy -1.016 0.254) (xy -1.016 -0.254) (xy -1.524 -0.254)) (layer F.Fab) (width 0)) 40 | (fp_poly (pts (xy -4.064 0.254) (xy -3.556 0.254) (xy -3.556 -0.254) (xy -4.064 -0.254)) (layer F.Fab) (width 0)) 41 | (fp_poly (pts (xy 3.556 0.254) (xy 4.064 0.254) (xy 4.064 -0.254) (xy 3.556 -0.254)) (layer F.Fab) (width 0)) 42 | (pad 1 thru_hole oval (at -3.81 0 90) (size 3.048 1.524) (drill 1.016) (layers *.Cu *.Mask) 43 | (solder_mask_margin 0.1016)) 44 | (pad 2 thru_hole oval (at -1.27 0 90) (size 3.048 1.524) (drill 1.016) (layers *.Cu *.Mask) 45 | (solder_mask_margin 0.1016)) 46 | (pad 3 thru_hole oval (at 1.27 0 90) (size 3.048 1.524) (drill 1.016) (layers *.Cu *.Mask) 47 | (solder_mask_margin 0.1016)) 48 | (pad 4 thru_hole oval (at 3.81 0 90) (size 3.048 1.524) (drill 1.016) (layers *.Cu *.Mask) 49 | (solder_mask_margin 0.1016)) 50 | (model ${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x04_P2.54mm_Vertical.wrl 51 | (offset (xyz -3.8 0 0)) 52 | (scale (xyz 1 1 1)) 53 | (rotate (xyz 0 0 -90)) 54 | ) 55 | ) 56 | -------------------------------------------------------------------------------- /firmware/Project/BSP/bsp_hub75.h: -------------------------------------------------------------------------------- 1 | #ifndef __BSP_HUB75_H_ 2 | #define __BSP_HUB75_H_ 3 | 4 | /* hub75 interface definition */ 5 | #define HUB75_PANEL_WIDTH (uint8_t)(64u) 6 | #define HUB75_PANEL_HEIGHT (uint8_t)(64u) 7 | 8 | #define HUB75_OE_H() HAL_GPIO_WritePin(HUB75_OE_GPIO_Port, HUB75_OE_Pin, GPIO_PIN_SET) 9 | #define HUB75_OE_L() HAL_GPIO_WritePin(HUB75_OE_GPIO_Port, HUB75_OE_Pin, GPIO_PIN_RESET) 10 | #define HUB75_CLK_H() HAL_GPIO_WritePin(HUB75_CLK_GPIO_Port, HUB75_CLK_Pin, GPIO_PIN_SET) 11 | #define HUB75_CLK_L() HAL_GPIO_WritePin(HUB75_CLK_GPIO_Port, HUB75_CLK_Pin, GPIO_PIN_RESET) 12 | #define HUB75_LAT_H() HAL_GPIO_WritePin(HUB75_LAT_GPIO_Port, HUB75_LAT_Pin, GPIO_PIN_SET) 13 | #define HUB75_LAT_L() HAL_GPIO_WritePin(HUB75_LAT_GPIO_Port, HUB75_LAT_Pin, GPIO_PIN_RESET) 14 | #define HUB75_DR1_H() HAL_GPIO_WritePin(HUB75_DR1_GPIO_Port, HUB75_DR1_Pin, GPIO_PIN_SET) 15 | #define HUB75_DR1_L() HAL_GPIO_WritePin(HUB75_DR1_GPIO_Port, HUB75_DR1_Pin, GPIO_PIN_RESET) 16 | #define HUB75_DG1_H() HAL_GPIO_WritePin(HUB75_DG1_GPIO_Port, HUB75_DG1_Pin, GPIO_PIN_SET) 17 | #define HUB75_DG1_L() HAL_GPIO_WritePin(HUB75_DG1_GPIO_Port, HUB75_DG1_Pin, GPIO_PIN_RESET) 18 | #define HUB75_DB1_H() HAL_GPIO_WritePin(HUB75_DB1_GPIO_Port, HUB75_DB1_Pin, GPIO_PIN_SET) 19 | #define HUB75_DB1_L() HAL_GPIO_WritePin(HUB75_DB1_GPIO_Port, HUB75_DB1_Pin, GPIO_PIN_RESET) 20 | #define HUB75_DR2_H() HAL_GPIO_WritePin(HUB75_DR2_GPIO_Port, HUB75_DR2_Pin, GPIO_PIN_SET) 21 | #define HUB75_DR2_L() HAL_GPIO_WritePin(HUB75_DR2_GPIO_Port, HUB75_DR2_Pin, GPIO_PIN_RESET) 22 | #define HUB75_DG2_H() HAL_GPIO_WritePin(HUB75_DG2_GPIO_Port, HUB75_DG2_Pin, GPIO_PIN_SET) 23 | #define HUB75_DG2_L() HAL_GPIO_WritePin(HUB75_DG2_GPIO_Port, HUB75_DG2_Pin, GPIO_PIN_RESET) 24 | #define HUB75_DB2_H() HAL_GPIO_WritePin(HUB75_DB2_GPIO_Port, HUB75_DB2_Pin, GPIO_PIN_SET) 25 | #define HUB75_DB2_L() HAL_GPIO_WritePin(HUB75_DB2_GPIO_Port, HUB75_DB2_Pin, GPIO_PIN_RESET) 26 | #define HUB75_A_H() HAL_GPIO_WritePin(HUB75_A_GPIO_Port, HUB75_A_Pin, GPIO_PIN_SET) 27 | #define HUB75_A_L() HAL_GPIO_WritePin(HUB75_A_GPIO_Port, HUB75_A_Pin, GPIO_PIN_RESET) 28 | #define HUB75_B_H() HAL_GPIO_WritePin(HUB75_B_GPIO_Port, HUB75_B_Pin, GPIO_PIN_SET) 29 | #define HUB75_B_L() HAL_GPIO_WritePin(HUB75_B_GPIO_Port, HUB75_B_Pin, GPIO_PIN_RESET) 30 | #define HUB75_C_H() HAL_GPIO_WritePin(HUB75_C_GPIO_Port, HUB75_C_Pin, GPIO_PIN_SET) 31 | #define HUB75_C_L() HAL_GPIO_WritePin(HUB75_C_GPIO_Port, HUB75_C_Pin, GPIO_PIN_RESET) 32 | #define HUB75_D_H() HAL_GPIO_WritePin(HUB75_D_GPIO_Port, HUB75_D_Pin, GPIO_PIN_SET) 33 | #define HUB75_D_L() HAL_GPIO_WritePin(HUB75_D_GPIO_Port, HUB75_D_Pin, GPIO_PIN_RESET) 34 | #define HUB75_E_H() HAL_GPIO_WritePin(HUB75_E_GPIO_Port, HUB75_E_Pin, GPIO_PIN_SET) 35 | #define HUB75_E_L() HAL_GPIO_WritePin(HUB75_E_GPIO_Port, HUB75_E_Pin, GPIO_PIN_RESET) 36 | 37 | /* hub75 color definition */ 38 | typedef enum 39 | { 40 | HUB75_Color_Black = 00U, 41 | HUB75_Color_Red = 01U, 42 | HUB75_Color_Green = 02U, 43 | HUB75_Color_Yellow = 03U, 44 | HUB75_Color_Blue = 04U, 45 | HUB75_Color_Pink = 05U, 46 | HUB75_Color_Cyan = 06U, 47 | HUB75_Color_White = 07U 48 | 49 | } HUB75_ColorTypeDef; 50 | 51 | /* hub75 led driver type */ 52 | #define HUB75_DRIVER_TYPE 2 // 0: SM1612 1: MBI5153 2: ICN2053/ICN2153 53 | 54 | extern uint8_t hub75_buff[HUB75_PANEL_WIDTH/8 * HUB75_PANEL_HEIGHT]; 55 | extern uint8_t hub75_color; 56 | extern uint8_t hub75_blink; 57 | 58 | extern uint8_t hub75_panel_buff[HUB75_PANEL_WIDTH * HUB75_PANEL_HEIGHT / 2 * 3]; 59 | 60 | void bsp_hub75_init(void); 61 | void bsp_hub75_write_byte(uint8_t p_buff[], uint8_t color); 62 | void bsp_hub75_write_pixel(uint8_t p_buff[]); 63 | void bsp_hub75_write_panel(uint8_t R, uint8_t G, uint8_t B, uint16_t row, uint16_t column); 64 | 65 | 66 | #endif /* __BSP_HUB75_H_ */ 67 | 68 | -------------------------------------------------------------------------------- /firmware/Project/APL/apl_task.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | void Task_Handle(void) 4 | { 5 | api_task_handle(); 6 | } 7 | 8 | void Task_Start(void) 9 | { 10 | /* add your task here */ 11 | api_task_create(Task_SysdataHandle, 2000); 12 | api_task_create(Task_KeyScan, 30); 13 | api_task_create(Task_MatrixBlink, 1000); 14 | api_task_create(Task_MatrixShift, sys_data.shift_period); 15 | api_task_create(Task_LED1, 1000); 16 | api_task_create(Task_MenuHandle, 100); 17 | api_task_create(Task_FontHandle, 10); 18 | //api_task_create(Task_UartTx, 50); 19 | } 20 | 21 | void Task_SysdataHandle(void) 22 | { 23 | if(apl_sys_data_changed()) 24 | { 25 | apl_sys_data_write(); 26 | } 27 | } 28 | 29 | void Task_MatrixDisplay(void) 30 | { 31 | if(tim2_is_up == 1) 32 | { 33 | api_tim_handle(); 34 | tim2_is_up = 0; 35 | } 36 | } 37 | 38 | void Task_MatrixBlink(void) 39 | { 40 | static uint8_t r = 255, g = 255, b = 255; 41 | 42 | #if 1 43 | if(hub75_blink) 44 | { 45 | if(hub75_color++ == HUB75_Color_White) 46 | hub75_color = HUB75_Color_Red; 47 | } 48 | #else 49 | bsp_hub75_write_panel(r,g,b,10,10); 50 | r -= 10; 51 | g -= 10; 52 | b -= 10; 53 | #endif 54 | 55 | } 56 | 57 | void Task_MatrixShift(void) 58 | { 59 | if(sys_data.font_size == 12) 60 | { 61 | apl_font_rolling( 0, sys_data.font_text[0], 12, &roll[0]); 62 | apl_font_rolling(13, sys_data.font_text[1], 12, &roll[1]); 63 | apl_font_rolling(26, sys_data.font_text[2], 12, &roll[2]); 64 | apl_font_rolling(39, sys_data.font_text[3], 12, &roll[3]); 65 | apl_font_rolling(52, sys_data.font_text[4], 12, &roll[4]); 66 | } 67 | else if(sys_data.font_size == 16) 68 | { 69 | apl_font_rolling( 0, sys_data.font_text[0], 16, &roll[0]); 70 | apl_font_rolling(16, sys_data.font_text[1], 16, &roll[1]); 71 | apl_font_rolling(32, sys_data.font_text[2], 16, &roll[2]); 72 | apl_font_rolling(48, sys_data.font_text[3], 16, &roll[3]); 73 | } 74 | else if(sys_data.font_size == 24) 75 | { 76 | apl_font_rolling( 5, sys_data.font_text[0], 24, &roll[0]); 77 | apl_font_rolling(35, sys_data.font_text[1], 24, &roll[1]); 78 | } 79 | else 80 | { 81 | apl_font_rolling( 0, sys_data.font_text[0], 16, &roll[0]); 82 | apl_font_rolling(16, sys_data.font_text[1], 16, &roll[1]); 83 | apl_font_rolling(32, sys_data.font_text[2], 16, &roll[2]); 84 | apl_font_rolling(48, sys_data.font_text[3], 16, &roll[3]); 85 | } 86 | 87 | } 88 | 89 | void Task_MatrixTest(void) 90 | { 91 | static char i = 0; 92 | 93 | if(i == 0) 94 | { 95 | HUB75_OE_L(); 96 | HUB75_CLK_L(); 97 | HUB75_LAT_L(); 98 | HUB75_DR1_L(); 99 | HUB75_DG1_L(); 100 | HUB75_DB1_L(); 101 | HUB75_DR2_L(); 102 | HUB75_DG2_L(); 103 | HUB75_DB2_L(); 104 | HUB75_A_L(); 105 | HUB75_B_L(); 106 | HUB75_C_L(); 107 | HUB75_D_L(); 108 | HUB75_E_L(); 109 | } 110 | else 111 | { 112 | HUB75_OE_H(); 113 | HUB75_CLK_H(); 114 | HUB75_LAT_H(); 115 | HUB75_DR1_H(); 116 | HUB75_DG1_H(); 117 | HUB75_DB1_H(); 118 | HUB75_DR2_H(); 119 | HUB75_DG2_H(); 120 | HUB75_DB2_H(); 121 | HUB75_A_H(); 122 | HUB75_B_H(); 123 | HUB75_C_H(); 124 | HUB75_D_H(); 125 | HUB75_E_H(); 126 | } 127 | 128 | if(++i == 2) 129 | i = 0; 130 | } 131 | 132 | void Task_LED1(void) 133 | { 134 | LED1_TOGGLE(); 135 | } 136 | 137 | void Task_KeyScan(void) 138 | { 139 | bsp_key_scan(); 140 | } 141 | 142 | void Task_MenuHandle(void) 143 | { 144 | apl_menu_handle(); 145 | } 146 | 147 | void Task_FontHandle(void) 148 | { 149 | if(font_mode == 0) 150 | { 151 | apl_ulink_handle(); 152 | } 153 | else if(font_mode == 1) 154 | { 155 | apl_ulink_handle(); 156 | } 157 | else if(font_mode == 2) 158 | { 159 | } 160 | } 161 | 162 | void Task_UartTx(void) 163 | { 164 | //api_uart_tx_start(&uart1, "---* KUKO Labs *---\r\n", 22); 165 | if(uart1.rx_state != UART_OVER) 166 | return; 167 | 168 | api_uart_tx_start(&uart1, uart1.rx_buff, uart1.rx_count); 169 | api_uart_rx_start(&uart1); 170 | } 171 | 172 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/GerberFiles/soldermask_bottom.gbr: -------------------------------------------------------------------------------- 1 | G04 EAGLE Gerber RS-274X export* 2 | G75* 3 | %MOMM*% 4 | %FSLAX34Y34*% 5 | %LPD*% 6 | %INSoldermask Bottom*% 7 | %IPPOS*% 8 | %AMOC8* 9 | 5,1,8,0,0,1.08239X$1,22.5*% 10 | G01* 11 | %ADD10C,2.387600*% 12 | %ADD11R,1.803200X1.803200*% 13 | %ADD12P,1.951766X8X112.500000*% 14 | %ADD13C,3.203200*% 15 | %ADD14C,1.879600*% 16 | %ADD15C,1.727200*% 17 | %ADD16P,1.759533X8X292.500000*% 18 | 19 | 20 | D10* 21 | X103378Y561600D02* 22 | X125222Y561600D01* 23 | X84300Y598678D02* 24 | X84300Y620522D01* 25 | X144300Y620522D02* 26 | X144300Y598678D01* 27 | D11* 28 | X50800Y495100D03* 29 | D12* 30 | X50800Y470100D03* 31 | D13* 32 | X859500Y266700D03* 33 | X819900Y266700D03* 34 | X780300Y266700D03* 35 | X740700Y266700D03* 36 | D14* 37 | X76200Y381000D03* 38 | X76200Y355600D03* 39 | X76200Y330200D03* 40 | X25400Y381000D03* 41 | X25400Y355600D03* 42 | X25400Y330200D03* 43 | D15* 44 | X155194Y229108D02* 45 | X155194Y213868D01* 46 | X200406Y213868D02* 47 | X200406Y229108D01* 48 | X155194Y278892D02* 49 | X155194Y294132D01* 50 | X200406Y294132D02* 51 | X200406Y278892D01* 52 | X665480Y241300D02* 53 | X680720Y241300D01* 54 | X680720Y266700D02* 55 | X665480Y266700D01* 56 | X665480Y292100D02* 57 | X680720Y292100D01* 58 | X680720Y317500D02* 59 | X665480Y317500D01* 60 | X665480Y342900D02* 61 | X680720Y342900D01* 62 | X680720Y368300D02* 63 | X665480Y368300D01* 64 | X665480Y393700D02* 65 | X680720Y393700D01* 66 | X680720Y419100D02* 67 | X665480Y419100D01* 68 | X665480Y444500D02* 69 | X680720Y444500D01* 70 | X680720Y469900D02* 71 | X665480Y469900D01* 72 | X665480Y495300D02* 73 | X680720Y495300D01* 74 | X680720Y520700D02* 75 | X665480Y520700D01* 76 | X665480Y546100D02* 77 | X680720Y546100D01* 78 | X680720Y571500D02* 79 | X665480Y571500D01* 80 | X665480Y596900D02* 81 | X680720Y596900D01* 82 | X680720Y622300D02* 83 | X665480Y622300D01* 84 | X665480Y647700D02* 85 | X680720Y647700D01* 86 | X680720Y673100D02* 87 | X665480Y673100D01* 88 | X665480Y698500D02* 89 | X680720Y698500D01* 90 | X680720Y723900D02* 91 | X665480Y723900D01* 92 | X528320Y241300D02* 93 | X513080Y241300D01* 94 | X513080Y266700D02* 95 | X528320Y266700D01* 96 | X528320Y292100D02* 97 | X513080Y292100D01* 98 | X513080Y317500D02* 99 | X528320Y317500D01* 100 | X528320Y342900D02* 101 | X513080Y342900D01* 102 | X513080Y368300D02* 103 | X528320Y368300D01* 104 | X528320Y393700D02* 105 | X513080Y393700D01* 106 | X513080Y419100D02* 107 | X528320Y419100D01* 108 | X528320Y444500D02* 109 | X513080Y444500D01* 110 | X513080Y469900D02* 111 | X528320Y469900D01* 112 | X528320Y495300D02* 113 | X513080Y495300D01* 114 | X513080Y520700D02* 115 | X528320Y520700D01* 116 | X528320Y546100D02* 117 | X513080Y546100D01* 118 | X513080Y571500D02* 119 | X528320Y571500D01* 120 | X528320Y596900D02* 121 | X513080Y596900D01* 122 | X513080Y622300D02* 123 | X528320Y622300D01* 124 | X528320Y647700D02* 125 | X513080Y647700D01* 126 | X513080Y673100D02* 127 | X528320Y673100D01* 128 | X528320Y698500D02* 129 | X513080Y698500D01* 130 | X513080Y723900D02* 131 | X528320Y723900D01* 132 | D16* 133 | X927100Y571500D03* 134 | X952500Y571500D03* 135 | X927100Y546100D03* 136 | X952500Y546100D03* 137 | X927100Y520700D03* 138 | X952500Y520700D03* 139 | X927100Y495300D03* 140 | X952500Y495300D03* 141 | X927100Y469900D03* 142 | X952500Y469900D03* 143 | X927100Y444500D03* 144 | X952500Y444500D03* 145 | X927100Y419100D03* 146 | X952500Y419100D03* 147 | X927100Y393700D03* 148 | X952500Y393700D03* 149 | D15* 150 | X231394Y229108D02* 151 | X231394Y213868D01* 152 | X276606Y213868D02* 153 | X276606Y229108D01* 154 | X231394Y278892D02* 155 | X231394Y294132D01* 156 | X276606Y294132D02* 157 | X276606Y278892D01* 158 | X307594Y229108D02* 159 | X307594Y213868D01* 160 | X352806Y213868D02* 161 | X352806Y229108D01* 162 | X307594Y278892D02* 163 | X307594Y294132D01* 164 | X352806Y294132D02* 165 | X352806Y278892D01* 166 | X383794Y229108D02* 167 | X383794Y213868D01* 168 | X429006Y213868D02* 169 | X429006Y229108D01* 170 | X383794Y278892D02* 171 | X383794Y294132D01* 172 | X429006Y294132D02* 173 | X429006Y278892D01* 174 | X838200Y741680D02* 175 | X838200Y756920D01* 176 | X812800Y756920D02* 177 | X812800Y741680D01* 178 | X787400Y741680D02* 179 | X787400Y756920D01* 180 | X762000Y756920D02* 181 | X762000Y741680D01* 182 | D13* 183 | X63500Y736600D03* 184 | X63500Y228600D03* 185 | X939800Y228600D03* 186 | X939800Y736600D03* 187 | M02* 188 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## TinyMatrix点阵控制器 3 | > 基于STM32F103 Microcontroller,HUB75接口的点阵控制器。可通过1 x 4按键、串口指令控制LED点阵屏显示。 4 | 5 | ![](https://github.com/sparkjl/TinyMatrix/blob/main/images/Tiny%20Matrix.png) 6 | 7 | ### 1. 硬件 8 | #### 1.1. HUB75接口定义 9 | Led点阵板的HUB75接口,一般以DC3-16P牛角座封装形式接入。通常Led点阵板的左右两侧各有一个HUB75接口IN、OUT,以实现多块Led点阵板的组合扩展。HUB75接口中:R1、G1、B1分别为上半屏的红、绿、蓝控制信号,R2、G2、B2分别为下半屏的红、绿、蓝控制信号,A、B、C、D、E为行选择信号,CLK为数据时钟信号,LAT为数据锁存信号,OE为输出使能信号,GND为信号地。 10 | 11 |
12 | 13 |
14 | 15 | #### 1.2. HUB75扫描方式 16 | 将行扫描信号、行选择信号进行组合控制,就实现了整个Led点阵板的扫描显示。其具体实现过程如下: 17 | 18 |
19 | 20 |
21 | 22 | 1. 从DATA_IN引脚(R1、G1、B1、R2、G2、B2)写入1 bit数据,将CLK引脚拉高产生上升沿将数据写入移位寄存器。如此循环m次将一行m bit数据传输至移位寄存器。 23 | 2. 将LATCH、OE引脚拉高,m bit数据被从移位寄存器传输至缓存寄存器。同时缓存寄存器中数据被保持禁止从输出驱动器中输出,以使得在行选择信号切换时没有Led被点亮。 24 | 3. 切换并输出行选择信号。(初始状态时,第0行、第32行被选中。) 25 | 4. 将LATCH、OE引脚拉低,m bit数据被从缓存寄存器传输至输出驱动器。同时移位寄存器中数据被锁存禁止从缓存寄存器中移出,此时对应选中行Led被点亮。 26 | 27 | 将以上步骤执行n/2次,便能实现m x n像素Led点阵板整个画面的扫描显示。如果扫描频率足够低,我们能看到逐行扫描显示的全过程: 28 | 29 |
30 | 31 |
32 | 33 | 基于人眼视觉暂留效应(余晖效应),我们无法分辨刷新率在24Hz以上的动态画面。如果将扫描频率设置在60Hz,我们就能看到一幅完整的静态画面。而这也就是常见的显示器的基本原理。 34 | 35 | 最后,将Led点阵板上下两个部分的R1、G1、B1、R2、G2、B2控制信号进行组合,便能基于光学RGB模型实现全彩显示。 36 | 37 | 38 | #### 1.3. Led Matrix控制板设计 39 | 了解了HUB75接口的控制原理,接下来进行Led Matrix控制板设计。 40 | 41 | Led Matrix控制板设计思路如下: 42 | 43 |
44 | 45 |
46 | 47 | Led Matrix控制板的核心选择的是一款尺寸为 22.86mm x 53.34mm 的STM32最小系统板。其通过2 x 20Pin GPIO排针将板载STM32F103C8T6 MCU内集成的2x SPI、3x USART、2x I2C、1x CAN、37x I/O、2x ADC、4x Timer等硬件资源引出,以便外围扩展板调用。固件程序可通过SWD接口进行烧录和调试,可通过Reset键复位。板载2路Led灯,一路用于电源状态指示,一路用于程序状态指示。 48 | 49 |
50 | 51 |
52 | 53 | Led Matrix控制板设计1 x 4按键用于点阵控制器的参数设置。MCU相关GPIO经由74HC245连接至HUB75接口,以增加驱动电流并将驱动电压从3.3v转换至5.0v。外挂的W25Qxx系列SPI Flash用于存储系统参数和字库数据。UART串口可用于下载系统参数和字库数据,TTL-蓝牙模块、TTL-WiFi模块通过UART串口建立与MCU间的通讯以实现控制指令、显示数据的无线透传。Led Matrix控制板由外接电源适配器或内置锂离子电池提供系统电源,直流降压电路实现系统电源从12v-> 5v-> 3.3v电压转换以给各功能单元供电。 54 | 55 | 基于以上硬件需求,将Led Matrix控制板通过Eagle PCB设计如下。至于为什么是Eagle PCB,那是因为其小巧精悍、简单易用,丰富的元件库、精美的原理图、标准vector字体,无不透露着严谨精致。可惜的是,被Autodesk收购后的Eagle 9.6.2对于3D模型的预览编辑需要通过Fusion 360来实现。 56 | 57 |
58 | 59 |
60 |
61 | 62 |
63 | 64 | ### 2. 结构 65 | 66 | Eagle 9.6.2不支持直接编辑3D封装,而只能通过Fusion 360以云托管元件库的方式导入。不想从Fusion 360中重构元件库,但又追求项目完整性,这怎么解决呢?那就选择KiCad,不仅支持3D封装的直接编辑,还能将Eagle的.sch原理图文件、.brd电路板文件转换成对应的KiCad格式文件。 67 | 68 | 使用KiCad将Led Matrix控制板的Eagle格式文件转换成KiCad格式文件,基于此添加编辑3D封装,导出Led Matrix控制板3D Step模型文件。 69 | 70 | 使用KiCad对MCU核心板重新进行layout,添加编辑3D封装,导出MCU核心板3D Step模型文件。 71 | 72 | 在Fusion 360中将Led Matrix控制板和MCU核心板进行零件装配、干涉检查。 73 | 74 | ![](https://github.com/sparkjl/TinyMatrix/blob/main/images/led_matrix_step_3.png) 75 | 76 | 在Fusion 360中将Led Matrix控制板设置为固定零件,以此为基准依据Led Matrix控制板的空间尺寸设计Led Matrix控制器的整体结构。选择亚克力板材作为外壳材质。顶部和底部亚克力板通过双通螺母柱进行连接,Led Matrix控制板和Led点阵板与底部亚克力板连接固定,四侧亚克力板与顶部和底部亚克力板通过卡扣扣合进行连接。 77 | 78 | ![](https://github.com/sparkjl/TinyMatrix/blob/main/images/led_matrix_step_4.png) 79 | 80 | ### 3. 软件 81 | #### 3.1. RGB LED全彩显示 82 | 控制RGB LED实现全彩显示的传统方式是脉宽调制(Pulse Width Modulation),简称PWM。通过脉宽调制控制LED开关时间占比,进而实现RGB LED的亮度调节。如果对RGB模块中的三个LED进行此操作,则可以将红绿蓝三色按比例混合成对应的RGB全彩输出。对于Led Matrix Panel的全彩显示,PWM方式却不适用:这需要足够多的GPIO和定时器独立控制,需要消耗太多的硬件资源。那么我们如何通过软件方式予以解决呢? 83 | 84 | 二进制编码调制(Binary Code Modulation),简称BCM。BCM利用二进制编码性质控制开关信号占空比。假设有一个位宽为4的二进制数:从其最低位向左移动至最高位依次表示1个时间切片、2个时间切片、4个时间切片、8个时间切片。将这4种时间切片混合,可产生分辨率为1/15的任意占空比。如此,位宽越大分辨率越高色彩越丰富。位宽为8的二进制数,可表示分辨率为1/255的任意占空比。但位宽越大,时间切片越小,意味着更高的CPU占用率。为更好地平衡系统性能和硬件资源,本项目中BCM位宽为4。例如,4位二进制数0101表示5/15或33.3%的占空比。 85 | 86 |
87 | 88 |
89 | 90 | Led Matrix Panel是逐行扫描显示的,所以需要预先将图像像素色彩转换成BCM值保存至图像缓冲区。创建4个图像缓冲区,以表示BCM位宽为4情况下的4种长度的时间切片中在扫描时间范围内哪些时间切片需要点亮LED。将这4个图像缓冲区构成的4个颜色通道Plane,进行图像融合就构成了一幅完整的静态图像。 91 | 92 |
93 | 94 |
95 | 96 | -------------------------------------------------------------------------------- /firmware/Project/API/api_uart.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | Uart_StructTypeDef uart1, uart2, uart3; 4 | 5 | 6 | void api_uart_tick(void) 7 | { 8 | /* uart1 rx tick */ 9 | if(uart1.rx_state == UART_BUSY) 10 | { 11 | uart1.rx_tick++; 12 | if(uart1.rx_tick > UART_RT_TIMEOUT) 13 | { 14 | uart1.rx_state = UART_OVER; 15 | } 16 | } 17 | 18 | /* uart1 tx tick */ 19 | if(uart1.tx_state == UART_BUSY) 20 | { 21 | uart1.tx_tick++; 22 | if(uart1.tx_tick > UART_RT_TIMEOUT) 23 | { 24 | uart1.tx_state = UART_OVER; 25 | } 26 | } 27 | 28 | /* uart2 rx tick */ 29 | if(uart2.rx_state == UART_BUSY) 30 | { 31 | uart2.rx_tick++; 32 | if(uart2.rx_tick > UART_RT_TIMEOUT) 33 | { 34 | uart2.rx_state = UART_OVER; 35 | } 36 | } 37 | 38 | /* uart2 tx tick */ 39 | if(uart2.tx_state == UART_BUSY) 40 | { 41 | uart2.tx_tick++; 42 | if(uart2.tx_tick > UART_RT_TIMEOUT) 43 | { 44 | uart2.tx_state = UART_OVER; 45 | } 46 | } 47 | 48 | /* uart3 rx tick */ 49 | if(uart3.rx_state == UART_BUSY) 50 | { 51 | uart3.rx_tick++; 52 | if(uart3.rx_tick > UART_RT_TIMEOUT) 53 | { 54 | uart3.rx_state = UART_OVER; 55 | } 56 | } 57 | 58 | /* uart3 tx tick */ 59 | if(uart3.tx_state == UART_BUSY) 60 | { 61 | uart3.tx_tick++; 62 | if(uart3.tx_tick > UART_RT_TIMEOUT) 63 | { 64 | uart3.tx_state = UART_OVER; 65 | } 66 | } 67 | } 68 | 69 | void api_uart_init(void) 70 | { 71 | HAL_UART_Receive_IT(&huart1, &uart1.rx_cache, 1); //uart1 enable receive interrupt 72 | api_uart_rx_start(&uart1); //uart1 start to receive 73 | 74 | } 75 | 76 | /* non blocking mode uart receive */ 77 | void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) 78 | { 79 | if(huart->Instance == USART1) 80 | { 81 | if(uart1.rx_state != UART_OVER) 82 | { 83 | if(uart1.rx_count < UART_BUFF_LEN) 84 | { 85 | uart1.rx_buff[uart1.rx_count++] = uart1.rx_cache; 86 | } 87 | uart1.rx_state = UART_BUSY; 88 | } 89 | uart1.rx_tick = 0; 90 | HAL_UART_Receive_IT(&huart1, &uart1.rx_cache, 1); 91 | } 92 | 93 | if(huart->Instance == USART2) 94 | { 95 | if(uart2.rx_state != UART_OVER) 96 | { 97 | if(uart2.rx_count < UART_BUFF_LEN) 98 | { 99 | uart2.rx_buff[uart2.rx_count++] = uart2.rx_cache; 100 | } 101 | uart2.rx_state = UART_BUSY; 102 | } 103 | uart2.rx_tick = 0; 104 | HAL_UART_Receive_IT(&huart2, &uart2.rx_cache, 1); 105 | } 106 | 107 | if(huart->Instance == USART3) 108 | { 109 | if(uart3.rx_state != UART_OVER) 110 | { 111 | if(uart3.rx_count < UART_BUFF_LEN) 112 | { 113 | uart3.rx_buff[uart3.rx_count++] = uart3.rx_cache; 114 | } 115 | uart3.rx_state = UART_BUSY; 116 | } 117 | uart3.rx_tick = 0; 118 | HAL_UART_Receive_IT(&huart3, &uart3.rx_cache, 1); 119 | } 120 | 121 | } 122 | 123 | /* non blocking mode uart transfer */ 124 | /* Transfer Interrupt will run this func when transfer is over. */ 125 | void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) 126 | { 127 | if(huart->Instance == USART1) 128 | { 129 | if(uart1.tx_state != UART_OVER) 130 | { 131 | uart1.tx_state = UART_BUSY; 132 | uart1.tx_tick = 0; 133 | } 134 | } 135 | 136 | if(huart->Instance == USART2) 137 | { 138 | if(uart2.tx_state != UART_OVER) 139 | { 140 | uart2.tx_state = UART_BUSY; 141 | uart2.tx_tick = 0; 142 | } 143 | } 144 | 145 | if(huart->Instance == USART3) 146 | { 147 | if(uart3.tx_state != UART_OVER) 148 | { 149 | uart3.tx_state = UART_BUSY; 150 | uart3.tx_tick = 0; 151 | } 152 | } 153 | 154 | } 155 | 156 | void api_uart_rx_start(Uart_StructTypeDef *p_uart) 157 | { 158 | p_uart->rx_state = UART_READY; 159 | p_uart->rx_count = 0; 160 | p_uart->rx_tick = 0; 161 | 162 | } 163 | 164 | void api_uart_tx_start(Uart_StructTypeDef *p_uart, uint8_t *p_data, uint16_t size) 165 | { 166 | p_uart->tx_state = UART_READY; 167 | p_uart->tx_count = 0; 168 | p_uart->tx_tick = 0; 169 | 170 | if(p_uart == &uart1) 171 | { 172 | HAL_UART_Transmit_IT(&huart1, p_data, size); 173 | } 174 | else if(p_uart == &uart2) 175 | { 176 | HAL_UART_Transmit_IT(&huart2, p_data, size); 177 | } 178 | else if(p_uart == &uart3) 179 | { 180 | HAL_UART_Transmit_IT(&huart3, p_data, size); 181 | } 182 | while(p_uart->tx_state != UART_OVER); 183 | 184 | } 185 | 186 | void api_uart_buff_fill(uint8_t *p_buff, uint16_t *p_count, uint8_t *p_data, uint16_t size) 187 | { 188 | for(uint16_t i=0; i
© Copyright (c) 2016 STMicroelectronics. 29 | * All rights reserved.
30 | * 31 | * This software component is licensed by ST under BSD 3-Clause license, 32 | * the "License"; You may not use this file except in compliance with the 33 | * License. You may obtain a copy of the License at: 34 | * opensource.org/licenses/BSD-3-Clause 35 | * 36 | ****************************************************************************** 37 | */ 38 | 39 | /* Includes ------------------------------------------------------------------*/ 40 | #include "stm32f1xx_hal.h" 41 | 42 | /** @addtogroup STM32F1xx_HAL_Driver 43 | * @{ 44 | */ 45 | 46 | /** @defgroup GPIOEx GPIOEx 47 | * @brief GPIO HAL module driver 48 | * @{ 49 | */ 50 | 51 | #ifdef HAL_GPIO_MODULE_ENABLED 52 | 53 | /** @defgroup GPIOEx_Exported_Functions GPIOEx Exported Functions 54 | * @{ 55 | */ 56 | 57 | /** @defgroup GPIOEx_Exported_Functions_Group1 Extended features functions 58 | * @brief Extended features functions 59 | * 60 | @verbatim 61 | ============================================================================== 62 | ##### Extended features functions ##### 63 | ============================================================================== 64 | [..] This section provides functions allowing to: 65 | (+) Configure EVENTOUT Cortex feature using the function HAL_GPIOEx_ConfigEventout() 66 | (+) Activate EVENTOUT Cortex feature using the HAL_GPIOEx_EnableEventout() 67 | (+) Deactivate EVENTOUT Cortex feature using the HAL_GPIOEx_DisableEventout() 68 | 69 | @endverbatim 70 | * @{ 71 | */ 72 | 73 | /** 74 | * @brief Configures the port and pin on which the EVENTOUT Cortex signal will be connected. 75 | * @param GPIO_PortSource Select the port used to output the Cortex EVENTOUT signal. 76 | * This parameter can be a value of @ref GPIOEx_EVENTOUT_PORT. 77 | * @param GPIO_PinSource Select the pin used to output the Cortex EVENTOUT signal. 78 | * This parameter can be a value of @ref GPIOEx_EVENTOUT_PIN. 79 | * @retval None 80 | */ 81 | void HAL_GPIOEx_ConfigEventout(uint32_t GPIO_PortSource, uint32_t GPIO_PinSource) 82 | { 83 | /* Verify the parameters */ 84 | assert_param(IS_AFIO_EVENTOUT_PORT(GPIO_PortSource)); 85 | assert_param(IS_AFIO_EVENTOUT_PIN(GPIO_PinSource)); 86 | 87 | /* Apply the new configuration */ 88 | MODIFY_REG(AFIO->EVCR, (AFIO_EVCR_PORT) | (AFIO_EVCR_PIN), (GPIO_PortSource) | (GPIO_PinSource)); 89 | } 90 | 91 | /** 92 | * @brief Enables the Event Output. 93 | * @retval None 94 | */ 95 | void HAL_GPIOEx_EnableEventout(void) 96 | { 97 | SET_BIT(AFIO->EVCR, AFIO_EVCR_EVOE); 98 | } 99 | 100 | /** 101 | * @brief Disables the Event Output. 102 | * @retval None 103 | */ 104 | void HAL_GPIOEx_DisableEventout(void) 105 | { 106 | CLEAR_BIT(AFIO->EVCR, AFIO_EVCR_EVOE); 107 | } 108 | 109 | /** 110 | * @} 111 | */ 112 | 113 | /** 114 | * @} 115 | */ 116 | 117 | #endif /* HAL_GPIO_MODULE_ENABLED */ 118 | 119 | /** 120 | * @} 121 | */ 122 | 123 | /** 124 | * @} 125 | */ 126 | 127 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 128 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/SPC4077.kicad_mod: -------------------------------------------------------------------------------- 1 | (module SPC4077 (layer F.Cu) (tedit 6028A528) 2 | (descr "DC POWER JACK 2mm
Right Angle, Through Hole, Rated 5A at 16VDC, PC Terminals

\nSource: www.spctechnology.com .. 84N1161.pdf
\nDistributor: Farnell (www.Farnell.de)
\nCreated by Robert Siegler") 3 | (fp_text reference J1 (at -10.16 6.35) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 5 | ) 6 | (fp_text value Val** (at -10.16 6.35) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.09652)) (justify left bottom)) 8 | ) 9 | (fp_poly (pts (xy -3.1 1.25) (xy -2.9 1.25) (xy -2.9 -1.25) (xy -3.1 -1.25)) (layer F.Fab) (width 0)) 10 | (fp_poly (pts (xy 2.75 1.5) (xy 3.25 1.5) (xy 3.25 -1.5) (xy 2.75 -1.5)) (layer F.Fab) (width 0)) 11 | (fp_poly (pts (xy -1.25 5.05) (xy 1.25 5.05) (xy 1.25 4.55) (xy -1.25 4.55)) (layer F.Fab) (width 0)) 12 | (fp_line (start 2.75 4) (end 2.75 2.35) (layer F.SilkS) (width 0.1)) 13 | (fp_line (start 2.75 -2.35) (end 2.75 -4) (layer F.SilkS) (width 0.1)) 14 | (fp_line (start 1.25 2.73) (end 1.25 -4) (layer F.SilkS) (width 0.1)) 15 | (fp_line (start 3.25 -2.35) (end 3.25 -4) (layer F.SilkS) (width 0.1)) 16 | (fp_line (start 3.25 4) (end 3.25 2.35) (layer F.SilkS) (width 0.1)) 17 | (fp_line (start 2.75 4) (end 3.25 4) (layer F.SilkS) (width 0.1)) 18 | (fp_line (start -10.75 4.5) (end -2.56 4.5) (layer F.SilkS) (width 0.1)) 19 | (fp_line (start -1.5 5.2) (end -1.5 4.4) (layer Edge.Cuts) (width 0.05)) 20 | (fp_line (start 1.5 5.2) (end -1.5 5.2) (layer Edge.Cuts) (width 0.05)) 21 | (fp_line (start 1.5 4.4) (end 1.5 5.2) (layer Edge.Cuts) (width 0.05)) 22 | (fp_line (start -1.5 4.4) (end 1.5 4.4) (layer Edge.Cuts) (width 0.05)) 23 | (fp_line (start -3.4 1.5) (end -3.4 -1.5) (layer Edge.Cuts) (width 0.05)) 24 | (fp_line (start -2.6 1.5) (end -3.4 1.5) (layer Edge.Cuts) (width 0.05)) 25 | (fp_line (start -2.6 -1.5) (end -2.6 1.5) (layer Edge.Cuts) (width 0.05)) 26 | (fp_line (start -3.4 -1.5) (end -2.6 -1.5) (layer Edge.Cuts) (width 0.05)) 27 | (fp_line (start 2.5 1.75) (end 2.5 -1.75) (layer Edge.Cuts) (width 0.05)) 28 | (fp_line (start 3.5 1.75) (end 2.5 1.75) (layer Edge.Cuts) (width 0.05)) 29 | (fp_line (start 3.5 -1.75) (end 3.5 1.75) (layer Edge.Cuts) (width 0.05)) 30 | (fp_line (start 2.5 -1.75) (end 3.5 -1.75) (layer Edge.Cuts) (width 0.05)) 31 | (fp_line (start -8.75 -1) (end -1.75 -1) (layer F.Fab) (width 0.1)) 32 | (fp_line (start -8.75 1) (end -1.75 1) (layer F.Fab) (width 0.1)) 33 | (fp_line (start -1.75 -1) (end -1.75 -3.2) (layer F.SilkS) (width 0.1)) 34 | (fp_line (start -1.75 1) (end -1.75 -1) (layer F.SilkS) (width 0.1)) 35 | (fp_line (start -1.75 3.2) (end -1.75 1) (layer F.SilkS) (width 0.1)) 36 | (fp_line (start -10.75 3.2) (end -1.75 3.2) (layer F.SilkS) (width 0.1)) 37 | (fp_line (start -10.75 -3.2) (end -1.75 -3.2) (layer F.SilkS) (width 0.1)) 38 | (fp_line (start 2.75 4) (end 2.75 -4) (layer F.Fab) (width 0.1)) 39 | (fp_line (start 3.25 4) (end 3.25 -4) (layer F.Fab) (width 0.1)) 40 | (fp_line (start 2.75 -4) (end 3.25 -4) (layer F.SilkS) (width 0.1)) 41 | (fp_line (start 1.25 -4) (end 2.75 -4) (layer F.SilkS) (width 0.1)) 42 | (fp_line (start 2.75 4) (end 3.25 4) (layer F.Fab) (width 0.1)) 43 | (fp_line (start 1.25 4) (end 2.75 4) (layer F.Fab) (width 0.1)) 44 | (fp_line (start -10.75 4.5) (end 1.25 4.5) (layer F.Fab) (width 0.1)) 45 | (fp_line (start -10.75 -4.5) (end 1.25 -4.5) (layer F.SilkS) (width 0.1)) 46 | (fp_line (start 1.25 -4) (end 1.25 -4.5) (layer F.SilkS) (width 0.1)) 47 | (fp_line (start 1.25 4.5) (end 1.25 4) (layer F.Fab) (width 0.1)) 48 | (fp_line (start 1.25 4) (end 1.25 -4) (layer F.Fab) (width 0.1)) 49 | (fp_line (start -7.25 -4) (end 1.25 -4) (layer F.SilkS) (width 0.1)) 50 | (fp_line (start -7.25 4) (end 1.25 4) (layer F.Fab) (width 0.1)) 51 | (fp_line (start -7.25 -4) (end -7.25 -4.5) (layer F.SilkS) (width 0.1)) 52 | (fp_line (start -7.25 4.5) (end -7.25 -4) (layer F.SilkS) (width 0.1)) 53 | (fp_line (start -10.75 -3.2) (end -10.75 -4.5) (layer F.SilkS) (width 0.1)) 54 | (fp_line (start -10.75 3.2) (end -10.75 -3.2) (layer F.SilkS) (width 0.1)) 55 | (fp_line (start -10.75 4.5) (end -10.75 3.2) (layer F.SilkS) (width 0.1)) 56 | (fp_arc (start -8.75 0) (end -8.75 1) (angle 180) (layer F.SilkS) (width 0.1)) 57 | (pad 2 thru_hole oval (at 0 4.8) (size 4.3688 2.1844) (drill 0.8) (layers *.Cu *.Mask) 58 | (solder_mask_margin 0.1016)) 59 | (pad 1 thru_hole oval (at -3 0 90) (size 4.3688 2.1844) (drill 0.8) (layers *.Cu *.Mask) 60 | (solder_mask_margin 0.1016)) 61 | (pad 3 thru_hole oval (at 3 0 90) (size 4.3688 2.1844) (drill 1) (layers *.Cu *.Mask) 62 | (solder_mask_margin 0.1016)) 63 | (model F:/03_Project/01_LED_Matrix/01_Hardware/V3/LED_Matrix_Control/3D_Package/SPC21364.step 64 | (offset (xyz -4 0 0)) 65 | (scale (xyz 1 1 1)) 66 | (rotate (xyz 0 0 0)) 67 | ) 68 | ) 69 | -------------------------------------------------------------------------------- /hardware/STM32_Core_Board/STM32_Core_Board.pro: -------------------------------------------------------------------------------- 1 | update=2021/2/13 15:07:41 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [cvpcb] 9 | version=1 10 | NetIExt=net 11 | [eeschema] 12 | version=1 13 | LibDir= 14 | [eeschema/libraries] 15 | [schematic_editor] 16 | version=1 17 | PageLayoutDescrFile= 18 | PlotDirectoryName= 19 | SubpartIdSeparator=0 20 | SubpartFirstId=65 21 | NetFmtName=Pcbnew 22 | SpiceAjustPassiveValues=0 23 | LabSize=50 24 | ERC_TestSimilarLabels=1 25 | [pcbnew] 26 | version=1 27 | PageLayoutDescrFile= 28 | LastNetListRead= 29 | CopperLayerCount=2 30 | BoardThickness=1.6 31 | AllowMicroVias=0 32 | AllowBlindVias=0 33 | RequireCourtyardDefinitions=0 34 | ProhibitOverlappingCourtyards=0 35 | MinTrackWidth=0.2 36 | MinViaDiameter=0.4 37 | MinViaDrill=0.3 38 | MinMicroViaDiameter=0.2 39 | MinMicroViaDrill=0.09999999999999999 40 | MinHoleToHole=0.25 41 | TrackWidth1=0.25 42 | ViaDiameter1=0.8 43 | ViaDrill1=0.4 44 | dPairWidth1=0.2 45 | dPairGap1=0.25 46 | dPairViaGap1=0.25 47 | SilkLineWidth=0.12 48 | SilkTextSizeV=1 49 | SilkTextSizeH=1 50 | SilkTextSizeThickness=0.15 51 | SilkTextItalic=0 52 | SilkTextUpright=1 53 | CopperLineWidth=0.2 54 | CopperTextSizeV=1.5 55 | CopperTextSizeH=1.5 56 | CopperTextThickness=0.3 57 | CopperTextItalic=0 58 | CopperTextUpright=1 59 | EdgeCutLineWidth=0.05 60 | CourtyardLineWidth=0.05 61 | OthersLineWidth=0.15 62 | OthersTextSizeV=1 63 | OthersTextSizeH=1 64 | OthersTextSizeThickness=0.15 65 | OthersTextItalic=0 66 | OthersTextUpright=1 67 | SolderMaskClearance=0 68 | SolderMaskMinWidth=0 69 | SolderPasteClearance=0 70 | SolderPasteRatio=-0 71 | [pcbnew/Layer.F.Cu] 72 | Name=F.Cu 73 | Type=0 74 | Enabled=1 75 | [pcbnew/Layer.In1.Cu] 76 | Name=In1.Cu 77 | Type=0 78 | Enabled=0 79 | [pcbnew/Layer.In2.Cu] 80 | Name=In2.Cu 81 | Type=0 82 | Enabled=0 83 | [pcbnew/Layer.In3.Cu] 84 | Name=In3.Cu 85 | Type=0 86 | Enabled=0 87 | [pcbnew/Layer.In4.Cu] 88 | Name=In4.Cu 89 | Type=0 90 | Enabled=0 91 | [pcbnew/Layer.In5.Cu] 92 | Name=In5.Cu 93 | Type=0 94 | Enabled=0 95 | [pcbnew/Layer.In6.Cu] 96 | Name=In6.Cu 97 | Type=0 98 | Enabled=0 99 | [pcbnew/Layer.In7.Cu] 100 | Name=In7.Cu 101 | Type=0 102 | Enabled=0 103 | [pcbnew/Layer.In8.Cu] 104 | Name=In8.Cu 105 | Type=0 106 | Enabled=0 107 | [pcbnew/Layer.In9.Cu] 108 | Name=In9.Cu 109 | Type=0 110 | Enabled=0 111 | [pcbnew/Layer.In10.Cu] 112 | Name=In10.Cu 113 | Type=0 114 | Enabled=0 115 | [pcbnew/Layer.In11.Cu] 116 | Name=In11.Cu 117 | Type=0 118 | Enabled=0 119 | [pcbnew/Layer.In12.Cu] 120 | Name=In12.Cu 121 | Type=0 122 | Enabled=0 123 | [pcbnew/Layer.In13.Cu] 124 | Name=In13.Cu 125 | Type=0 126 | Enabled=0 127 | [pcbnew/Layer.In14.Cu] 128 | Name=In14.Cu 129 | Type=0 130 | Enabled=0 131 | [pcbnew/Layer.In15.Cu] 132 | Name=In15.Cu 133 | Type=0 134 | Enabled=0 135 | [pcbnew/Layer.In16.Cu] 136 | Name=In16.Cu 137 | Type=0 138 | Enabled=0 139 | [pcbnew/Layer.In17.Cu] 140 | Name=In17.Cu 141 | Type=0 142 | Enabled=0 143 | [pcbnew/Layer.In18.Cu] 144 | Name=In18.Cu 145 | Type=0 146 | Enabled=0 147 | [pcbnew/Layer.In19.Cu] 148 | Name=In19.Cu 149 | Type=0 150 | Enabled=0 151 | [pcbnew/Layer.In20.Cu] 152 | Name=In20.Cu 153 | Type=0 154 | Enabled=0 155 | [pcbnew/Layer.In21.Cu] 156 | Name=In21.Cu 157 | Type=0 158 | Enabled=0 159 | [pcbnew/Layer.In22.Cu] 160 | Name=In22.Cu 161 | Type=0 162 | Enabled=0 163 | [pcbnew/Layer.In23.Cu] 164 | Name=In23.Cu 165 | Type=0 166 | Enabled=0 167 | [pcbnew/Layer.In24.Cu] 168 | Name=In24.Cu 169 | Type=0 170 | Enabled=0 171 | [pcbnew/Layer.In25.Cu] 172 | Name=In25.Cu 173 | Type=0 174 | Enabled=0 175 | [pcbnew/Layer.In26.Cu] 176 | Name=In26.Cu 177 | Type=0 178 | Enabled=0 179 | [pcbnew/Layer.In27.Cu] 180 | Name=In27.Cu 181 | Type=0 182 | Enabled=0 183 | [pcbnew/Layer.In28.Cu] 184 | Name=In28.Cu 185 | Type=0 186 | Enabled=0 187 | [pcbnew/Layer.In29.Cu] 188 | Name=In29.Cu 189 | Type=0 190 | Enabled=0 191 | [pcbnew/Layer.In30.Cu] 192 | Name=In30.Cu 193 | Type=0 194 | Enabled=0 195 | [pcbnew/Layer.B.Cu] 196 | Name=B.Cu 197 | Type=0 198 | Enabled=1 199 | [pcbnew/Layer.B.Adhes] 200 | Enabled=1 201 | [pcbnew/Layer.F.Adhes] 202 | Enabled=1 203 | [pcbnew/Layer.B.Paste] 204 | Enabled=1 205 | [pcbnew/Layer.F.Paste] 206 | Enabled=1 207 | [pcbnew/Layer.B.SilkS] 208 | Enabled=1 209 | [pcbnew/Layer.F.SilkS] 210 | Enabled=1 211 | [pcbnew/Layer.B.Mask] 212 | Enabled=1 213 | [pcbnew/Layer.F.Mask] 214 | Enabled=1 215 | [pcbnew/Layer.Dwgs.User] 216 | Enabled=1 217 | [pcbnew/Layer.Cmts.User] 218 | Enabled=1 219 | [pcbnew/Layer.Eco1.User] 220 | Enabled=1 221 | [pcbnew/Layer.Eco2.User] 222 | Enabled=1 223 | [pcbnew/Layer.Edge.Cuts] 224 | Enabled=1 225 | [pcbnew/Layer.Margin] 226 | Enabled=1 227 | [pcbnew/Layer.B.CrtYd] 228 | Enabled=1 229 | [pcbnew/Layer.F.CrtYd] 230 | Enabled=1 231 | [pcbnew/Layer.B.Fab] 232 | Enabled=1 233 | [pcbnew/Layer.F.Fab] 234 | Enabled=1 235 | [pcbnew/Layer.Rescue] 236 | Enabled=0 237 | [pcbnew/Netclasses] 238 | [pcbnew/Netclasses/Default] 239 | Name=Default 240 | Clearance=0.127 241 | TrackWidth=0.25 242 | ViaDiameter=0.8 243 | ViaDrill=0.4 244 | uViaDiameter=0.3 245 | uViaDrill=0.1 246 | dPairWidth=0.2 247 | dPairGap=0.25 248 | dPairViaGap=0.25 249 | [pcbnew/Netclasses/1] 250 | Name=Power 251 | Clearance=0.127 252 | TrackWidth=0.4 253 | ViaDiameter=0.8 254 | ViaDrill=0.4 255 | uViaDiameter=0.3 256 | uViaDrill=0.1 257 | dPairWidth=0.2 258 | dPairGap=0.25 259 | dPairViaGap=0.25 260 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/KiCad_EDA_File/led_matrix.pretty/B3F-10XX.kicad_mod: -------------------------------------------------------------------------------- 1 | (module B3F-10XX (layer F.Cu) (tedit 6028EF8B) 2 | (descr "OMRON SWITCH") 3 | (fp_text reference S5 (at -6.35 -1.016 -90) (layer F.SilkS) 4 | (effects (font (size 1.2065 1.2065) (thickness 0.12065)) (justify left bottom)) 5 | ) 6 | (fp_text value Val** (at -3.048 5.08) (layer F.Fab) 7 | (effects (font (size 1.2065 1.2065) (thickness 0.12065)) (justify left bottom)) 8 | ) 9 | (fp_circle (center 0 0) (end 0.254 0) (layer F.SilkS) (width 0.1524)) 10 | (fp_circle (center 0 0) (end 0.635 0) (layer F.Fab) (width 0.0508)) 11 | (fp_circle (center -2.159 -2.159) (end -1.651 -2.159) (layer F.Fab) (width 0.1524)) 12 | (fp_circle (center 2.159 -2.159) (end 2.667 -2.159) (layer F.Fab) (width 0.1524)) 13 | (fp_circle (center 2.159 2.032) (end 2.667 2.032) (layer F.Fab) (width 0.1524)) 14 | (fp_circle (center -2.159 2.159) (end -1.651 2.159) (layer F.Fab) (width 0.1524)) 15 | (fp_circle (center 0 0) (end 1.778 0) (layer F.SilkS) (width 0.1524)) 16 | (fp_line (start -2.413 -0.508) (end -2.159 0.381) (layer F.Fab) (width 0.1524)) 17 | (fp_line (start -2.413 0.508) (end -2.413 1.27) (layer F.Fab) (width 0.1524)) 18 | (fp_line (start -2.413 -1.27) (end -2.413 -0.508) (layer F.Fab) (width 0.1524)) 19 | (fp_line (start 1.27 -2.286) (end -1.27 -2.286) (layer F.Fab) (width 0.1524)) 20 | (fp_line (start -1.27 2.159) (end 1.27 2.159) (layer F.Fab) (width 0.1524)) 21 | (fp_line (start -3.048 -0.762) (end -3.048 -1.016) (layer F.SilkS) (width 0.1524)) 22 | (fp_line (start -3.048 0.762) (end -3.048 1.016) (layer F.SilkS) (width 0.1524)) 23 | (fp_line (start 3.048 -0.762) (end 3.048 -1.016) (layer F.SilkS) (width 0.1524)) 24 | (fp_line (start 3.048 0.762) (end 3.048 1.016) (layer F.SilkS) (width 0.1524)) 25 | (fp_line (start 1.143 3.048) (end 2.159 3.048) (layer F.SilkS) (width 0.1524)) 26 | (fp_line (start -1.27 3.048) (end 1.143 3.048) (layer F.SilkS) (width 0.1524)) 27 | (fp_line (start -1.27 -3.048) (end -2.159 -3.048) (layer F.SilkS) (width 0.1524)) 28 | (fp_line (start 1.27 -3.048) (end -1.27 -3.048) (layer F.SilkS) (width 0.1524)) 29 | (fp_line (start 2.159 -3.048) (end 1.27 -3.048) (layer F.SilkS) (width 0.1524)) 30 | (fp_line (start 2.54 -3.048) (end 2.159 -3.048) (layer F.Fab) (width 0.1524)) 31 | (fp_line (start -2.54 -3.048) (end -2.159 -3.048) (layer F.Fab) (width 0.1524)) 32 | (fp_line (start -2.159 3.048) (end -1.27 3.048) (layer F.SilkS) (width 0.1524)) 33 | (fp_line (start -2.54 3.048) (end -2.159 3.048) (layer F.Fab) (width 0.1524)) 34 | (fp_line (start 2.54 3.048) (end 2.159 3.048) (layer F.Fab) (width 0.1524)) 35 | (fp_line (start -1.27 2.794) (end -1.27 3.048) (layer F.SilkS) (width 0.0508)) 36 | (fp_line (start 1.143 2.794) (end 1.143 3.048) (layer F.SilkS) (width 0.0508)) 37 | (fp_line (start 1.143 2.794) (end -1.27 2.794) (layer F.SilkS) (width 0.0508)) 38 | (fp_line (start 1.27 -2.794) (end 1.27 -3.048) (layer F.SilkS) (width 0.0508)) 39 | (fp_line (start 1.27 -2.794) (end -1.27 -2.794) (layer F.SilkS) (width 0.0508)) 40 | (fp_line (start -1.27 -3.048) (end -1.27 -2.794) (layer F.SilkS) (width 0.0508)) 41 | (fp_line (start -1.27 -1.27) (end 1.27 -1.27) (layer F.Fab) (width 0.0508)) 42 | (fp_line (start 1.27 1.27) (end 1.27 -1.27) (layer F.Fab) (width 0.0508)) 43 | (fp_line (start 1.27 1.27) (end -1.27 1.27) (layer F.Fab) (width 0.0508)) 44 | (fp_line (start -1.27 -1.27) (end -1.27 1.27) (layer F.Fab) (width 0.0508)) 45 | (fp_line (start -3.048 2.54) (end -3.048 1.016) (layer F.Fab) (width 0.1524)) 46 | (fp_line (start -2.54 3.048) (end -3.048 2.54) (layer F.Fab) (width 0.1524)) 47 | (fp_line (start -3.048 -2.54) (end -3.048 -1.016) (layer F.Fab) (width 0.1524)) 48 | (fp_line (start -2.54 -3.048) (end -3.048 -2.54) (layer F.Fab) (width 0.1524)) 49 | (fp_line (start 3.048 2.54) (end 3.048 1.016) (layer F.Fab) (width 0.1524)) 50 | (fp_line (start 2.54 3.048) (end 3.048 2.54) (layer F.Fab) (width 0.1524)) 51 | (fp_line (start 3.048 -2.54) (end 2.54 -3.048) (layer F.Fab) (width 0.1524)) 52 | (fp_line (start -3.048 0.762) (end -3.302 0.762) (layer F.SilkS) (width 0.1524)) 53 | (fp_line (start -3.302 -0.762) (end -3.302 0.762) (layer F.SilkS) (width 0.1524)) 54 | (fp_line (start -3.302 -0.762) (end -3.048 -0.762) (layer F.SilkS) (width 0.1524)) 55 | (fp_line (start 3.048 -1.016) (end 3.048 -2.54) (layer F.Fab) (width 0.1524)) 56 | (fp_line (start 3.048 -0.762) (end 3.302 -0.762) (layer F.SilkS) (width 0.1524)) 57 | (fp_line (start 3.302 0.762) (end 3.302 -0.762) (layer F.SilkS) (width 0.1524)) 58 | (fp_line (start 3.302 0.762) (end 3.048 0.762) (layer F.SilkS) (width 0.1524)) 59 | (fp_text user 1 (at -4.318 -1.651) (layer F.Fab) 60 | (effects (font (size 1.2065 1.2065) (thickness 0.127)) (justify left bottom)) 61 | ) 62 | (fp_text user 2 (at 3.556 -1.524) (layer F.Fab) 63 | (effects (font (size 1.2065 1.2065) (thickness 0.127)) (justify left bottom)) 64 | ) 65 | (fp_text user 3 (at -4.572 2.794) (layer F.Fab) 66 | (effects (font (size 1.2065 1.2065) (thickness 0.127)) (justify left bottom)) 67 | ) 68 | (fp_text user 4 (at 3.556 2.794) (layer F.Fab) 69 | (effects (font (size 1.2065 1.2065) (thickness 0.127)) (justify left bottom)) 70 | ) 71 | (pad 1 thru_hole oval (at -3.2512 -2.2606) (size 3.048 1.524) (drill 1.016) (layers *.Cu *.Mask) 72 | (solder_mask_margin 0.1016)) 73 | (pad 3 thru_hole oval (at -3.2512 2.2606) (size 3.048 1.524) (drill 1.016) (layers *.Cu *.Mask) 74 | (solder_mask_margin 0.1016)) 75 | (pad 2 thru_hole oval (at 3.2512 -2.2606) (size 3.048 1.524) (drill 1.016) (layers *.Cu *.Mask) 76 | (solder_mask_margin 0.1016)) 77 | (pad 4 thru_hole oval (at 3.2512 2.2606) (size 3.048 1.524) (drill 1.016) (layers *.Cu *.Mask) 78 | (solder_mask_margin 0.1016)) 79 | (model ${KISYS3DMOD}/Button_Switch_THT.3dshapes/SW_PUSH_6mm_H5mm.wrl 80 | (offset (xyz -3.08 2.25 0)) 81 | (scale (xyz 1 1 1)) 82 | (rotate (xyz 0 0 0)) 83 | ) 84 | ) 85 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/Assembly/led_matrix.txt: -------------------------------------------------------------------------------- 1 | Partlist exported from F:/03_Project/01_LED_Matrix/01_Hardware/led_matrix.sch at 2020/8/10 21:56 2 | 3 | Qty Value Device Package Parts Description MF MPN OC_FARNELL OC_NEWARK POPULARITY PROD_ID SPICEPREFIX VALUE 4 | 4 10-XX B3F-10XX S2, S3, S4, S5 OMRON SWITCH B3F-1000 176432 36M3542 72 5 | 1 C4 NINIGI4C XS1 NINIGI 6 | 1 JACK-PLUG0 SPC4077 J1 DC POWER JACK unknown unknown 0 7 | 1 L-USL4532P L4532P L2 INDUCTOR, American symbol 0 L 8 | 1 LEDCHIP-LED0805 CHIP-LED0805 LED1 LED 68 9 | 1 ML16 ML16 SV1 HARTING unknown unknown 0 10 | 2 PINHD-1X20 1X20 JP1, JP2 PIN HEADER 6 11 | 1 PINHD-1X4 1X04 JP3 PIN HEADER 91 12 | 9 104 C-EUC0805 C0805 C2, C4, C5, C6, C7, C8, C9, C10, C11 CAPACITOR, European symbol 88 C 13 | 1 10K R-US_R0805 R0805 R1 RESISTOR, American symbol 85 R 14 | 2 220uF CPOL-US153CLV-0605 153CLV-0605 C1, C3 POLARIZED CAPACITOR, American symbol 8 C 15 | 4 47K R-US_R0805 R0805 R2, R3, R4, R5 RESISTOR, American symbol 85 R 16 | 2 74HC245DW 74HC245DW SO20W IC2, IC3 Octal BUS TRANSCEIVER, 3-state 0 17 | 1 B2B-XH-A B2B-XH-A B2B-XH-A X1 JST XH series header 2.50mm pitch disconnectable crimp style connectors, vertical (side entry type), 2 pins 18 | 1 LM2596S LM2596S TO263-5 IC1 SIMPLE SWITCHER® Power Converter 150 kHz 3A Step-Down Voltage Regulator NATIONAL SEMICONDUCTOR LM2596S-ADJ/NOPB 9494367 41K3842 12 19 | 1 LOGO LOGO LOGO U$1 20 | 1 SS34 DIODE-DO214AC DO214AC D1 DIODE 14 21 | 1 TL46PO TL46PO TL4XPO S1 TINY SWITCH ON - ON 1 22 | 1 W25Q32FV W25Q32FVSS SOIC-8 U1 W25Q32FV 32Mb (4MB) Serial Flash Memory IC-13229 W25Q32FV 23 | -------------------------------------------------------------------------------- /firmware/Project/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_crc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f1xx_hal_crc.h 4 | * @author MCD Application Team 5 | * @brief Header file of CRC 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 STM32F1xx_HAL_CRC_H 22 | #define STM32F1xx_HAL_CRC_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f1xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F1xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup CRC 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /** @defgroup CRC_Exported_Types CRC Exported Types 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @brief CRC HAL State Structure definition 46 | */ 47 | typedef enum 48 | { 49 | HAL_CRC_STATE_RESET = 0x00U, /*!< CRC not yet initialized or disabled */ 50 | HAL_CRC_STATE_READY = 0x01U, /*!< CRC initialized and ready for use */ 51 | HAL_CRC_STATE_BUSY = 0x02U, /*!< CRC internal process is ongoing */ 52 | HAL_CRC_STATE_TIMEOUT = 0x03U, /*!< CRC timeout state */ 53 | HAL_CRC_STATE_ERROR = 0x04U /*!< CRC error state */ 54 | } HAL_CRC_StateTypeDef; 55 | 56 | 57 | /** 58 | * @brief CRC Handle Structure definition 59 | */ 60 | typedef struct 61 | { 62 | CRC_TypeDef *Instance; /*!< Register base address */ 63 | 64 | HAL_LockTypeDef Lock; /*!< CRC Locking object */ 65 | 66 | __IO HAL_CRC_StateTypeDef State; /*!< CRC communication state */ 67 | 68 | } CRC_HandleTypeDef; 69 | /** 70 | * @} 71 | */ 72 | 73 | /* Exported constants --------------------------------------------------------*/ 74 | /** @defgroup CRC_Exported_Constants CRC Exported Constants 75 | * @{ 76 | */ 77 | 78 | /** 79 | * @} 80 | */ 81 | 82 | /* Exported macros -----------------------------------------------------------*/ 83 | /** @defgroup CRC_Exported_Macros CRC Exported Macros 84 | * @{ 85 | */ 86 | 87 | /** @brief Reset CRC handle state. 88 | * @param __HANDLE__ CRC handle. 89 | * @retval None 90 | */ 91 | #define __HAL_CRC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CRC_STATE_RESET) 92 | 93 | /** 94 | * @brief Reset CRC Data Register. 95 | * @param __HANDLE__ CRC handle 96 | * @retval None 97 | */ 98 | #define __HAL_CRC_DR_RESET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CRC_CR_RESET) 99 | 100 | /** 101 | * @brief Store data in the Independent Data (ID) register. 102 | * @param __HANDLE__ CRC handle 103 | * @param __VALUE__ Value to be stored in the ID register 104 | * @note Refer to the Reference Manual to get the authorized __VALUE__ length in bits 105 | * @retval None 106 | */ 107 | #define __HAL_CRC_SET_IDR(__HANDLE__, __VALUE__) (WRITE_REG((__HANDLE__)->Instance->IDR, (__VALUE__))) 108 | 109 | /** 110 | * @brief Return the data stored in the Independent Data (ID) register. 111 | * @param __HANDLE__ CRC handle 112 | * @note Refer to the Reference Manual to get the authorized __VALUE__ length in bits 113 | * @retval Value of the ID register 114 | */ 115 | #define __HAL_CRC_GET_IDR(__HANDLE__) (((__HANDLE__)->Instance->IDR) & CRC_IDR_IDR) 116 | /** 117 | * @} 118 | */ 119 | 120 | 121 | /* Private macros --------------------------------------------------------*/ 122 | /** @defgroup CRC_Private_Macros CRC Private Macros 123 | * @{ 124 | */ 125 | 126 | /** 127 | * @} 128 | */ 129 | 130 | /* Exported functions --------------------------------------------------------*/ 131 | /** @defgroup CRC_Exported_Functions CRC Exported Functions 132 | * @{ 133 | */ 134 | 135 | /* Initialization and de-initialization functions ****************************/ 136 | /** @defgroup CRC_Exported_Functions_Group1 Initialization and de-initialization functions 137 | * @{ 138 | */ 139 | HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc); 140 | HAL_StatusTypeDef HAL_CRC_DeInit(CRC_HandleTypeDef *hcrc); 141 | void HAL_CRC_MspInit(CRC_HandleTypeDef *hcrc); 142 | void HAL_CRC_MspDeInit(CRC_HandleTypeDef *hcrc); 143 | /** 144 | * @} 145 | */ 146 | 147 | /* Peripheral Control functions ***********************************************/ 148 | /** @defgroup CRC_Exported_Functions_Group2 Peripheral Control functions 149 | * @{ 150 | */ 151 | uint32_t HAL_CRC_Accumulate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength); 152 | uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength); 153 | /** 154 | * @} 155 | */ 156 | 157 | /* Peripheral State and Error functions ***************************************/ 158 | /** @defgroup CRC_Exported_Functions_Group3 Peripheral State functions 159 | * @{ 160 | */ 161 | HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc); 162 | /** 163 | * @} 164 | */ 165 | 166 | /** 167 | * @} 168 | */ 169 | 170 | /** 171 | * @} 172 | */ 173 | 174 | /** 175 | * @} 176 | */ 177 | 178 | #ifdef __cplusplus 179 | } 180 | #endif 181 | 182 | #endif /* STM32F1xx_HAL_CRC_H */ 183 | 184 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 185 | -------------------------------------------------------------------------------- /firmware/Project/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_crc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f1xx_ll_crc.h 4 | * @author MCD Application Team 5 | * @brief Header file of CRC LL 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 STM32F1xx_LL_CRC_H 22 | #define STM32F1xx_LL_CRC_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f1xx.h" 30 | 31 | /** @addtogroup STM32F1xx_LL_Driver 32 | * @{ 33 | */ 34 | 35 | #if defined(CRC) 36 | 37 | /** @defgroup CRC_LL CRC 38 | * @{ 39 | */ 40 | 41 | /* Private types -------------------------------------------------------------*/ 42 | /* Private variables ---------------------------------------------------------*/ 43 | /* Private constants ---------------------------------------------------------*/ 44 | /* Private macros ------------------------------------------------------------*/ 45 | 46 | /* Exported types ------------------------------------------------------------*/ 47 | /* Exported constants --------------------------------------------------------*/ 48 | /** @defgroup CRC_LL_Exported_Constants CRC Exported Constants 49 | * @{ 50 | */ 51 | 52 | /** 53 | * @} 54 | */ 55 | 56 | /* Exported macro ------------------------------------------------------------*/ 57 | /** @defgroup CRC_LL_Exported_Macros CRC Exported Macros 58 | * @{ 59 | */ 60 | 61 | /** @defgroup CRC_LL_EM_WRITE_READ Common Write and read registers Macros 62 | * @{ 63 | */ 64 | 65 | /** 66 | * @brief Write a value in CRC register 67 | * @param __INSTANCE__ CRC Instance 68 | * @param __REG__ Register to be written 69 | * @param __VALUE__ Value to be written in the register 70 | * @retval None 71 | */ 72 | #define LL_CRC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, __VALUE__) 73 | 74 | /** 75 | * @brief Read a value in CRC register 76 | * @param __INSTANCE__ CRC Instance 77 | * @param __REG__ Register to be read 78 | * @retval Register value 79 | */ 80 | #define LL_CRC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) 81 | /** 82 | * @} 83 | */ 84 | 85 | /** 86 | * @} 87 | */ 88 | 89 | 90 | /* Exported functions --------------------------------------------------------*/ 91 | /** @defgroup CRC_LL_Exported_Functions CRC Exported Functions 92 | * @{ 93 | */ 94 | 95 | /** @defgroup CRC_LL_EF_Configuration CRC Configuration functions 96 | * @{ 97 | */ 98 | 99 | /** 100 | * @brief Reset the CRC calculation unit. 101 | * @note If Programmable Initial CRC value feature 102 | * is available, also set the Data Register to the value stored in the 103 | * CRC_INIT register, otherwise, reset Data Register to its default value. 104 | * @rmtoll CR RESET LL_CRC_ResetCRCCalculationUnit 105 | * @param CRCx CRC Instance 106 | * @retval None 107 | */ 108 | __STATIC_INLINE void LL_CRC_ResetCRCCalculationUnit(CRC_TypeDef *CRCx) 109 | { 110 | SET_BIT(CRCx->CR, CRC_CR_RESET); 111 | } 112 | 113 | /** 114 | * @} 115 | */ 116 | 117 | /** @defgroup CRC_LL_EF_Data_Management Data_Management 118 | * @{ 119 | */ 120 | 121 | /** 122 | * @brief Write given 32-bit data to the CRC calculator 123 | * @rmtoll DR DR LL_CRC_FeedData32 124 | * @param CRCx CRC Instance 125 | * @param InData value to be provided to CRC calculator between between Min_Data=0 and Max_Data=0xFFFFFFFF 126 | * @retval None 127 | */ 128 | __STATIC_INLINE void LL_CRC_FeedData32(CRC_TypeDef *CRCx, uint32_t InData) 129 | { 130 | WRITE_REG(CRCx->DR, InData); 131 | } 132 | 133 | /** 134 | * @brief Return current CRC calculation result. 32 bits value is returned. 135 | * @rmtoll DR DR LL_CRC_ReadData32 136 | * @param CRCx CRC Instance 137 | * @retval Current CRC calculation result as stored in CRC_DR register (32 bits). 138 | */ 139 | __STATIC_INLINE uint32_t LL_CRC_ReadData32(CRC_TypeDef *CRCx) 140 | { 141 | return (uint32_t)(READ_REG(CRCx->DR)); 142 | } 143 | 144 | /** 145 | * @brief Return data stored in the Independent Data(IDR) register. 146 | * @note This register can be used as a temporary storage location for one byte. 147 | * @rmtoll IDR IDR LL_CRC_Read_IDR 148 | * @param CRCx CRC Instance 149 | * @retval Value stored in CRC_IDR register (General-purpose 8-bit data register). 150 | */ 151 | __STATIC_INLINE uint32_t LL_CRC_Read_IDR(CRC_TypeDef *CRCx) 152 | { 153 | return (uint32_t)(READ_REG(CRCx->IDR)); 154 | } 155 | 156 | /** 157 | * @brief Store data in the Independent Data(IDR) register. 158 | * @note This register can be used as a temporary storage location for one byte. 159 | * @rmtoll IDR IDR LL_CRC_Write_IDR 160 | * @param CRCx CRC Instance 161 | * @param InData value to be stored in CRC_IDR register (8-bit) between Min_Data=0 and Max_Data=0xFF 162 | * @retval None 163 | */ 164 | __STATIC_INLINE void LL_CRC_Write_IDR(CRC_TypeDef *CRCx, uint32_t InData) 165 | { 166 | *((uint8_t __IO *)(&CRCx->IDR)) = (uint8_t) InData; 167 | } 168 | /** 169 | * @} 170 | */ 171 | 172 | #if defined(USE_FULL_LL_DRIVER) 173 | /** @defgroup CRC_LL_EF_Init Initialization and de-initialization functions 174 | * @{ 175 | */ 176 | 177 | ErrorStatus LL_CRC_DeInit(CRC_TypeDef *CRCx); 178 | 179 | /** 180 | * @} 181 | */ 182 | #endif /* USE_FULL_LL_DRIVER */ 183 | 184 | /** 185 | * @} 186 | */ 187 | 188 | /** 189 | * @} 190 | */ 191 | 192 | #endif /* defined(CRC) */ 193 | 194 | /** 195 | * @} 196 | */ 197 | 198 | #ifdef __cplusplus 199 | } 200 | #endif 201 | 202 | #endif /* STM32F1xx_LL_CRC_H */ 203 | 204 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 205 | -------------------------------------------------------------------------------- /firmware/Project/BSP/bsp_w25qx.c: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | 3 | uint8_t w25qx_buff[W25QX_SECTOR_SIZE]; 4 | 5 | uint8_t bsp_w25qx_read_id(uint8_t *p_id) 6 | { 7 | uint8_t cmd[4] = {JEDEC_CMD_Device_ID, 0x00, 0x00, 0x00}; 8 | uint8_t status = 1; 9 | 10 | W25QX_SPI_CS_L(); 11 | status = HAL_SPI_Transmit(&hspi2, cmd, 4, W25QX_SPI_TIMEOUT); 12 | status = HAL_SPI_Receive(&hspi2, p_id, 2, W25QX_SPI_TIMEOUT); 13 | W25QX_SPI_CS_H(); 14 | 15 | return status; 16 | } 17 | 18 | uint8_t bsp_w25qx_read(uint8_t *p_buff, uint32_t addr, uint16_t size) 19 | { 20 | uint8_t cmd[4]; 21 | uint8_t status = 1; 22 | 23 | cmd[0] = JEDEC_CMD_READ; 24 | cmd[1] = (uint8_t)(addr >> 16); 25 | cmd[2] = (uint8_t)(addr >> 8); 26 | cmd[3] = (uint8_t)(addr); 27 | 28 | W25QX_SPI_CS_L(); 29 | status = HAL_SPI_Transmit(&hspi2, cmd, 4, W25QX_SPI_TIMEOUT); 30 | status = HAL_SPI_Receive(&hspi2, p_buff, size, W25QX_SPI_TIMEOUT); 31 | W25QX_SPI_CS_H(); 32 | 33 | return status; 34 | } 35 | 36 | uint8_t bsp_w25qx_write_sector(uint8_t *p_buff, uint32_t addr, uint16_t size) 37 | { 38 | uint8_t status = 1; 39 | uint16_t sector_number = 0; 40 | uint16_t sector_offset = 0; 41 | uint16_t sector_remain = 0; 42 | uint16_t i = 0; 43 | 44 | sector_number = (addr / W25QX_SECTOR_SIZE); 45 | sector_offset = (addr % W25QX_SECTOR_SIZE); 46 | sector_remain = W25QX_SECTOR_SIZE - sector_offset; 47 | 48 | if(size < sector_remain) 49 | sector_remain = size; 50 | 51 | while(1) 52 | { 53 | status = bsp_w25qx_read(w25qx_buff, sector_number*W25QX_SECTOR_SIZE, W25QX_SECTOR_SIZE); 54 | for(i=0; i W25QX_SECTOR_SIZE) 82 | sector_remain = W25QX_SECTOR_SIZE; 83 | else 84 | sector_remain = size; 85 | } 86 | } 87 | 88 | return status; 89 | } 90 | 91 | uint8_t bsp_w25qx_write_page(uint8_t *p_buff, uint32_t addr, uint16_t size) 92 | { 93 | uint8_t status = 1; 94 | uint16_t page_remain = 0; 95 | 96 | page_remain = W25QX_PAGE_SIZE - (addr % W25QX_PAGE_SIZE); // single page remain bytes 97 | 98 | if(size <= page_remain) 99 | page_remain = size; 100 | 101 | while(1) 102 | { 103 | status = bsp_w25qx_write(p_buff, addr, page_remain); 104 | if(size == page_remain) 105 | break; // write completed 106 | else 107 | { 108 | p_buff += page_remain; 109 | addr += page_remain; 110 | size -= page_remain; // deduct the bytes wrote 111 | if(size > W25QX_PAGE_SIZE) 112 | page_remain = W25QX_PAGE_SIZE; 113 | else 114 | page_remain = size; 115 | } 116 | } 117 | 118 | return status; 119 | } 120 | 121 | uint8_t bsp_w25qx_write(uint8_t *p_buff, uint32_t addr, uint16_t size) 122 | { 123 | uint8_t cmd[4]; 124 | uint8_t status = 1; 125 | 126 | cmd[0] = JEDEC_CMD_PP; 127 | cmd[1] = (uint8_t)(addr >> 16); 128 | cmd[2] = (uint8_t)(addr >> 8); 129 | cmd[3] = (uint8_t)(addr); 130 | 131 | status = bsp_w25qx_write_enable(); 132 | status = bsp_w25qx_wait_busy(); 133 | W25QX_SPI_CS_L(); 134 | status = HAL_SPI_Transmit(&hspi2, cmd, 4, W25QX_SPI_TIMEOUT); 135 | status = HAL_SPI_Transmit(&hspi2, p_buff, size, W25QX_SPI_TIMEOUT); 136 | W25QX_SPI_CS_H(); 137 | status = bsp_w25qx_wait_busy(); 138 | 139 | return status; 140 | } 141 | 142 | uint8_t bsp_w25qx_erase_sector(uint16_t sector) 143 | { 144 | uint8_t cmd[4]; 145 | uint8_t status = 1; 146 | 147 | cmd[0] = JEDEC_CMD_ERASE_4K; 148 | cmd[1] = (uint8_t)((sector*W25QX_SECTOR_SIZE) >> 16); 149 | cmd[2] = (uint8_t)((sector*W25QX_SECTOR_SIZE) >> 8); 150 | cmd[3] = (uint8_t)((sector*W25QX_SECTOR_SIZE)); 151 | 152 | status = bsp_w25qx_write_enable(); 153 | status = bsp_w25qx_wait_busy(); 154 | W25QX_SPI_CS_L(); 155 | status = HAL_SPI_Transmit(&hspi2, cmd, 4, W25QX_SPI_TIMEOUT); 156 | W25QX_SPI_CS_H(); 157 | status = bsp_w25qx_wait_busy(); 158 | 159 | return status; 160 | } 161 | 162 | uint8_t bsp_w25qx_erase_chip(void) 163 | { 164 | uint8_t cmd = JEDEC_CMD_ERASE_full; 165 | uint8_t status = 1; 166 | 167 | status = bsp_w25qx_write_enable(); 168 | status = bsp_w25qx_wait_busy(); 169 | W25QX_SPI_CS_L(); 170 | status = HAL_SPI_Transmit(&hspi2, &cmd, 1, W25QX_SPI_TIMEOUT); 171 | W25QX_SPI_CS_H(); 172 | status = bsp_w25qx_wait_busy(); 173 | 174 | return status; 175 | } 176 | 177 | static uint8_t bsp_w25qx_read_sr(uint8_t *p_sr) 178 | { 179 | uint8_t cmd = JEDEC_CMD_RDSR1; 180 | uint8_t status = 1; 181 | 182 | W25QX_SPI_CS_L(); 183 | status = HAL_SPI_Transmit(&hspi2, &cmd, 1, W25QX_SPI_TIMEOUT); 184 | status = HAL_SPI_Receive(&hspi2, p_sr, 1, W25QX_SPI_TIMEOUT); 185 | W25QX_SPI_CS_H(); 186 | 187 | return status; 188 | } 189 | 190 | static uint8_t bsp_w25qx_write_sr(uint8_t *p_sr) 191 | { 192 | uint8_t cmd[2] = {JEDEC_CMD_WSREN, JEDEC_CMD_WRSR}; 193 | uint8_t status = 1; 194 | 195 | W25QX_SPI_CS_L(); 196 | status = HAL_SPI_Transmit(&hspi2, cmd, 2, W25QX_SPI_TIMEOUT); 197 | status = HAL_SPI_Transmit(&hspi2, p_sr, 1, W25QX_SPI_TIMEOUT); 198 | W25QX_SPI_CS_H(); 199 | 200 | return status; 201 | } 202 | 203 | static uint8_t bsp_w25qx_wait_busy(void) 204 | { 205 | uint8_t sr = 0; 206 | uint8_t status = 1; 207 | uint32_t tickstart = HAL_GetTick(); 208 | 209 | while(1) 210 | { 211 | if((HAL_GetTick() - tickstart) > W25QX_SPI_TIMEOUT) 212 | return 1; 213 | 214 | status = bsp_w25qx_read_sr(&sr); 215 | if((sr & 0x01) == 0x00) 216 | return status; 217 | } 218 | } 219 | 220 | static uint8_t bsp_w25qx_write_enable(void) 221 | { 222 | uint8_t cmd = JEDEC_CMD_WREN; 223 | uint8_t status = 1; 224 | 225 | W25QX_SPI_CS_L(); 226 | status = HAL_SPI_Transmit(&hspi2, &cmd, 1, W25QX_SPI_TIMEOUT); 227 | W25QX_SPI_CS_H(); 228 | 229 | return status; 230 | } 231 | 232 | static uint8_t bsp_w25qx_write_disable(void) 233 | { 234 | uint8_t cmd = JEDEC_CMD_WRDI; 235 | uint8_t status = 1; 236 | 237 | W25QX_SPI_CS_L(); 238 | status = HAL_SPI_Transmit(&hspi2, &cmd, 1, W25QX_SPI_TIMEOUT); 239 | W25QX_SPI_CS_H(); 240 | 241 | return status; 242 | } 243 | 244 | -------------------------------------------------------------------------------- /firmware/Project/EWARM/settings/Project.dbgdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 201861 10 | 11 | 20 12 | 1395 13 | 372 14 | 93 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 210272727 23 | 24 | 25 | 26 | 27 | 28 | Disassembly_I0 29 | 30 | 31 | 32 | 50020 33 | 34 | 35 | 36 | 11 37 | 200ExpressionLocationTypeValue100150100100200ExpressionLocationTypeValue100150100100csizefont_buffuart1hub75_panel_buffhtaskfont_modew25qx_bufffont_buffsys_datasys_data_preW25QX_BUFFfont_modeulinkmenu_statekey_valueExpressionLocationTypeValue167150100308664941138200664941138 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | TabID-30850-16317 46 | Debug Log 47 | Debug-Log 48 | 49 | 50 | 51 | TabID-30327-16327 52 | Build 53 | Build 54 | 55 | 56 | TabID-19873-31820Ambiguous DefinitionsSelect-Ambiguous-DefinitionsTabID-14312-27682ReferencesFind-All-References 57 | 58 | 0 59 | 60 | 61 | TabID-8831-16321 62 | Workspace 63 | Workspace 64 | 65 | 66 | ProjectProject/APIProject/APLProject/ApplicationProject/Application/EWARMProject/Application/UserProject/BSP 67 | 68 | 69 | 70 | 0 71 | 72 | 73 | TabID-19579-16324 74 | Disassembly 75 | Disassembly 76 | 77 | 78 | 79 | 80 | 0TabID-18978-20290Live WatchStaticWatch0 81 | 82 | 83 | 84 | 85 | 86 | TextEditor$WS_DIR$\..\Src\main.c00000642410241000100000010000001 87 | 88 | 89 | 90 | 91 | 92 | 93 | iaridepm.enu1debuggergui.enu1armjlink2.enu1-2-2708301-2-2200198104167198596157813712136-2-270831-2-220019810416719859616667712136-22970853929-214814077083140421265625712136-2-21961922-2-219241981002083198596104167198596 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /hardware/LED_Matrix_Control/Eagle_PCB_File/CAM/CAMOutputs/GerberFiles/soldermask_top.gbr: -------------------------------------------------------------------------------- 1 | G04 EAGLE Gerber RS-274X export* 2 | G75* 3 | %MOMM*% 4 | %FSLAX34Y34*% 5 | %LPD*% 6 | %INSoldermask Top*% 7 | %IPPOS*% 8 | %AMOC8* 9 | 5,1,8,0,0,1.08239X$1,22.5*% 10 | G01* 11 | %ADD10C,2.387600*% 12 | %ADD11R,11.003200X10.613200*% 13 | %ADD12R,1.270000X2.362200*% 14 | %ADD13R,1.803200X1.803200*% 15 | %ADD14P,1.951766X8X112.500000*% 16 | %ADD15C,3.203200*% 17 | %ADD16R,1.803200X3.703200*% 18 | %ADD17R,1.903200X2.003200*% 19 | %ADD18R,1.703200X1.503200*% 20 | %ADD19C,1.879600*% 21 | %ADD20C,1.727200*% 22 | %ADD21R,1.403200X1.403200*% 23 | %ADD22R,1.503200X1.703200*% 24 | %ADD23R,1.905000X0.812800*% 25 | %ADD24R,0.863600X2.235200*% 26 | %ADD25P,1.759533X8X292.500000*% 27 | %ADD26R,2.003200X3.803200*% 28 | 29 | 30 | D10* 31 | X103378Y561600D02* 32 | X125222Y561600D01* 33 | X84300Y598678D02* 34 | X84300Y620522D01* 35 | X144300Y620522D02* 36 | X144300Y598678D01* 37 | D11* 38 | X254000Y537210D03* 39 | D12* 40 | X219964Y453898D03* 41 | X236982Y453898D03* 42 | X254000Y453898D03* 43 | X271018Y453898D03* 44 | X288036Y453898D03* 45 | D13* 46 | X50800Y495100D03* 47 | D14* 48 | X50800Y470100D03* 49 | D15* 50 | X859500Y266700D03* 51 | X819900Y266700D03* 52 | X780300Y266700D03* 53 | X740700Y266700D03* 54 | D16* 55 | X152400Y505028D03* 56 | X152400Y451028D03* 57 | D17* 58 | X342900Y500200D03* 59 | X342900Y541200D03* 60 | D18* 61 | X177800Y549300D03* 62 | X177800Y568300D03* 63 | D19* 64 | X76200Y381000D03* 65 | X76200Y355600D03* 66 | X76200Y330200D03* 67 | X25400Y381000D03* 68 | X25400Y355600D03* 69 | X25400Y330200D03* 70 | D20* 71 | X155194Y229108D02* 72 | X155194Y213868D01* 73 | X200406Y213868D02* 74 | X200406Y229108D01* 75 | X155194Y278892D02* 76 | X155194Y294132D01* 77 | X200406Y294132D02* 78 | X200406Y278892D01* 79 | D21* 80 | X243500Y647700D03* 81 | X264500Y647700D03* 82 | D22* 83 | X181000Y647700D03* 84 | X200000Y647700D03* 85 | D23* 86 | X399288Y692150D03* 87 | X399288Y679450D03* 88 | X399288Y666750D03* 89 | X399288Y654050D03* 90 | X464312Y654050D03* 91 | X464312Y666750D03* 92 | X464312Y679450D03* 93 | X464312Y692150D03* 94 | D24* 95 | X742950Y559308D03* 96 | X755650Y559308D03* 97 | X768350Y559308D03* 98 | X781050Y559308D03* 99 | X793750Y559308D03* 100 | X806450Y559308D03* 101 | X819150Y559308D03* 102 | X831850Y559308D03* 103 | X831850Y659892D03* 104 | X819150Y659892D03* 105 | X806450Y659892D03* 106 | X793750Y659892D03* 107 | X781050Y659892D03* 108 | X768350Y659892D03* 109 | X755650Y659892D03* 110 | X742950Y659892D03* 111 | X844550Y559308D03* 112 | X857250Y559308D03* 113 | X844550Y659892D03* 114 | X857250Y659892D03* 115 | D16* 116 | X419100Y505028D03* 117 | X419100Y451028D03* 118 | D18* 119 | X419100Y549300D03* 120 | X419100Y568300D03* 121 | D20* 122 | X665480Y241300D02* 123 | X680720Y241300D01* 124 | X680720Y266700D02* 125 | X665480Y266700D01* 126 | X665480Y292100D02* 127 | X680720Y292100D01* 128 | X680720Y317500D02* 129 | X665480Y317500D01* 130 | X665480Y342900D02* 131 | X680720Y342900D01* 132 | X680720Y368300D02* 133 | X665480Y368300D01* 134 | X665480Y393700D02* 135 | X680720Y393700D01* 136 | X680720Y419100D02* 137 | X665480Y419100D01* 138 | X665480Y444500D02* 139 | X680720Y444500D01* 140 | X680720Y469900D02* 141 | X665480Y469900D01* 142 | X665480Y495300D02* 143 | X680720Y495300D01* 144 | X680720Y520700D02* 145 | X665480Y520700D01* 146 | X665480Y546100D02* 147 | X680720Y546100D01* 148 | X680720Y571500D02* 149 | X665480Y571500D01* 150 | X665480Y596900D02* 151 | X680720Y596900D01* 152 | X680720Y622300D02* 153 | X665480Y622300D01* 154 | X665480Y647700D02* 155 | X680720Y647700D01* 156 | X680720Y673100D02* 157 | X665480Y673100D01* 158 | X665480Y698500D02* 159 | X680720Y698500D01* 160 | X680720Y723900D02* 161 | X665480Y723900D01* 162 | X528320Y241300D02* 163 | X513080Y241300D01* 164 | X513080Y266700D02* 165 | X528320Y266700D01* 166 | X528320Y292100D02* 167 | X513080Y292100D01* 168 | X513080Y317500D02* 169 | X528320Y317500D01* 170 | X528320Y342900D02* 171 | X513080Y342900D01* 172 | X513080Y368300D02* 173 | X528320Y368300D01* 174 | X528320Y393700D02* 175 | X513080Y393700D01* 176 | X513080Y419100D02* 177 | X528320Y419100D01* 178 | X528320Y444500D02* 179 | X513080Y444500D01* 180 | X513080Y469900D02* 181 | X528320Y469900D01* 182 | X528320Y495300D02* 183 | X513080Y495300D01* 184 | X513080Y520700D02* 185 | X528320Y520700D01* 186 | X528320Y546100D02* 187 | X513080Y546100D01* 188 | X513080Y571500D02* 189 | X528320Y571500D01* 190 | X528320Y596900D02* 191 | X513080Y596900D01* 192 | X513080Y622300D02* 193 | X528320Y622300D01* 194 | X528320Y647700D02* 195 | X513080Y647700D01* 196 | X513080Y673100D02* 197 | X528320Y673100D01* 198 | X528320Y698500D02* 199 | X513080Y698500D01* 200 | X513080Y723900D02* 201 | X528320Y723900D01* 202 | D24* 203 | X742950Y356108D03* 204 | X755650Y356108D03* 205 | X768350Y356108D03* 206 | X781050Y356108D03* 207 | X793750Y356108D03* 208 | X806450Y356108D03* 209 | X819150Y356108D03* 210 | X831850Y356108D03* 211 | X831850Y456692D03* 212 | X819150Y456692D03* 213 | X806450Y456692D03* 214 | X793750Y456692D03* 215 | X781050Y456692D03* 216 | X768350Y456692D03* 217 | X755650Y456692D03* 218 | X742950Y456692D03* 219 | X844550Y356108D03* 220 | X857250Y356108D03* 221 | X844550Y456692D03* 222 | X857250Y456692D03* 223 | D25* 224 | X927100Y571500D03* 225 | X952500Y571500D03* 226 | X927100Y546100D03* 227 | X952500Y546100D03* 228 | X927100Y520700D03* 229 | X952500Y520700D03* 230 | X927100Y495300D03* 231 | X952500Y495300D03* 232 | X927100Y469900D03* 233 | X952500Y469900D03* 234 | X927100Y444500D03* 235 | X952500Y444500D03* 236 | X927100Y419100D03* 237 | X952500Y419100D03* 238 | X927100Y393700D03* 239 | X952500Y393700D03* 240 | D22* 241 | X441300Y622300D03* 242 | X422300Y622300D03* 243 | D18* 244 | X192314Y352400D03* 245 | X192314Y333400D03* 246 | X152400Y352400D03* 247 | X152400Y333400D03* 248 | D20* 249 | X231394Y229108D02* 250 | X231394Y213868D01* 251 | X276606Y213868D02* 252 | X276606Y229108D01* 253 | X231394Y278892D02* 254 | X231394Y294132D01* 255 | X276606Y294132D02* 256 | X276606Y278892D01* 257 | D18* 258 | X272143Y352400D03* 259 | X272143Y333400D03* 260 | X232229Y352400D03* 261 | X232229Y333400D03* 262 | D20* 263 | X307594Y229108D02* 264 | X307594Y213868D01* 265 | X352806Y213868D02* 266 | X352806Y229108D01* 267 | X307594Y278892D02* 268 | X307594Y294132D01* 269 | X352806Y294132D02* 270 | X352806Y278892D01* 271 | D18* 272 | X351971Y352400D03* 273 | X351971Y333400D03* 274 | X312057Y352400D03* 275 | X312057Y333400D03* 276 | D20* 277 | X383794Y229108D02* 278 | X383794Y213868D01* 279 | X429006Y213868D02* 280 | X429006Y229108D01* 281 | X383794Y278892D02* 282 | X383794Y294132D01* 283 | X429006Y294132D02* 284 | X429006Y278892D01* 285 | D18* 286 | X431800Y352400D03* 287 | X431800Y333400D03* 288 | X391886Y352400D03* 289 | X391886Y333400D03* 290 | D22* 291 | X747420Y698500D03* 292 | X766420Y698500D03* 293 | X747420Y495300D03* 294 | X766420Y495300D03* 295 | D20* 296 | X838200Y741680D02* 297 | X838200Y756920D01* 298 | X812800Y756920D02* 299 | X812800Y741680D01* 300 | X787400Y741680D02* 301 | X787400Y756920D01* 302 | X762000Y756920D02* 303 | X762000Y741680D01* 304 | D15* 305 | X63500Y736600D03* 306 | X63500Y228600D03* 307 | X939800Y228600D03* 308 | X939800Y736600D03* 309 | D26* 310 | X324170Y450850D03* 311 | X364170Y450850D03* 312 | M02* 313 | --------------------------------------------------------------------------------