Firmware: Fans; PID; Removed testing stuff; many small amends
This commit is contained in:
@@ -21,7 +21,8 @@
|
|||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.554259374" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.554259374" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.262677090" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.262677090" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1482216284" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1482216284" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1344937624" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.5 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32G070RBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Drivers/STM32G0xx_HAL_Driver/Inc | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Drivers/CMSIS/Device/ST/STM32G0xx/Include | ../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM0 || || || USE_HAL_DRIVER | STM32G070xx | CMSIS_device_header=<stm32g0xx.h> || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32G070RBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1344937624" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32G070RBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Drivers/STM32G0xx_HAL_Driver/Inc | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Drivers/CMSIS/Device/ST/STM32G0xx/Include | ../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM0 || || || USE_HAL_DRIVER | STM32G070xx | CMSIS_device_header=<stm32g0xx.h> || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32G070RBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||||
|
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1224262438" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="64" valueType="string"/>
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1893601218" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1893601218" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||||
<builder buildPath="${workspace_loc:/PCB-Heater}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1892196526" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
<builder buildPath="${workspace_loc:/PCB-Heater}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1892196526" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1860582162" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1860582162" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
||||||
@@ -103,7 +104,8 @@
|
|||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1293906698" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1293906698" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.213198084" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.213198084" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.667446265" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.667446265" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1233208762" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.5 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32G070RBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Drivers/STM32G0xx_HAL_Driver/Inc | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Drivers/CMSIS/Device/ST/STM32G0xx/Include | ../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM0 || || || USE_HAL_DRIVER | STM32G070xx | CMSIS_device_header=<stm32g0xx.h> || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32G070RBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1233208762" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32G070RBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Drivers/STM32G0xx_HAL_Driver/Inc | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Drivers/CMSIS/Device/ST/STM32G0xx/Include | ../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM0 || || || USE_HAL_DRIVER | STM32G070xx | CMSIS_device_header=<stm32g0xx.h> || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32G070RBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||||
|
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1336430547" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="64" valueType="string"/>
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1618910208" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1618910208" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||||
<builder buildPath="${workspace_loc:/PCB-Heater}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1264878438" managedBuildOn="true" name="Gnu Make Builder.Release" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
<builder buildPath="${workspace_loc:/PCB-Heater}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1264878438" managedBuildOn="true" name="Gnu Make Builder.Release" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.909624158" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.909624158" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="596919080754294639" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-412172835581539755" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="596919080754294639" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-412172835581539755" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
|
@@ -105,6 +105,7 @@ void Error_Handler(void);
|
|||||||
#define TIM1_GC_GPIO_Port GPIOA
|
#define TIM1_GC_GPIO_Port GPIOA
|
||||||
#define BUZZER_Pin GPIO_PIN_9
|
#define BUZZER_Pin GPIO_PIN_9
|
||||||
#define BUZZER_GPIO_Port GPIOB
|
#define BUZZER_GPIO_Port GPIOB
|
||||||
|
|
||||||
/* USER CODE BEGIN Private defines */
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
/* USER CODE END Private defines */
|
/* USER CODE END Private defines */
|
||||||
|
@@ -49,6 +49,7 @@
|
|||||||
void NMI_Handler(void);
|
void NMI_Handler(void);
|
||||||
void HardFault_Handler(void);
|
void HardFault_Handler(void);
|
||||||
void TIM6_IRQHandler(void);
|
void TIM6_IRQHandler(void);
|
||||||
|
void TIM16_IRQHandler(void);
|
||||||
void TIM17_IRQHandler(void);
|
void TIM17_IRQHandler(void);
|
||||||
/* USER CODE BEGIN EFP */
|
/* USER CODE BEGIN EFP */
|
||||||
|
|
||||||
|
@@ -38,6 +38,8 @@ extern TIM_HandleTypeDef htim14;
|
|||||||
|
|
||||||
extern TIM_HandleTypeDef htim15;
|
extern TIM_HandleTypeDef htim15;
|
||||||
|
|
||||||
|
extern TIM_HandleTypeDef htim16;
|
||||||
|
|
||||||
extern TIM_HandleTypeDef htim17;
|
extern TIM_HandleTypeDef htim17;
|
||||||
|
|
||||||
/* USER CODE BEGIN Private defines */
|
/* USER CODE BEGIN Private defines */
|
||||||
@@ -47,6 +49,7 @@ extern TIM_HandleTypeDef htim17;
|
|||||||
void MX_TIM1_Init(void);
|
void MX_TIM1_Init(void);
|
||||||
void MX_TIM14_Init(void);
|
void MX_TIM14_Init(void);
|
||||||
void MX_TIM15_Init(void);
|
void MX_TIM15_Init(void);
|
||||||
|
void MX_TIM16_Init(void);
|
||||||
void MX_TIM17_Init(void);
|
void MX_TIM17_Init(void);
|
||||||
|
|
||||||
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
||||||
|
@@ -160,10 +160,11 @@ static uint8_t Stage = 0; //current stage of a profile
|
|||||||
static float spp; //Seconds per pixel (horizontal)
|
static float spp; //Seconds per pixel (horizontal)
|
||||||
static float dpp; //Degrees per pixel (vertical)
|
static float dpp; //Degrees per pixel (vertical)
|
||||||
uint16_t Timer = 0; //Time counter
|
uint16_t Timer = 0; //Time counter
|
||||||
|
static uint8_t fanActive = 0; //Fans are active flag
|
||||||
settings_t settings = { //settings structure
|
settings_t settings = { //settings structure
|
||||||
20, // uint8_t temp_offset
|
20, // uint8_t temp_offset
|
||||||
0, // uint8_t color_scheme
|
0, // uint8_t color_scheme
|
||||||
0, // uint8_t btn_clicks
|
1, // uint8_t btn_clicks
|
||||||
100, // uint8_t brightness
|
100, // uint8_t brightness
|
||||||
0, // uint8_t language
|
0, // uint8_t language
|
||||||
1 // uint8_t boot_screen
|
1 // uint8_t boot_screen
|
||||||
@@ -188,7 +189,7 @@ PIDController pid = {
|
|||||||
.Kd = 5.0f,
|
.Kd = 5.0f,
|
||||||
.T = 0.5f, //2 times per second
|
.T = 0.5f, //2 times per second
|
||||||
.tau = 0.2f, //Low-pass filter (0 - no filter)
|
.tau = 0.2f, //Low-pass filter (0 - no filter)
|
||||||
.limMin = 0.0f,
|
.limMin = -100.0f,
|
||||||
.limMax = 969.0f
|
.limMax = 969.0f
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -238,14 +239,18 @@ const osMutexAttr_t mutScreen_attributes = {
|
|||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
/* USER CODE BEGIN FunctionPrototypes */
|
/* USER CODE BEGIN FunctionPrototypes */
|
||||||
void btnPressed(uint8_t id); //buttons actions
|
void btnPressed(uint8_t id); //buttons actions
|
||||||
void updateTInfo(void);
|
void updateTInfo(uint16_t lvl);
|
||||||
void drawBootScreen(void);
|
void drawBootScreen(void);
|
||||||
void drawMainScreen(void);
|
void drawMainScreen(void);
|
||||||
void drawRunningScreen(void);
|
void drawRunningScreen(void);
|
||||||
void drawSettingsScreen(void);
|
void drawSettingsScreen(void);
|
||||||
void drawPlan(uint8_t use_mutex, uint8_t numbers, uint8_t wide);
|
void drawPlan(uint8_t use_mutex, uint8_t numbers, uint8_t wide);
|
||||||
void playSound(uint8_t sound); //Play one of the beeps
|
void playSound(uint8_t sound, uint8_t note); //Play one of the beeps
|
||||||
|
void playTestSound(); //Play a test sound
|
||||||
|
void setSoundPitch(uint8_t note); //Set sound pitch (note) 0-6 - A2-A8
|
||||||
void drawButton(uint8_t id, uint8_t func); //Draw a button by ID
|
void drawButton(uint8_t id, uint8_t func); //Draw a button by ID
|
||||||
|
void setFansSpeed(uint8_t speed); //Set fans speed
|
||||||
|
void stopHeater(void); //Stop the heater and reset the PID
|
||||||
|
|
||||||
/* USER CODE END FunctionPrototypes */
|
/* USER CODE END FunctionPrototypes */
|
||||||
|
|
||||||
@@ -376,7 +381,7 @@ void svc_display(void *argument)
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
lastPressed = id;
|
lastPressed = id;
|
||||||
playSound(S_CLICK);
|
playSound(S_CLICK, 2);
|
||||||
|
|
||||||
osMutexAcquire(mutScreenHandle, osWaitForever);
|
osMutexAcquire(mutScreenHandle, osWaitForever);
|
||||||
if (id < 4) {
|
if (id < 4) {
|
||||||
@@ -441,9 +446,6 @@ void svc_sensor(void *argument)
|
|||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
float temp, res, res_old;
|
float temp, res, res_old;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
uint16_t pulse;
|
|
||||||
int in, fr;
|
|
||||||
static char str[12] = {0};
|
|
||||||
|
|
||||||
PID_Init(&pid);
|
PID_Init(&pid);
|
||||||
|
|
||||||
@@ -457,17 +459,9 @@ void svc_sensor(void *argument)
|
|||||||
}
|
}
|
||||||
if (temp >= 0.0f) {
|
if (temp >= 0.0f) {
|
||||||
res = res / 3;
|
res = res / 3;
|
||||||
//PID
|
|
||||||
if (Preset == 2) {
|
|
||||||
PID_Update(&pid, 35.0f, res);
|
|
||||||
pulse = (uint16_t)(pid.limMax - pid.out)+20;
|
|
||||||
TIM1->ARR = pulse+10;
|
|
||||||
TIM1->CCR2 = pulse;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
res = temp;
|
res = temp;
|
||||||
PID_Init(&pid);
|
stopHeater();
|
||||||
TIM1->CCR2 = 1020;
|
|
||||||
}
|
}
|
||||||
Temperature = res;
|
Temperature = res;
|
||||||
if (res != res_old) {
|
if (res != res_old) {
|
||||||
@@ -475,18 +469,6 @@ void svc_sensor(void *argument)
|
|||||||
osMessageQueuePut(tempUpdateHandle, &res, 0, 50);
|
osMessageQueuePut(tempUpdateHandle, &res, 0, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw PID value
|
|
||||||
if (Screen == SCR_RUNNING) {
|
|
||||||
in = (int)(pid.out);
|
|
||||||
fr = (int)((pid.out-in)*100);
|
|
||||||
snprintf(str, 7, "%3d.%02d", in, fr);
|
|
||||||
osMutexAcquire(mutScreenHandle, osWaitForever);
|
|
||||||
ST7793_SetFontSize(1);
|
|
||||||
ST7793_FillRect(Darkergray, 11, 180, 27, 192);
|
|
||||||
ST7793_DrawString(Black, Darkergray, str, 11, 180);
|
|
||||||
osMutexRelease(mutScreenHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
osDelay(500);
|
osDelay(500);
|
||||||
}
|
}
|
||||||
/* USER CODE END svc_sensor */
|
/* USER CODE END svc_sensor */
|
||||||
@@ -533,9 +515,10 @@ void clockTick(void *argument)
|
|||||||
uint16_t x, y;
|
uint16_t x, y;
|
||||||
static uint16_t stime, stemp; //starting time and temperature for a stage
|
static uint16_t stime, stemp; //starting time and temperature for a stage
|
||||||
static float dps; //degrees per second
|
static float dps; //degrees per second
|
||||||
|
static uint16_t pulse; //to calculate pulse for TIM1
|
||||||
|
|
||||||
if (Temperature < 0.0f) {
|
if (Temperature < 0.0f) {
|
||||||
osTimerStop(secTimerHandle);
|
stopHeater();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,7 +536,7 @@ void clockTick(void *argument)
|
|||||||
ST7793_SetFontSize(2);
|
ST7793_SetFontSize(2);
|
||||||
ST7793_DrawStringC(Yellow, Darkergray, "Done!", 210, 5);
|
ST7793_DrawStringC(Yellow, Darkergray, "Done!", 210, 5);
|
||||||
osMutexRelease(mutScreenHandle);
|
osMutexRelease(mutScreenHandle);
|
||||||
osTimerStop(secTimerHandle);
|
stopHeater();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,43 +568,50 @@ void clockTick(void *argument)
|
|||||||
ST7793_DrawString(Black, Darkergray, str, 10, 140);
|
ST7793_DrawString(Black, Darkergray, str, 10, 140);
|
||||||
|
|
||||||
osMutexRelease(mutScreenHandle);
|
osMutexRelease(mutScreenHandle);
|
||||||
|
|
||||||
|
//PID
|
||||||
|
PID_Update(&pid, aimTemperature, Temperature);
|
||||||
|
if (pid.out >= 0.0f) {
|
||||||
|
pulse = (uint16_t)(pid.limMax - pid.out)+20;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pulse = 1020;
|
||||||
|
setFansSpeed((uint8_t)(pid.out * -1));
|
||||||
|
}
|
||||||
|
TIM1->ARR = pulse+10;
|
||||||
|
TIM1->CCR2 = pulse;
|
||||||
|
|
||||||
|
//Draw PID value
|
||||||
|
if (Screen == SCR_RUNNING) {
|
||||||
|
snprintf(str, 7, "%3d.%02d", (int)pid.out, (int)((pid.out-(int)pid.out)*100));
|
||||||
|
osMutexAcquire(mutScreenHandle, osWaitForever);
|
||||||
|
ST7793_SetFontSize(1);
|
||||||
|
ST7793_FillRect(Darkergray, 11, 180, 27, 192);
|
||||||
|
ST7793_DrawString(Black, Darkergray, str, 11, 180);
|
||||||
|
osMutexRelease(mutScreenHandle);
|
||||||
|
}
|
||||||
|
|
||||||
/* USER CODE END clockTick */
|
/* USER CODE END clockTick */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Private application code --------------------------------------------------*/
|
/* Private application code --------------------------------------------------*/
|
||||||
/* USER CODE BEGIN Application */
|
/* USER CODE BEGIN Application */
|
||||||
char str[10] = {0};
|
char str[10] = {0};
|
||||||
uint16_t lvl = 989;
|
//uint16_t lvl = 989;
|
||||||
void btnPressed(uint8_t id) {
|
void btnPressed(uint8_t id) {
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case BTN_PRE1: // PRE1
|
case BTN_PRE1: // PRE1
|
||||||
PID_Init(&pid);
|
|
||||||
TIM1->CCR2 = 1020;
|
|
||||||
ST7793_Brightness(99);
|
|
||||||
break;
|
break;
|
||||||
case BTN_PRE2: // PRE2
|
case BTN_PRE2: // PRE2
|
||||||
lvl -= 50;
|
|
||||||
if (lvl < 60) lvl = 989;
|
|
||||||
TIM1->ARR = lvl+10;
|
|
||||||
TIM1->CCR2 = lvl;
|
|
||||||
//htim1.Instance->EGR |= 1;
|
|
||||||
|
|
||||||
updateTInfo();
|
|
||||||
ST7793_Brightness(75);
|
|
||||||
break;
|
break;
|
||||||
case BTN_PRE3: // PRE3
|
case BTN_PRE3: // PRE3
|
||||||
PID_Init(&pid);
|
|
||||||
|
|
||||||
ST7793_Brightness(50);
|
|
||||||
break;
|
break;
|
||||||
case BTN_PRE4: // PRE4
|
case BTN_PRE4: // PRE4
|
||||||
lvl += 50;
|
|
||||||
if (lvl > 930) lvl = 60;
|
|
||||||
TIM1->ARR = lvl+10;
|
|
||||||
TIM1->CCR2 = lvl;
|
|
||||||
updateTInfo();
|
|
||||||
ST7793_Brightness(25);
|
|
||||||
break;
|
break;
|
||||||
case BTN_START: // START
|
case BTN_START: // START
|
||||||
Timer = 0;
|
Timer = 0;
|
||||||
@@ -630,13 +620,10 @@ void btnPressed(uint8_t id) {
|
|||||||
osTimerStart(secTimerHandle, 1000);
|
osTimerStart(secTimerHandle, 1000);
|
||||||
break;
|
break;
|
||||||
case BTN_COG: // COG (Settings)
|
case BTN_COG: // COG (Settings)
|
||||||
// drawBootScreen();
|
|
||||||
// osDelay(10000);
|
|
||||||
// drawMainScreen();
|
|
||||||
drawSettingsScreen();
|
drawSettingsScreen();
|
||||||
break;
|
break;
|
||||||
case BTN_STOP:
|
case BTN_STOP:
|
||||||
osTimerStop(secTimerHandle);
|
stopHeater();
|
||||||
drawMainScreen();
|
drawMainScreen();
|
||||||
break;
|
break;
|
||||||
case BTN_OK:
|
case BTN_OK:
|
||||||
@@ -645,7 +632,7 @@ void btnPressed(uint8_t id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateTInfo(void) {
|
void updateTInfo(uint16_t lvl) {
|
||||||
osMutexAcquire(mutScreenHandle, osWaitForever);
|
osMutexAcquire(mutScreenHandle, osWaitForever);
|
||||||
ST7793_SetFontSize(1);
|
ST7793_SetFontSize(1);
|
||||||
snprintf(str, 8, "T:%d", lvl);
|
snprintf(str, 8, "T:%d", lvl);
|
||||||
@@ -818,7 +805,7 @@ void drawPlan(uint8_t use_mutex, uint8_t numbers, uint8_t wide) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Play one of the beeps
|
//Play one of the beeps
|
||||||
void playSound(uint8_t sound) {
|
void playSound(uint8_t sound, uint8_t note) {
|
||||||
uint16_t time;
|
uint16_t time;
|
||||||
uint8_t enabled = 1;
|
uint8_t enabled = 1;
|
||||||
|
|
||||||
@@ -831,15 +818,52 @@ void playSound(uint8_t sound) {
|
|||||||
break;
|
break;
|
||||||
case S_CLICK:
|
case S_CLICK:
|
||||||
if (!settings.btn_clicks) enabled = 0;
|
if (!settings.btn_clicks) enabled = 0;
|
||||||
else time = 10;
|
else time = 5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
TIM17->ARR = time;
|
setSoundPitch(note);
|
||||||
HAL_GPIO_WritePin(BUZZER_GPIO_Port, BUZZER_Pin, GPIO_PIN_SET);
|
TIM16->ARR = time;
|
||||||
HAL_TIM_Base_Start_IT(&htim17);
|
//HAL_GPIO_WritePin(BUZZER_GPIO_Port, BUZZER_Pin, GPIO_PIN_SET);
|
||||||
|
HAL_TIM_PWM_Start(&htim17, TIM_CHANNEL_1);
|
||||||
|
HAL_TIM_Base_Start_IT(&htim16);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Play a test sound
|
||||||
|
void playTestSound() {
|
||||||
|
static uint8_t i;
|
||||||
|
|
||||||
|
for (i=0; i<6; i++) {
|
||||||
|
setSoundPitch(i);
|
||||||
|
HAL_TIM_PWM_Start(&htim17, TIM_CHANNEL_1);
|
||||||
|
osDelay(500);
|
||||||
|
}
|
||||||
|
HAL_TIM_PWM_Stop(&htim17, TIM_CHANNEL_1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Set sound pitch
|
||||||
|
void setSoundPitch(uint8_t note) {
|
||||||
|
static const uint16_t notes[] = {
|
||||||
|
58182, //A2
|
||||||
|
29091, //A3
|
||||||
|
14545, //A4
|
||||||
|
7273, //A5
|
||||||
|
3636, //A6
|
||||||
|
1818, //A7
|
||||||
|
909 //A8
|
||||||
|
};
|
||||||
|
|
||||||
|
if (note > 6) note = 0;
|
||||||
|
htim17.Init.Period = notes[note];
|
||||||
|
HAL_TIM_Base_Init(&htim17);
|
||||||
|
TIM_OC_InitTypeDef conf = {0};
|
||||||
|
conf.OCMode = TIM_OCMODE_PWM1;
|
||||||
|
conf.Pulse = notes[note] >> 1;
|
||||||
|
conf.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
conf.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
HAL_TIM_PWM_ConfigChannel(&htim17, &conf, TIM_CHANNEL_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw a button by ID
|
//Draw a button by ID
|
||||||
@@ -857,5 +881,30 @@ void drawButton(uint8_t id, uint8_t func) {
|
|||||||
func
|
func
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Set fans speed
|
||||||
|
void setFansSpeed(uint8_t speed) {
|
||||||
|
if (speed == 0) {
|
||||||
|
if (fanActive) {
|
||||||
|
HAL_TIM_PWM_Stop(&htim14, TIM_CHANNEL_1);
|
||||||
|
fanActive = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (speed > 100) speed = 100;
|
||||||
|
TIM14->CCR1 = speed;
|
||||||
|
if (!fanActive) {
|
||||||
|
fanActive = 1;
|
||||||
|
HAL_TIM_PWM_Start(&htim14, TIM_CHANNEL_1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Stop the heater and reset the PID
|
||||||
|
void stopHeater(void) {
|
||||||
|
if (osTimerIsRunning(secTimerHandle)) osTimerStop(secTimerHandle);
|
||||||
|
aimTemperature = 0.0f;
|
||||||
|
PID_Init(&pid);
|
||||||
|
TIM1->CCR2 = 1020;
|
||||||
|
}
|
||||||
/* USER CODE END Application */
|
/* USER CODE END Application */
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ void MX_GPIO_Init(void)
|
|||||||
|LCD_D4_Pin|LCD_D5_Pin|LCD_D6_Pin|LCD_D7_Pin, GPIO_PIN_RESET);
|
|LCD_D4_Pin|LCD_D5_Pin|LCD_D6_Pin|LCD_D7_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(GPIOB, LCD_RS_Pin|LCD_WR_Pin|BUZZER_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(GPIOB, LCD_RS_Pin|LCD_WR_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(MAX_CS_GPIO_Port, MAX_CS_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(MAX_CS_GPIO_Port, MAX_CS_Pin, GPIO_PIN_SET);
|
||||||
@@ -99,12 +99,12 @@ void MX_GPIO_Init(void)
|
|||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : PBPin PBPin */
|
/*Configure GPIO pin : PtPin */
|
||||||
GPIO_InitStruct.Pin = MAX_CS_Pin|BUZZER_Pin;
|
GPIO_InitStruct.Pin = MAX_CS_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(MAX_CS_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -98,8 +98,16 @@ int main(void)
|
|||||||
MX_TIM15_Init();
|
MX_TIM15_Init();
|
||||||
MX_TIM14_Init();
|
MX_TIM14_Init();
|
||||||
MX_USART1_UART_Init();
|
MX_USART1_UART_Init();
|
||||||
|
MX_TIM16_Init();
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
__HAL_TIM_CLEAR_FLAG(&htim17, TIM_SR_UIF); //clear the update flag so it wont trigger right away;
|
|
||||||
|
// TIM1 - Zero crossing and Triac duty
|
||||||
|
// TIM14 - Cooling fans PWM
|
||||||
|
// TIM15 - LCD backlight PWM
|
||||||
|
// TIM16 - Count beep duration
|
||||||
|
// TIM17 - PWM for passive buzzer
|
||||||
|
|
||||||
|
__HAL_TIM_CLEAR_FLAG(&htim16, TIM_SR_UIF); //clear the update flag so it wont trigger right away;
|
||||||
if (ST7793_Init() != 0) {
|
if (ST7793_Init() != 0) {
|
||||||
HAL_GPIO_WritePin(LED_Status_GPIO_Port, LED_Status_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(LED_Status_GPIO_Port, LED_Status_Pin, GPIO_PIN_SET);
|
||||||
while (1) {;}
|
while (1) {;}
|
||||||
@@ -109,6 +117,14 @@ int main(void)
|
|||||||
HAL_TIM_OnePulse_Start(&htim1, 2);
|
HAL_TIM_OnePulse_Start(&htim1, 2);
|
||||||
//TIM1->CR1 |= TIM_CR1_CEN;
|
//TIM1->CR1 |= TIM_CR1_CEN;
|
||||||
HAL_TIM_PWM_Start(&htim15, TIM_CHANNEL_1);
|
HAL_TIM_PWM_Start(&htim15, TIM_CHANNEL_1);
|
||||||
|
|
||||||
|
HAL_TIM_Base_Start(&htim14);
|
||||||
|
//HAL_TIM_Base_Start(&htim17);
|
||||||
|
|
||||||
|
// Boot beep
|
||||||
|
HAL_TIM_PWM_Start(&htim17, TIM_CHANNEL_1);
|
||||||
|
HAL_Delay(70);
|
||||||
|
HAL_TIM_PWM_Stop(&htim17, TIM_CHANNEL_1);
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Init scheduler */
|
/* Init scheduler */
|
||||||
@@ -117,7 +133,6 @@ int main(void)
|
|||||||
|
|
||||||
/* Start scheduler */
|
/* Start scheduler */
|
||||||
osKernelStart();
|
osKernelStart();
|
||||||
|
|
||||||
/* We should never get here as control is now taken by the scheduler */
|
/* We should never get here as control is now taken by the scheduler */
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
/* USER CODE BEGIN WHILE */
|
/* USER CODE BEGIN WHILE */
|
||||||
@@ -198,9 +213,10 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
|||||||
}
|
}
|
||||||
/* USER CODE BEGIN Callback 1 */
|
/* USER CODE BEGIN Callback 1 */
|
||||||
|
|
||||||
if (htim->Instance == TIM17) {
|
if (htim->Instance == TIM16) {
|
||||||
HAL_TIM_Base_Stop_IT(&htim17);
|
HAL_TIM_Base_Stop_IT(&htim16);
|
||||||
HAL_GPIO_WritePin(BUZZER_GPIO_Port, BUZZER_Pin, GPIO_PIN_RESET);
|
HAL_TIM_PWM_Stop(&htim17, TIM_CHANNEL_1);
|
||||||
|
//HAL_GPIO_WritePin(BUZZER_GPIO_Port, BUZZER_Pin, GPIO_PIN_RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE END Callback 1 */
|
/* USER CODE END Callback 1 */
|
||||||
|
@@ -72,6 +72,7 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
|||||||
htim6.Instance = TIM6;
|
htim6.Instance = TIM6;
|
||||||
|
|
||||||
/* Initialize TIMx peripheral as follow:
|
/* Initialize TIMx peripheral as follow:
|
||||||
|
|
||||||
+ Period = [(TIM6CLK/1000) - 1]. to have a (1/1000) s time base.
|
+ Period = [(TIM6CLK/1000) - 1]. to have a (1/1000) s time base.
|
||||||
+ Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock.
|
+ Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock.
|
||||||
+ ClockDivision = 0
|
+ ClockDivision = 0
|
||||||
|
@@ -55,6 +55,7 @@
|
|||||||
/* USER CODE END 0 */
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
/* External variables --------------------------------------------------------*/
|
/* External variables --------------------------------------------------------*/
|
||||||
|
extern TIM_HandleTypeDef htim16;
|
||||||
extern TIM_HandleTypeDef htim17;
|
extern TIM_HandleTypeDef htim17;
|
||||||
extern TIM_HandleTypeDef htim6;
|
extern TIM_HandleTypeDef htim6;
|
||||||
|
|
||||||
@@ -116,6 +117,20 @@ void TIM6_IRQHandler(void)
|
|||||||
/* USER CODE END TIM6_IRQn 1 */
|
/* USER CODE END TIM6_IRQn 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles TIM16 global interrupt.
|
||||||
|
*/
|
||||||
|
void TIM16_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM16_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_IRQn 0 */
|
||||||
|
HAL_TIM_IRQHandler(&htim16);
|
||||||
|
/* USER CODE BEGIN TIM16_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function handles TIM17 global interrupt.
|
* @brief This function handles TIM17 global interrupt.
|
||||||
*/
|
*/
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
TIM_HandleTypeDef htim1;
|
TIM_HandleTypeDef htim1;
|
||||||
TIM_HandleTypeDef htim14;
|
TIM_HandleTypeDef htim14;
|
||||||
TIM_HandleTypeDef htim15;
|
TIM_HandleTypeDef htim15;
|
||||||
|
TIM_HandleTypeDef htim16;
|
||||||
TIM_HandleTypeDef htim17;
|
TIM_HandleTypeDef htim17;
|
||||||
|
|
||||||
/* TIM1 init function */
|
/* TIM1 init function */
|
||||||
@@ -147,9 +148,9 @@ void MX_TIM14_Init(void)
|
|||||||
|
|
||||||
/* USER CODE END TIM14_Init 1 */
|
/* USER CODE END TIM14_Init 1 */
|
||||||
htim14.Instance = TIM14;
|
htim14.Instance = TIM14;
|
||||||
htim14.Init.Prescaler = 0;
|
htim14.Init.Prescaler = 10-1;
|
||||||
htim14.Init.CounterMode = TIM_COUNTERMODE_UP;
|
htim14.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
htim14.Init.Period = 65535;
|
htim14.Init.Period = 100-1;
|
||||||
htim14.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
htim14.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
htim14.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
htim14.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
if (HAL_TIM_Base_Init(&htim14) != HAL_OK)
|
if (HAL_TIM_Base_Init(&htim14) != HAL_OK)
|
||||||
@@ -161,7 +162,7 @@ void MX_TIM14_Init(void)
|
|||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
||||||
sConfigOC.Pulse = 0;
|
sConfigOC.Pulse = 100;
|
||||||
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
if (HAL_TIM_PWM_ConfigChannel(&htim14, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
if (HAL_TIM_PWM_ConfigChannel(&htim14, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
||||||
@@ -191,7 +192,7 @@ void MX_TIM15_Init(void)
|
|||||||
|
|
||||||
/* USER CODE END TIM15_Init 1 */
|
/* USER CODE END TIM15_Init 1 */
|
||||||
htim15.Instance = TIM15;
|
htim15.Instance = TIM15;
|
||||||
htim15.Init.Prescaler = 320-1;
|
htim15.Init.Prescaler = 640-1;
|
||||||
htim15.Init.CounterMode = TIM_COUNTERMODE_UP;
|
htim15.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
htim15.Init.Period = 100-1;
|
htim15.Init.Period = 100-1;
|
||||||
htim15.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
htim15.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
@@ -244,6 +245,37 @@ void MX_TIM15_Init(void)
|
|||||||
/* USER CODE END TIM15_Init 2 */
|
/* USER CODE END TIM15_Init 2 */
|
||||||
HAL_TIM_MspPostInit(&htim15);
|
HAL_TIM_MspPostInit(&htim15);
|
||||||
|
|
||||||
|
}
|
||||||
|
/* TIM16 init function */
|
||||||
|
void MX_TIM16_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM16_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM16_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_Init 1 */
|
||||||
|
htim16.Instance = TIM16;
|
||||||
|
htim16.Init.Prescaler = 64000-1;
|
||||||
|
htim16.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim16.Init.Period = 999;
|
||||||
|
htim16.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim16.Init.RepetitionCounter = 0;
|
||||||
|
htim16.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim16) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_OnePulse_Init(&htim16, TIM_OPMODE_SINGLE) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM16_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_Init 2 */
|
||||||
|
|
||||||
}
|
}
|
||||||
/* TIM17 init function */
|
/* TIM17 init function */
|
||||||
void MX_TIM17_Init(void)
|
void MX_TIM17_Init(void)
|
||||||
@@ -253,13 +285,16 @@ void MX_TIM17_Init(void)
|
|||||||
|
|
||||||
/* USER CODE END TIM17_Init 0 */
|
/* USER CODE END TIM17_Init 0 */
|
||||||
|
|
||||||
|
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||||
|
TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};
|
||||||
|
|
||||||
/* USER CODE BEGIN TIM17_Init 1 */
|
/* USER CODE BEGIN TIM17_Init 1 */
|
||||||
|
|
||||||
/* USER CODE END TIM17_Init 1 */
|
/* USER CODE END TIM17_Init 1 */
|
||||||
htim17.Instance = TIM17;
|
htim17.Instance = TIM17;
|
||||||
htim17.Init.Prescaler = 64000-1;
|
htim17.Init.Prescaler = 10-1;
|
||||||
htim17.Init.CounterMode = TIM_COUNTERMODE_UP;
|
htim17.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
htim17.Init.Period = 999;
|
htim17.Init.Period = 14545-1;
|
||||||
htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
htim17.Init.RepetitionCounter = 0;
|
htim17.Init.RepetitionCounter = 0;
|
||||||
htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
@@ -267,13 +302,37 @@ void MX_TIM17_Init(void)
|
|||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
if (HAL_TIM_OnePulse_Init(&htim17, TIM_OPMODE_SINGLE) != HAL_OK)
|
if (HAL_TIM_PWM_Init(&htim17) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
||||||
|
sConfigOC.Pulse = 7272;
|
||||||
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
|
||||||
|
sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim17, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
|
||||||
|
sBreakDeadTimeConfig.DeadTime = 0;
|
||||||
|
sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
|
||||||
|
sBreakDeadTimeConfig.BreakFilter = 0;
|
||||||
|
sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE;
|
||||||
|
if (HAL_TIMEx_ConfigBreakDeadTime(&htim17, &sBreakDeadTimeConfig) != HAL_OK)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
/* USER CODE BEGIN TIM17_Init 2 */
|
/* USER CODE BEGIN TIM17_Init 2 */
|
||||||
|
|
||||||
/* USER CODE END TIM17_Init 2 */
|
/* USER CODE END TIM17_Init 2 */
|
||||||
|
HAL_TIM_MspPostInit(&htim17);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,6 +385,21 @@ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
|
|||||||
|
|
||||||
/* USER CODE END TIM15_MspInit 1 */
|
/* USER CODE END TIM15_MspInit 1 */
|
||||||
}
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM16)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM16_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspInit 0 */
|
||||||
|
/* TIM16 clock enable */
|
||||||
|
__HAL_RCC_TIM16_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* TIM16 interrupt Init */
|
||||||
|
HAL_NVIC_SetPriority(TIM16_IRQn, 3, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(TIM16_IRQn);
|
||||||
|
/* USER CODE BEGIN TIM16_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspInit 1 */
|
||||||
|
}
|
||||||
else if(tim_baseHandle->Instance==TIM17)
|
else if(tim_baseHandle->Instance==TIM17)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN TIM17_MspInit 0 */
|
/* USER CODE BEGIN TIM17_MspInit 0 */
|
||||||
@@ -408,6 +482,27 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle)
|
|||||||
|
|
||||||
/* USER CODE END TIM15_MspPostInit 1 */
|
/* USER CODE END TIM15_MspPostInit 1 */
|
||||||
}
|
}
|
||||||
|
else if(timHandle->Instance==TIM17)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM17_MspPostInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_MspPostInit 0 */
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
/**TIM17 GPIO Configuration
|
||||||
|
PB9 ------> TIM17_CH1
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = BUZZER_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF2_TIM17;
|
||||||
|
HAL_GPIO_Init(BUZZER_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM17_MspPostInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_MspPostInit 1 */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,6 +549,20 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
|
|||||||
|
|
||||||
/* USER CODE END TIM15_MspDeInit 1 */
|
/* USER CODE END TIM15_MspDeInit 1 */
|
||||||
}
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM16)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM16_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM16_CLK_DISABLE();
|
||||||
|
|
||||||
|
/* TIM16 interrupt Deinit */
|
||||||
|
HAL_NVIC_DisableIRQ(TIM16_IRQn);
|
||||||
|
/* USER CODE BEGIN TIM16_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspDeInit 1 */
|
||||||
|
}
|
||||||
else if(tim_baseHandle->Instance==TIM17)
|
else if(tim_baseHandle->Instance==TIM17)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN TIM17_MspDeInit 0 */
|
/* USER CODE BEGIN TIM17_MspDeInit 0 */
|
||||||
|
@@ -28,7 +28,8 @@ Mcu.CPN=STM32G070RBT6
|
|||||||
Mcu.Family=STM32G0
|
Mcu.Family=STM32G0
|
||||||
Mcu.IP0=ADC1
|
Mcu.IP0=ADC1
|
||||||
Mcu.IP1=FREERTOS
|
Mcu.IP1=FREERTOS
|
||||||
Mcu.IP10=USART1
|
Mcu.IP10=TIM17
|
||||||
|
Mcu.IP11=USART1
|
||||||
Mcu.IP2=NVIC
|
Mcu.IP2=NVIC
|
||||||
Mcu.IP3=RCC
|
Mcu.IP3=RCC
|
||||||
Mcu.IP4=SPI2
|
Mcu.IP4=SPI2
|
||||||
@@ -36,8 +37,8 @@ Mcu.IP5=SYS
|
|||||||
Mcu.IP6=TIM1
|
Mcu.IP6=TIM1
|
||||||
Mcu.IP7=TIM14
|
Mcu.IP7=TIM14
|
||||||
Mcu.IP8=TIM15
|
Mcu.IP8=TIM15
|
||||||
Mcu.IP9=TIM17
|
Mcu.IP9=TIM16
|
||||||
Mcu.IPNb=11
|
Mcu.IPNb=12
|
||||||
Mcu.Name=STM32G070RBTx
|
Mcu.Name=STM32G070RBTx
|
||||||
Mcu.Package=LQFP64
|
Mcu.Package=LQFP64
|
||||||
Mcu.Pin0=PC12
|
Mcu.Pin0=PC12
|
||||||
@@ -73,20 +74,21 @@ Mcu.Pin35=VP_TIM1_VS_ClockSourceINT
|
|||||||
Mcu.Pin36=VP_TIM1_VS_OPM
|
Mcu.Pin36=VP_TIM1_VS_OPM
|
||||||
Mcu.Pin37=VP_TIM14_VS_ClockSourceINT
|
Mcu.Pin37=VP_TIM14_VS_ClockSourceINT
|
||||||
Mcu.Pin38=VP_TIM15_VS_ClockSourceINT
|
Mcu.Pin38=VP_TIM15_VS_ClockSourceINT
|
||||||
Mcu.Pin39=VP_TIM17_VS_ClockSourceINT
|
Mcu.Pin39=VP_TIM16_VS_ClockSourceINT
|
||||||
Mcu.Pin4=PC1
|
Mcu.Pin4=PC1
|
||||||
Mcu.Pin40=VP_TIM17_VS_OPM
|
Mcu.Pin40=VP_TIM16_VS_OPM
|
||||||
|
Mcu.Pin41=VP_TIM17_VS_ClockSourceINT
|
||||||
Mcu.Pin5=PC2
|
Mcu.Pin5=PC2
|
||||||
Mcu.Pin6=PC3
|
Mcu.Pin6=PC3
|
||||||
Mcu.Pin7=PA0
|
Mcu.Pin7=PA0
|
||||||
Mcu.Pin8=PA1
|
Mcu.Pin8=PA1
|
||||||
Mcu.Pin9=PA2
|
Mcu.Pin9=PA2
|
||||||
Mcu.PinsNb=41
|
Mcu.PinsNb=42
|
||||||
Mcu.ThirdPartyNb=0
|
Mcu.ThirdPartyNb=0
|
||||||
Mcu.UserConstants=
|
Mcu.UserConstants=
|
||||||
Mcu.UserName=STM32G070RBTx
|
Mcu.UserName=STM32G070RBTx
|
||||||
MxCube.Version=6.6.1
|
MxCube.Version=6.8.0
|
||||||
MxDb.Version=DB.6.0.60
|
MxDb.Version=DB.6.0.80
|
||||||
NVIC.ForceEnableDMAVector=true
|
NVIC.ForceEnableDMAVector=true
|
||||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
@@ -96,6 +98,7 @@ NVIC.SavedPendsvIrqHandlerGenerated=true
|
|||||||
NVIC.SavedSvcallIrqHandlerGenerated=true
|
NVIC.SavedSvcallIrqHandlerGenerated=true
|
||||||
NVIC.SavedSystickIrqHandlerGenerated=true
|
NVIC.SavedSystickIrqHandlerGenerated=true
|
||||||
NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:false\:true\:false\:true\:false
|
NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:false\:true\:false\:true\:false
|
||||||
|
NVIC.TIM16_IRQn=true\:3\:0\:false\:false\:true\:true\:true\:true\:true
|
||||||
NVIC.TIM17_IRQn=true\:3\:0\:false\:false\:true\:true\:true\:true\:true
|
NVIC.TIM17_IRQn=true\:3\:0\:false\:false\:true\:true\:true\:true\:true
|
||||||
NVIC.TIM6_IRQn=true\:3\:0\:false\:false\:true\:false\:false\:true\:true
|
NVIC.TIM6_IRQn=true\:3\:0\:false\:false\:true\:false\:false\:true\:true
|
||||||
NVIC.TimeBase=TIM6_IRQn
|
NVIC.TimeBase=TIM6_IRQn
|
||||||
@@ -189,11 +192,10 @@ PB6.Signal=USART1_TX
|
|||||||
PB7.Locked=true
|
PB7.Locked=true
|
||||||
PB7.Mode=Asynchronous
|
PB7.Mode=Asynchronous
|
||||||
PB7.Signal=USART1_RX
|
PB7.Signal=USART1_RX
|
||||||
PB9.GPIOParameters=GPIO_Speed,GPIO_Label
|
PB9.GPIOParameters=GPIO_Label
|
||||||
PB9.GPIO_Label=BUZZER
|
PB9.GPIO_Label=BUZZER
|
||||||
PB9.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
|
||||||
PB9.Locked=true
|
PB9.Locked=true
|
||||||
PB9.Signal=GPIO_Output
|
PB9.Signal=S_TIM17_CH1
|
||||||
PC1.GPIOParameters=GPIO_Label
|
PC1.GPIOParameters=GPIO_Label
|
||||||
PC1.GPIO_Label=LCD_LED
|
PC1.GPIO_Label=LCD_LED
|
||||||
PC1.Signal=S_TIM15_CH1
|
PC1.Signal=S_TIM15_CH1
|
||||||
@@ -252,12 +254,13 @@ ProjectManager.PreviousToolchain=STM32CubeIDE
|
|||||||
ProjectManager.ProjectBuild=false
|
ProjectManager.ProjectBuild=false
|
||||||
ProjectManager.ProjectFileName=PCB-Heater.ioc
|
ProjectManager.ProjectFileName=PCB-Heater.ioc
|
||||||
ProjectManager.ProjectName=PCB-Heater
|
ProjectManager.ProjectName=PCB-Heater
|
||||||
|
ProjectManager.ProjectStructure=
|
||||||
ProjectManager.RegisterCallBack=
|
ProjectManager.RegisterCallBack=
|
||||||
ProjectManager.StackSize=0x400
|
ProjectManager.StackSize=0x400
|
||||||
ProjectManager.TargetToolchain=STM32CubeIDE
|
ProjectManager.TargetToolchain=STM32CubeIDE
|
||||||
ProjectManager.ToolChainLocation=
|
ProjectManager.ToolChainLocation=
|
||||||
ProjectManager.UnderRoot=true
|
ProjectManager.UnderRoot=true
|
||||||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_TIM1_Init-TIM1-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-MX_SPI2_Init-SPI2-false-HAL-true,6-MX_TIM17_Init-TIM17-false-HAL-true,7-MX_TIM15_Init-TIM15-false-HAL-true,8-MX_TIM14_Init-TIM14-false-HAL-true,9-MX_USART1_UART_Init-USART1-false-HAL-true
|
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_TIM1_Init-TIM1-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-MX_SPI2_Init-SPI2-false-HAL-true,6-MX_TIM17_Init-TIM17-false-HAL-true,7-MX_TIM15_Init-TIM15-false-HAL-true,8-MX_TIM14_Init-TIM14-false-HAL-true,9-MX_USART1_UART_Init-USART1-false-HAL-true,10-MX_TIM16_Init-TIM16-false-HAL-true
|
||||||
RCC.ADCFreq_Value=64000000
|
RCC.ADCFreq_Value=64000000
|
||||||
RCC.AHBFreq_Value=64000000
|
RCC.AHBFreq_Value=64000000
|
||||||
RCC.APBFreq_Value=64000000
|
RCC.APBFreq_Value=64000000
|
||||||
@@ -289,6 +292,8 @@ SH.S_TIM14_CH1.0=TIM14_CH1,PWM Generation1 CH1
|
|||||||
SH.S_TIM14_CH1.ConfNb=1
|
SH.S_TIM14_CH1.ConfNb=1
|
||||||
SH.S_TIM15_CH1.0=TIM15_CH1,PWM Generation1 CH1
|
SH.S_TIM15_CH1.0=TIM15_CH1,PWM Generation1 CH1
|
||||||
SH.S_TIM15_CH1.ConfNb=1
|
SH.S_TIM15_CH1.ConfNb=1
|
||||||
|
SH.S_TIM17_CH1.0=TIM17_CH1,PWM Generation1 CH1
|
||||||
|
SH.S_TIM17_CH1.ConfNb=1
|
||||||
SH.S_TIM1_CH1.0=TIM1_CH1,Input_Capture1_from_TI1
|
SH.S_TIM1_CH1.0=TIM1_CH1,Input_Capture1_from_TI1
|
||||||
SH.S_TIM1_CH1.1=TIM1_CH1,TriggerSource_TI1FP1
|
SH.S_TIM1_CH1.1=TIM1_CH1,TriggerSource_TI1FP1
|
||||||
SH.S_TIM1_CH1.ConfNb=2
|
SH.S_TIM1_CH1.ConfNb=2
|
||||||
@@ -315,15 +320,23 @@ TIM1.Period=999
|
|||||||
TIM1.Prescaler=640-1
|
TIM1.Prescaler=640-1
|
||||||
TIM1.Pulse-PWM\ Generation2\ CH2=1020
|
TIM1.Pulse-PWM\ Generation2\ CH2=1020
|
||||||
TIM14.Channel=TIM_CHANNEL_1
|
TIM14.Channel=TIM_CHANNEL_1
|
||||||
TIM14.IPParameters=Channel
|
TIM14.IPParameters=Channel,Prescaler,Period,Pulse
|
||||||
|
TIM14.Period=100-1
|
||||||
|
TIM14.Prescaler=10-1
|
||||||
|
TIM14.Pulse=100
|
||||||
TIM15.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
|
TIM15.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
|
||||||
TIM15.IPParameters=Channel-PWM Generation1 CH1,Prescaler,Period
|
TIM15.IPParameters=Channel-PWM Generation1 CH1,Prescaler,Period
|
||||||
TIM15.Period=100-1
|
TIM15.Period=100-1
|
||||||
TIM15.Prescaler=320-1
|
TIM15.Prescaler=640-1
|
||||||
|
TIM16.IPParameters=Prescaler,Period
|
||||||
|
TIM16.Period=999
|
||||||
|
TIM16.Prescaler=64000-1
|
||||||
TIM17.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_DISABLE
|
TIM17.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_DISABLE
|
||||||
TIM17.IPParameters=Prescaler,Period,AutoReloadPreload
|
TIM17.Channel=TIM_CHANNEL_1
|
||||||
TIM17.Period=999
|
TIM17.IPParameters=Prescaler,Period,AutoReloadPreload,Channel,Pulse
|
||||||
TIM17.Prescaler=64000-1
|
TIM17.Period=14545-1
|
||||||
|
TIM17.Prescaler=10-1
|
||||||
|
TIM17.Pulse=7272
|
||||||
USART1.IPParameters=VirtualMode-Asynchronous
|
USART1.IPParameters=VirtualMode-Asynchronous
|
||||||
USART1.VirtualMode-Asynchronous=VM_ASYNC
|
USART1.VirtualMode-Asynchronous=VM_ASYNC
|
||||||
VP_FREERTOS_VS_CMSIS_V2.Mode=CMSIS_V2
|
VP_FREERTOS_VS_CMSIS_V2.Mode=CMSIS_V2
|
||||||
@@ -336,10 +349,12 @@ VP_TIM14_VS_ClockSourceINT.Mode=Enable_Timer
|
|||||||
VP_TIM14_VS_ClockSourceINT.Signal=TIM14_VS_ClockSourceINT
|
VP_TIM14_VS_ClockSourceINT.Signal=TIM14_VS_ClockSourceINT
|
||||||
VP_TIM15_VS_ClockSourceINT.Mode=Internal
|
VP_TIM15_VS_ClockSourceINT.Mode=Internal
|
||||||
VP_TIM15_VS_ClockSourceINT.Signal=TIM15_VS_ClockSourceINT
|
VP_TIM15_VS_ClockSourceINT.Signal=TIM15_VS_ClockSourceINT
|
||||||
|
VP_TIM16_VS_ClockSourceINT.Mode=Enable_Timer
|
||||||
|
VP_TIM16_VS_ClockSourceINT.Signal=TIM16_VS_ClockSourceINT
|
||||||
|
VP_TIM16_VS_OPM.Mode=OPM_bit
|
||||||
|
VP_TIM16_VS_OPM.Signal=TIM16_VS_OPM
|
||||||
VP_TIM17_VS_ClockSourceINT.Mode=Enable_Timer
|
VP_TIM17_VS_ClockSourceINT.Mode=Enable_Timer
|
||||||
VP_TIM17_VS_ClockSourceINT.Signal=TIM17_VS_ClockSourceINT
|
VP_TIM17_VS_ClockSourceINT.Signal=TIM17_VS_ClockSourceINT
|
||||||
VP_TIM17_VS_OPM.Mode=OPM_bit
|
|
||||||
VP_TIM17_VS_OPM.Signal=TIM17_VS_OPM
|
|
||||||
VP_TIM1_VS_ClockSourceINT.Mode=Internal
|
VP_TIM1_VS_ClockSourceINT.Mode=Internal
|
||||||
VP_TIM1_VS_ClockSourceINT.Signal=TIM1_VS_ClockSourceINT
|
VP_TIM1_VS_ClockSourceINT.Signal=TIM1_VS_ClockSourceINT
|
||||||
VP_TIM1_VS_ControllerModeCombinedResetTrigger.Mode=Combined_Reset_Trigger_Mode
|
VP_TIM1_VS_ControllerModeCombinedResetTrigger.Mode=Combined_Reset_Trigger_Mode
|
||||||
@@ -347,4 +362,5 @@ VP_TIM1_VS_ControllerModeCombinedResetTrigger.Signal=TIM1_VS_ControllerModeCombi
|
|||||||
VP_TIM1_VS_OPM.Mode=OPM_bit
|
VP_TIM1_VS_OPM.Mode=OPM_bit
|
||||||
VP_TIM1_VS_OPM.Signal=TIM1_VS_OPM
|
VP_TIM1_VS_OPM.Signal=TIM1_VS_OPM
|
||||||
board=custom
|
board=custom
|
||||||
|
rtos.0.ip=FREERTOS
|
||||||
isbadioc=false
|
isbadioc=false
|
||||||
|
BIN
kicad/pcb-heater/BOM.xlsx
Normal file
BIN
kicad/pcb-heater/BOM.xlsx
Normal file
Binary file not shown.
@@ -391,18 +391,23 @@
|
|||||||
"rule_severities": {
|
"rule_severities": {
|
||||||
"bus_definition_conflict": "error",
|
"bus_definition_conflict": "error",
|
||||||
"bus_entry_needed": "error",
|
"bus_entry_needed": "error",
|
||||||
"bus_label_syntax": "error",
|
|
||||||
"bus_to_bus_conflict": "error",
|
"bus_to_bus_conflict": "error",
|
||||||
"bus_to_net_conflict": "error",
|
"bus_to_net_conflict": "error",
|
||||||
|
"conflicting_netclasses": "error",
|
||||||
"different_unit_footprint": "error",
|
"different_unit_footprint": "error",
|
||||||
"different_unit_net": "error",
|
"different_unit_net": "error",
|
||||||
"duplicate_reference": "error",
|
"duplicate_reference": "error",
|
||||||
"duplicate_sheet_names": "error",
|
"duplicate_sheet_names": "error",
|
||||||
|
"endpoint_off_grid": "warning",
|
||||||
"extra_units": "error",
|
"extra_units": "error",
|
||||||
"global_label_dangling": "warning",
|
"global_label_dangling": "warning",
|
||||||
"hier_label_mismatch": "error",
|
"hier_label_mismatch": "error",
|
||||||
"label_dangling": "error",
|
"label_dangling": "error",
|
||||||
"lib_symbol_issues": "warning",
|
"lib_symbol_issues": "warning",
|
||||||
|
"missing_bidi_pin": "warning",
|
||||||
|
"missing_input_pin": "warning",
|
||||||
|
"missing_power_pin": "error",
|
||||||
|
"missing_unit": "warning",
|
||||||
"multiple_net_names": "warning",
|
"multiple_net_names": "warning",
|
||||||
"net_not_bus_member": "warning",
|
"net_not_bus_member": "warning",
|
||||||
"no_connect_connected": "warning",
|
"no_connect_connected": "warning",
|
||||||
@@ -412,6 +417,7 @@
|
|||||||
"pin_to_pin": "warning",
|
"pin_to_pin": "warning",
|
||||||
"power_pin_not_driven": "error",
|
"power_pin_not_driven": "error",
|
||||||
"similar_labels": "warning",
|
"similar_labels": "warning",
|
||||||
|
"simulation_model_issue": "error",
|
||||||
"unannotated": "error",
|
"unannotated": "error",
|
||||||
"unit_value_mismatch": "error",
|
"unit_value_mismatch": "error",
|
||||||
"unresolved_variable": "error",
|
"unresolved_variable": "error",
|
||||||
@@ -467,6 +473,8 @@
|
|||||||
"schematic": {
|
"schematic": {
|
||||||
"annotate_start_num": 0,
|
"annotate_start_num": 0,
|
||||||
"drawing": {
|
"drawing": {
|
||||||
|
"dashed_lines_dash_length_ratio": 12.0,
|
||||||
|
"dashed_lines_gap_length_ratio": 3.0,
|
||||||
"default_line_thickness": 6.0,
|
"default_line_thickness": 6.0,
|
||||||
"default_text_size": 50.0,
|
"default_text_size": 50.0,
|
||||||
"field_names": [],
|
"field_names": [],
|
||||||
@@ -498,7 +506,11 @@
|
|||||||
"page_layout_descr_file": "",
|
"page_layout_descr_file": "",
|
||||||
"plot_directory": "",
|
"plot_directory": "",
|
||||||
"spice_adjust_passive_values": false,
|
"spice_adjust_passive_values": false,
|
||||||
|
"spice_current_sheet_as_root": false,
|
||||||
"spice_external_command": "spice \"%I\"",
|
"spice_external_command": "spice \"%I\"",
|
||||||
|
"spice_model_current_sheet_as_root": true,
|
||||||
|
"spice_save_all_currents": false,
|
||||||
|
"spice_save_all_voltages": false,
|
||||||
"subpart_first_id": 65,
|
"subpart_first_id": 65,
|
||||||
"subpart_id_separator": 0
|
"subpart_id_separator": 0
|
||||||
},
|
},
|
||||||
|
@@ -6901,7 +6901,7 @@
|
|||||||
(property "Reference" "F1" (at 143.51 32.385 90)
|
(property "Reference" "F1" (at 143.51 32.385 90)
|
||||||
(effects (font (size 1.27 1.27)))
|
(effects (font (size 1.27 1.27)))
|
||||||
)
|
)
|
||||||
(property "Value" "0.5A" (at 144.145 35.56 90)
|
(property "Value" "5A" (at 144.145 35.56 90)
|
||||||
(effects (font (size 1.27 1.27)))
|
(effects (font (size 1.27 1.27)))
|
||||||
)
|
)
|
||||||
(property "Footprint" "my_additions:Fuse_1808_0451_Holder_HandSolder" (at 149.86 32.385 0)
|
(property "Footprint" "my_additions:Fuse_1808_0451_Holder_HandSolder" (at 149.86 32.385 0)
|
||||||
|
Reference in New Issue
Block a user