2020-11-27 10:32:29 +00:00
|
|
|
|
|
|
|
#ifndef CORE_SYSTEMVIEW_H
|
|
|
|
#define CORE_SYSTEMVIEW_H
|
|
|
|
|
|
|
|
#ifdef SYSTEM_VIEW
|
|
|
|
|
2020-12-07 03:45:29 +00:00
|
|
|
#include <stdint.h>
|
2020-11-27 13:25:24 +00:00
|
|
|
#include "SEGGER_SYSVIEW.h"
|
|
|
|
|
2020-12-07 03:45:29 +00:00
|
|
|
#define DWT_CYCCNT_ADDR ((uint32_t*)(0xE0001004));
|
|
|
|
#define SVC_GET_DWT_CYCCNT 3
|
|
|
|
|
|
|
|
extern volatile uint32_t cyccnt_cycles;
|
|
|
|
|
2020-11-27 10:32:29 +00:00
|
|
|
void enable_systemview();
|
2020-12-07 03:45:29 +00:00
|
|
|
uint32_t svc_get_dwt_cyccnt();
|
2020-11-27 10:32:29 +00:00
|
|
|
|
2020-11-27 13:25:24 +00:00
|
|
|
#else
|
2020-12-07 03:45:29 +00:00
|
|
|
#define SEGGER_SYSVIEW_RecordEnterISR()
|
|
|
|
#define SEGGER_SYSVIEW_RecordExitISR()
|
2020-11-27 10:32:29 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif //CORE_SYSTEMVIEW_H
|