|
|
@ -100,7 +100,7 @@ int main(void) |
|
|
|
MX_IWDG_Init(); |
|
|
|
MX_IWDG_Init(); |
|
|
|
MX_USART1_UART_Init(); |
|
|
|
MX_USART1_UART_Init(); |
|
|
|
MX_ADC1_Init(); |
|
|
|
MX_ADC1_Init(); |
|
|
|
MX_DMA_Init(); |
|
|
|
// MX_DMA_Init();
|
|
|
|
MX_TIM4_Init(); |
|
|
|
MX_TIM4_Init(); |
|
|
|
MX_TIM2_Init(); |
|
|
|
MX_TIM2_Init(); |
|
|
|
MX_TIM3_Init(); |
|
|
|
MX_TIM3_Init(); |
|
|
@ -110,6 +110,7 @@ int main(void) |
|
|
|
// this ensures SysTick runs at 1000Hz - used for LL delays
|
|
|
|
// this ensures SysTick runs at 1000Hz - used for LL delays
|
|
|
|
LL_Init1msTick(SystemCoreClock); |
|
|
|
LL_Init1msTick(SystemCoreClock); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("Start.\r\n"); |
|
|
|
/* USER CODE END 2 */ |
|
|
|
/* USER CODE END 2 */ |
|
|
|
|
|
|
|
|
|
|
|
/* Init scheduler */ |
|
|
|
/* Init scheduler */ |
|
|
@ -117,6 +118,7 @@ int main(void) |
|
|
|
MX_FREERTOS_Init(); |
|
|
|
MX_FREERTOS_Init(); |
|
|
|
|
|
|
|
|
|
|
|
/* Start scheduler */ |
|
|
|
/* Start scheduler */ |
|
|
|
|
|
|
|
printf("a\r\n"); |
|
|
|
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 */ |
|
|
@ -218,6 +220,7 @@ void Error_Handler(void) |
|
|
|
/* USER CODE BEGIN Error_Handler_Debug */ |
|
|
|
/* USER CODE BEGIN Error_Handler_Debug */ |
|
|
|
/* User can add his own implementation to report the HAL error return state */ |
|
|
|
/* User can add his own implementation to report the HAL error return state */ |
|
|
|
__disable_irq(); |
|
|
|
__disable_irq(); |
|
|
|
|
|
|
|
printf("Error_Handler\r\n"); |
|
|
|
while (1) |
|
|
|
while (1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
@ -234,6 +237,7 @@ void Error_Handler(void) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void assert_failed(uint8_t *file, uint32_t line) |
|
|
|
void assert_failed(uint8_t *file, uint32_t line) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
printf("assert_failed\r\n"); |
|
|
|
/* USER CODE BEGIN 6 */ |
|
|
|
/* USER CODE BEGIN 6 */ |
|
|
|
/* User can add his own implementation to report the file name and line number,
|
|
|
|
/* User can add his own implementation to report the file name and line number,
|
|
|
|
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ |
|
|
|
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ |
|
|
|