CMSIS-DAP  Version - Preview
CMSIS Interface to CoreSight Debug Access Port
 All Files Functions Defines
DAP_config.h
Go to the documentation of this file.
00001 /**************************************************************************/
00023 #ifndef __DAP_CONFIG_H__
00024 #define __DAP_CONFIG_H__
00025 
00026 
00027 //#include "device.h"                   // DAP Hardware Device Header File
00028 
00029 
00031 #define DAP_VENDOR              "ARM"
00032 #define DAP_PRODUCT             "CMSIS-DAP"
00033 #define DAP_SER_NUM             "00000000"
00034 #define DAP_FW_VER              "0.0"
00035 
00036 #define DAP_PACKET_SIZE         1024    // Maximum Request/Response packet size  
00037 #define DAP_PACKET_COUNT        4       // Maximum number of buffered packets 
00038 
00039 #define DAP_JTAG_DEV_CNT        8       // Maximum number of JTAG devices
00040 
00041 
00042 
00047 static __inline void PORT_JTAG_SETUP (void) {
00048   ;
00049 }
00050 
00051 
00057 static __inline void PORT_SWD_SETUP (void) {
00058   ;
00059 }
00060 
00064 static __inline void PORT_SWJ_OFF (void) {
00065 
00066 }
00067 
00068 
00080 static __forceinline uint32_t PIN_SWCLK_TCK_IN  (void) { return (0); }
00081 static __forceinline void     PIN_SWCLK_TCK_SET (void) {}
00082 static __forceinline void     PIN_SWCLK_TCK_CLR (void) {}
00083 
00085 static __forceinline uint32_t PIN_SWDIO_TMS_IN  (void) { return (0); }
00086 static __forceinline uint32_t PIN_SWDIO_IN      (void) { return (0); }
00087 static __forceinline void     PIN_SWDIO_OUT     (uint32_t bit) {}
00088 static __forceinline void     PIN_SWDIO_TMS_SET (void) {}
00089 static __forceinline void     PIN_SWDIO_TMS_CLR (void) {}
00090 
00092 static __forceinline void     PIN_SWDIO_OUT_ENABLE  (void) {}
00093 static __forceinline void     PIN_SWDIO_OUT_DISABLE (void) {}
00094 
00096 static __forceinline uint32_t PIN_TDI_IN  (void) { return (0); }
00097 static __forceinline void     PIN_TDI_OUT (uint32_t bit) {}
00098 static __forceinline void     PIN_TDI_SET (void) {}
00099 static __forceinline void     PIN_TDI_CLR (void) {}
00100 
00102 static __forceinline uint32_t PIN_TDO_IN  (void) { return (0); }
00103 
00105 static __forceinline uint32_t PIN_nTRST_IN   (void) { return (0); }
00106 static __forceinline void     PIN_nTRST_OUT  (uint32_t bit) {}
00107 
00109 static __forceinline uint32_t PIN_nRESET_IN  (void) { return (0); }
00110 static __forceinline void     PIN_nRESET_OUT (uint32_t bit) {}
00111 
00112 
00113 
00114 
00115 // Debug Unit LEDs
00116 
00117 // Debug Unit: Connected LED
00118 static __inline void LED_CONNECTED_OUT (uint32_t bit) {}
00119 
00120 // Debug Unit: Target Running LED
00121 static __inline void LED_RUNNING_OUT (uint32_t bit) {}
00122 
00123 
00124 // Parameters for JTAG/SWD Speed
00125 
00126 #define CPU_CLOCK               100000000
00127 
00128 #define IO_PORT_WRITE_CYCLES    2       // Number of cycles for I/O Port Write
00129 #define IO_PORT_READ_CYCLES     2       // Number of cycles for I/O Port Read
00130 
00131 // Configurable delay for clock generation
00132 #define DELAY_SLOW_CYCLES       3       // Number of cycles for one iteration
00133 static __forceinline void PIN_DELAY_SLOW (uint32_t delay) {
00134   volatile int32_t count;
00135 
00136   count = delay;
00137   while (--count);
00138 }
00139 
00140 // Fixed delay for fast clock generation
00141 #define DELAY_FAST_CYCLES       0       // Number of cycles
00142 static __forceinline void PIN_DELAY_FAST (void) {
00143 //__nop();
00144 }
00145 
00146 
00147 // Timer Functions
00148 
00149 // Start Timer
00150 static __inline void TIMER_START (uint32_t usec) {}
00151 
00152 // Stop Timer
00153 static __inline void TIMER_STOP (void) {}
00154 
00155 // Check if Timer expired
00156 static __inline uint32_t TIMER_EXPIRED (void) { return (0); }
00157 
00158 
00159 // Debug Unit: Device specific setup (called when application starts)
00160 static __inline void DAP_SETUP (void) {}
00161 
00162 
00163 #endif /* __DAP_CONFIG_H__ */