Still no ADC (Timer 6 worked in Interrupt mode)
This commit is contained in:
		
							
								
								
									
										53
									
								
								Software/Core/Inc/adc.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								Software/Core/Inc/adc.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,53 @@
 | 
			
		||||
/* USER CODE BEGIN Header */
 | 
			
		||||
/**
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @file    adc.h
 | 
			
		||||
  * @brief   This file contains all the function prototypes for
 | 
			
		||||
  *          the adc.c file
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @attention
 | 
			
		||||
  *
 | 
			
		||||
  * Copyright (c) 2025 STMicroelectronics.
 | 
			
		||||
  * All rights reserved.
 | 
			
		||||
  *
 | 
			
		||||
  * This software is licensed under terms that can be found in the LICENSE file
 | 
			
		||||
  * in the root directory of this software component.
 | 
			
		||||
  * If no LICENSE file comes with this software, it is provided AS-IS.
 | 
			
		||||
  *
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  */
 | 
			
		||||
/* USER CODE END Header */
 | 
			
		||||
/* Define to prevent recursive inclusion -------------------------------------*/
 | 
			
		||||
#ifndef __ADC_H__
 | 
			
		||||
#define __ADC_H__
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Includes ------------------------------------------------------------------*/
 | 
			
		||||
#include "main.h"
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Includes */
 | 
			
		||||
 | 
			
		||||
extern ADC_HandleTypeDef hadc1;
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Private defines */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Private defines */
 | 
			
		||||
 | 
			
		||||
void MX_ADC1_Init(void);
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Prototypes */
 | 
			
		||||
void ADC_DMA_Callback(DMA_HandleTypeDef *hdma);
 | 
			
		||||
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc);
 | 
			
		||||
/* USER CODE END Prototypes */
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* __ADC_H__ */
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										52
									
								
								Software/Core/Inc/dma.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								Software/Core/Inc/dma.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,52 @@
 | 
			
		||||
/* USER CODE BEGIN Header */
 | 
			
		||||
/**
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @file    dma.h
 | 
			
		||||
  * @brief   This file contains all the function prototypes for
 | 
			
		||||
  *          the dma.c file
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @attention
 | 
			
		||||
  *
 | 
			
		||||
  * Copyright (c) 2025 STMicroelectronics.
 | 
			
		||||
  * All rights reserved.
 | 
			
		||||
  *
 | 
			
		||||
  * This software is licensed under terms that can be found in the LICENSE file
 | 
			
		||||
  * in the root directory of this software component.
 | 
			
		||||
  * If no LICENSE file comes with this software, it is provided AS-IS.
 | 
			
		||||
  *
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  */
 | 
			
		||||
/* USER CODE END Header */
 | 
			
		||||
/* Define to prevent recursive inclusion -------------------------------------*/
 | 
			
		||||
#ifndef __DMA_H__
 | 
			
		||||
#define __DMA_H__
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Includes ------------------------------------------------------------------*/
 | 
			
		||||
#include "main.h"
 | 
			
		||||
 | 
			
		||||
/* DMA memory to memory transfer handles -------------------------------------*/
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Private defines */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Private defines */
 | 
			
		||||
 | 
			
		||||
void MX_DMA_Init(void);
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Prototypes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Prototypes */
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* __DMA_H__ */
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										55
									
								
								Software/Core/Inc/fdcan.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								Software/Core/Inc/fdcan.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,55 @@
 | 
			
		||||
/* USER CODE BEGIN Header */
 | 
			
		||||
/**
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @file    fdcan.h
 | 
			
		||||
  * @brief   This file contains all the function prototypes for
 | 
			
		||||
  *          the fdcan.c file
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @attention
 | 
			
		||||
  *
 | 
			
		||||
  * Copyright (c) 2025 STMicroelectronics.
 | 
			
		||||
  * All rights reserved.
 | 
			
		||||
  *
 | 
			
		||||
  * This software is licensed under terms that can be found in the LICENSE file
 | 
			
		||||
  * in the root directory of this software component.
 | 
			
		||||
  * If no LICENSE file comes with this software, it is provided AS-IS.
 | 
			
		||||
  *
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  */
 | 
			
		||||
/* USER CODE END Header */
 | 
			
		||||
/* Define to prevent recursive inclusion -------------------------------------*/
 | 
			
		||||
#ifndef __FDCAN_H__
 | 
			
		||||
#define __FDCAN_H__
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Includes ------------------------------------------------------------------*/
 | 
			
		||||
#include "main.h"
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Includes */
 | 
			
		||||
 | 
			
		||||
extern FDCAN_HandleTypeDef hfdcan1;
 | 
			
		||||
 | 
			
		||||
extern FDCAN_HandleTypeDef hfdcan2;
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Private defines */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Private defines */
 | 
			
		||||
 | 
			
		||||
void MX_FDCAN1_Init(void);
 | 
			
		||||
void MX_FDCAN2_Init(void);
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Prototypes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Prototypes */
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* __FDCAN_H__ */
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										49
									
								
								Software/Core/Inc/gpio.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								Software/Core/Inc/gpio.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,49 @@
 | 
			
		||||
/* USER CODE BEGIN Header */
 | 
			
		||||
/**
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @file    gpio.h
 | 
			
		||||
  * @brief   This file contains all the function prototypes for
 | 
			
		||||
  *          the gpio.c file
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @attention
 | 
			
		||||
  *
 | 
			
		||||
  * Copyright (c) 2025 STMicroelectronics.
 | 
			
		||||
  * All rights reserved.
 | 
			
		||||
  *
 | 
			
		||||
  * This software is licensed under terms that can be found in the LICENSE file
 | 
			
		||||
  * in the root directory of this software component.
 | 
			
		||||
  * If no LICENSE file comes with this software, it is provided AS-IS.
 | 
			
		||||
  *
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  */
 | 
			
		||||
/* USER CODE END Header */
 | 
			
		||||
/* Define to prevent recursive inclusion -------------------------------------*/
 | 
			
		||||
#ifndef __GPIO_H__
 | 
			
		||||
#define __GPIO_H__
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Includes ------------------------------------------------------------------*/
 | 
			
		||||
#include "main.h"
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Private defines */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Private defines */
 | 
			
		||||
 | 
			
		||||
void MX_GPIO_Init(void);
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Prototypes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Prototypes */
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
#endif /*__ GPIO_H__ */
 | 
			
		||||
 | 
			
		||||
@ -49,8 +49,6 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
/* USER CODE END EM */
 | 
			
		||||
 | 
			
		||||
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
 | 
			
		||||
 | 
			
		||||
/* Exported functions prototypes ---------------------------------------------*/
 | 
			
		||||
void Error_Handler(void);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										48
									
								
								Software/Core/Inc/memorymap.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								Software/Core/Inc/memorymap.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,48 @@
 | 
			
		||||
/* USER CODE BEGIN Header */
 | 
			
		||||
/**
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @file    memorymap.h
 | 
			
		||||
  * @brief   This file contains all the function prototypes for
 | 
			
		||||
  *          the memorymap.c file
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @attention
 | 
			
		||||
  *
 | 
			
		||||
  * Copyright (c) 2025 STMicroelectronics.
 | 
			
		||||
  * All rights reserved.
 | 
			
		||||
  *
 | 
			
		||||
  * This software is licensed under terms that can be found in the LICENSE file
 | 
			
		||||
  * in the root directory of this software component.
 | 
			
		||||
  * If no LICENSE file comes with this software, it is provided AS-IS.
 | 
			
		||||
  *
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  */
 | 
			
		||||
/* USER CODE END Header */
 | 
			
		||||
/* Define to prevent recursive inclusion -------------------------------------*/
 | 
			
		||||
#ifndef __MEMORYMAP_H__
 | 
			
		||||
#define __MEMORYMAP_H__
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Includes ------------------------------------------------------------------*/
 | 
			
		||||
#include "main.h"
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Private defines */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Private defines */
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Prototypes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Prototypes */
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* __MEMORYMAP_H__ */
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										66
									
								
								Software/Core/Inc/tim.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								Software/Core/Inc/tim.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,66 @@
 | 
			
		||||
/* USER CODE BEGIN Header */
 | 
			
		||||
/**
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @file    tim.h
 | 
			
		||||
  * @brief   This file contains all the function prototypes for
 | 
			
		||||
  *          the tim.c file
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  * @attention
 | 
			
		||||
  *
 | 
			
		||||
  * Copyright (c) 2025 STMicroelectronics.
 | 
			
		||||
  * All rights reserved.
 | 
			
		||||
  *
 | 
			
		||||
  * This software is licensed under terms that can be found in the LICENSE file
 | 
			
		||||
  * in the root directory of this software component.
 | 
			
		||||
  * If no LICENSE file comes with this software, it is provided AS-IS.
 | 
			
		||||
  *
 | 
			
		||||
  ******************************************************************************
 | 
			
		||||
  */
 | 
			
		||||
/* USER CODE END Header */
 | 
			
		||||
/* Define to prevent recursive inclusion -------------------------------------*/
 | 
			
		||||
#ifndef __TIM_H__
 | 
			
		||||
#define __TIM_H__
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Includes ------------------------------------------------------------------*/
 | 
			
		||||
#include "main.h"
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Includes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Includes */
 | 
			
		||||
 | 
			
		||||
extern TIM_HandleTypeDef htim1;
 | 
			
		||||
 | 
			
		||||
extern TIM_HandleTypeDef htim3;
 | 
			
		||||
 | 
			
		||||
extern TIM_HandleTypeDef htim4;
 | 
			
		||||
 | 
			
		||||
extern TIM_HandleTypeDef htim6;
 | 
			
		||||
 | 
			
		||||
extern TIM_HandleTypeDef htim8;
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Private defines */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Private defines */
 | 
			
		||||
 | 
			
		||||
void MX_TIM1_Init(void);
 | 
			
		||||
void MX_TIM3_Init(void);
 | 
			
		||||
void MX_TIM4_Init(void);
 | 
			
		||||
void MX_TIM6_Init(void);
 | 
			
		||||
void MX_TIM8_Init(void);
 | 
			
		||||
 | 
			
		||||
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
 | 
			
		||||
 | 
			
		||||
/* USER CODE BEGIN Prototypes */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END Prototypes */
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* __TIM_H__ */
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user