mirror of
https://gitea.ecohim.ru:3000/RS485_Relay/RS485_Relay2_fw.git
synced 2025-08-06 16:07:17 +03:00
v11.2 changes:
- moved 400ms boot delay to a point AFTER peripherals init - fixed TIM3 and TIM14 periods - mvoed light updates to separate function and fixed cuty cylce clamp during dimming process
This commit is contained in:
@@ -78,6 +78,7 @@ static void MX_TIM14_Init(void);
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
|
||||
/* USER CODE END 1 */
|
||||
@@ -95,7 +96,7 @@ int main(void)
|
||||
SystemClock_Config();
|
||||
|
||||
/* USER CODE BEGIN SysInit */
|
||||
HAL_Delay(400);
|
||||
// HAL_Delay(400);
|
||||
/* USER CODE END SysInit */
|
||||
|
||||
/* Initialize all configured peripherals */
|
||||
@@ -106,6 +107,7 @@ int main(void)
|
||||
MX_TIM1_Init();
|
||||
MX_TIM14_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
HAL_Delay(400);
|
||||
board_init();
|
||||
|
||||
/* USER CODE END 2 */
|
||||
@@ -234,7 +236,7 @@ static void MX_TIM3_Init(void)
|
||||
htim3.Instance = TIM3;
|
||||
htim3.Init.Prescaler = 240-1;
|
||||
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
htim3.Init.Period = 255;
|
||||
htim3.Init.Period = 255-1;
|
||||
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||
if (HAL_TIM_PWM_Init(&htim3) != HAL_OK)
|
||||
@@ -286,7 +288,7 @@ static void MX_TIM14_Init(void)
|
||||
htim14.Instance = TIM14;
|
||||
htim14.Init.Prescaler = 6-1;
|
||||
htim14.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
htim14.Init.Period = 255;
|
||||
htim14.Init.Period = 255-1;
|
||||
htim14.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||
htim14.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||
if (HAL_TIM_Base_Init(&htim14) != HAL_OK)
|
||||
|
Reference in New Issue
Block a user