From 88fdd1670d3e21a6e9b3563d9f1b7c891362577d Mon Sep 17 00:00:00 2001 From: Vamika Date: Mon, 27 Apr 2026 21:33:14 -0400 Subject: [PATCH] implement motor tester: SPI ADC read and PWM output --- nucleof072rb/.cproject | 2 +- nucleof072rb/.mxproject | 40 +- nucleof072rb/Core/Inc/gpio.h | 2 +- nucleof072rb/Core/Inc/spi.h | 52 + nucleof072rb/Core/Inc/stm32f0xx_hal_conf.h | 4 +- nucleof072rb/Core/Inc/tim.h | 54 + nucleof072rb/Core/Inc/usart.h | 2 +- nucleof072rb/Core/Src/gpio.c | 13 +- nucleof072rb/Core/Src/main.c | 41 +- nucleof072rb/Core/Src/spi.c | 133 + nucleof072rb/Core/Src/tim.c | 163 + nucleof072rb/Core/Src/usart.c | 2 +- .../Inc/stm32f0xx_hal_spi.h | 852 ++++ .../Inc/stm32f0xx_hal_spi_ex.h | 75 + .../Src/stm32f0xx_hal_spi.c | 4404 +++++++++++++++++ .../Src/stm32f0xx_hal_spi_ex.c | 115 + nucleof072rb/nucleof072rb.ioc | 51 +- 17 files changed, 5970 insertions(+), 35 deletions(-) create mode 100644 nucleof072rb/Core/Inc/spi.h create mode 100644 nucleof072rb/Core/Inc/tim.h create mode 100644 nucleof072rb/Core/Src/spi.c create mode 100644 nucleof072rb/Core/Src/tim.c create mode 100644 nucleof072rb/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h create mode 100644 nucleof072rb/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h create mode 100644 nucleof072rb/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c create mode 100644 nucleof072rb/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.c diff --git a/nucleof072rb/.cproject b/nucleof072rb/.cproject index 1e72a9d5..176db57b 100644 --- a/nucleof072rb/.cproject +++ b/nucleof072rb/.cproject @@ -22,7 +22,7 @@