Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qitas committed Oct 29, 2021
1 parent 31f4445 commit c2f45aa
Show file tree
Hide file tree
Showing 8 changed files with 831 additions and 80 deletions.
4 changes: 2 additions & 2 deletions project/IAP/Core/Inc/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C" {
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

extern IWDG_HandleTypeDef hiwdg;
//extern IWDG_HandleTypeDef hiwdg;
//extern UART_HandleTypeDef huart1;
/* USER CODE END Includes */

Expand Down Expand Up @@ -77,7 +77,7 @@ void Error_Handler(void);
#define LED1_Pin LL_GPIO_PIN_4
#define LED1_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */
//extern RTC_HandleTypeDef hrtc;
extern IWDG_HandleTypeDef hiwdg;
#define feed_dog() HAL_IWDG_Refresh(&hiwdg) //LL_IWDG_ReloadCounter(IWDG) //LL_mDelay(0) //
/* USER CODE END Private defines */

Expand Down
17 changes: 3 additions & 14 deletions project/IAP/Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,21 @@
IWDG_HandleTypeDef hiwdg;

/* USER CODE BEGIN PV */
uint32_t roundcnt = 0;
uint32_t Tempruate;
uint16_t VrefData,VolDta;
volatile uint32_t tmp_index = 0;

/* USER CODE END PV */

/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_IWDG_Init(void);
static void MX_USART1_UART_Init(void);
static void MX_RTC_Init(void);
static void MX_IWDG_Init(void);
/* USER CODE BEGIN PFP */

/* USER CODE END PFP */

/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */

// void HAL_SYSTICK_Callback(void)
// {
// #ifdef BLT
// #endif
// tmp_index++;
// }

//#define BUFFER_SIZE 14
// 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 91 CB
// width=16 poly=0x8005 init=0xffff refin=true refout=true xorout=0x0000 check=0x4b37 residue=0x0000 name="CRC-16/MODBUS"
Expand Down Expand Up @@ -116,9 +105,9 @@ int main(void)

/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_IWDG_Init();
MX_USART1_UART_Init();
MX_RTC_Init();
MX_IWDG_Init();
/* USER CODE BEGIN 2 */
uart_init();
char buf[50];
Expand Down
2 changes: 1 addition & 1 deletion project/IAP/IAP.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=MDK-ARM V5.32
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-LL-true,2-SystemClock_Config-RCC-false-LL-false,3-MX_IWDG_Init-IWDG-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-LL-true,5-MX_RTC_Init-RTC-false-LL-true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-LL-true,2-SystemClock_Config-RCC-false-LL-false,3-MX_USART1_UART_Init-USART1-false-LL-true,4-MX_RTC_Init-RTC-false-LL-true,5-MX_IWDG_Init-IWDG-false-HAL-true
RCC.ADCFreq_Value=64000000
RCC.AHBFreq_Value=64000000
RCC.APBFreq_Value=64000000
Expand Down
Loading

0 comments on commit c2f45aa

Please sign in to comment.