added slow lptim to BSP_POWER

This commit is contained in:
2024-02-24 21:06:27 +01:00
parent a484f2247e
commit fef8a8fb32
7 changed files with 34 additions and 4 deletions

View File

@@ -34,6 +34,7 @@
#include "tim.h"
#include "BSP_EE24.h"
#include "BSP_INA.h"
#include "BSP_POWER.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@@ -181,6 +182,8 @@ void StartDefaultTask(void *argument)
BSP_INA_Init();
BSP_POWER_Init();
char INA_LOG[72];
/* Infinite loop */

View File

@@ -39,7 +39,7 @@ void MX_LPTIM4_Init(void)
/* USER CODE END LPTIM4_Init 1 */
hlptim4.Instance = LPTIM4;
hlptim4.Init.Clock.Source = LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC;
hlptim4.Init.Clock.Prescaler = LPTIM_PRESCALER_DIV2;
hlptim4.Init.Clock.Prescaler = LPTIM_PRESCALER_DIV64;
hlptim4.Init.Trigger.Source = LPTIM_TRIGSOURCE_SOFTWARE;
hlptim4.Init.OutputPolarity = LPTIM_OUTPUTPOLARITY_HIGH;
hlptim4.Init.UpdateMode = LPTIM_UPDATE_IMMEDIATE;