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
15
extern
"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 */
26
typedef
struct
27
{
28
uint32_t us;
29
}
DWTTime_t
;
30
31
/* declare dwt functions */
32
void
dwt_init(
void
);
33
uint32_t dwt_getCnt_us(
void
);
34
void
dwt_sleep(uint32_t ms);
35
36
#ifdef __cplusplus
37
}
38
#endif
39
40
#endif
DWTTime_t
Definition
dwt.h:27
Core
Src
Firmware
dwt.h
Generated by
1.14.0