Basic_Frame_TypeC_2023_Omni
Loading...
Searching...
No Matches
dwt.h
1/*******************************************************************************
2* @file : dwt.h
3* @brief : DWT (Data Watchpoint and Trace) high-resolution timer set
4* @created time : Aug, 2023
5* @author : Haoran
6******************************************************************************
7* Copyright (c) 2023 UARM Artemis.
8* All rights reserved.
9*******************************************************************************/
10
11#ifndef __DWT_H__
12#define __DWT_H__
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#include "stm32f407xx.h"
19#include "cmsis_os.h"
20#include "stm32f4xx_hal.h"
21
22
23#define SYSTEM_CORE_FREQ 168 //MHz
24
25/* define main struct of dwt */
26typedef struct
27{
28 uint32_t us;
29} DWTTime_t;
30
31/* declare dwt functions */
32void dwt_init(void);
33uint32_t dwt_getCnt_us(void);
34void dwt_sleep(uint32_t ms);
35
36#ifdef __cplusplus
37}
38#endif
39
40#endif
Definition dwt.h:27