CVS: jtag/hardware_access HIL.c,1.7,1.8 HIL.def,1.2,1.3 HIL.h,1.5,1.6

Steve Underwood <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/jtag/hardware_access
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7328/jtag/hardware_access

Modified Files:
	HIL.c HIL.def HIL.h 
Log Message:
Additions to the HIL interface to match what the latest TI DLL code expects


Index: HIL.c
===================================================================
RCS file: /cvsroot/mspgcc/jtag/hardware_access/HIL.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- HIL.c	6 Jun 2005 12:44:13 -0000	1.7
+++ HIL.c	6 Apr 2006 14:20:30 -0000	1.8
@@ -95,6 +95,8 @@
 static LARGE_INTEGER freq;
 #endif
 
+static unsigned int protocol = JTAG;
+
 // (Local) Function prototypes. -----------------------------------------------
 
 static BYTE ReadTDI(void);
@@ -1104,11 +1106,6 @@
     return ret & TDO;
 }
 
-LONG WINAPI HIL_ReadTDO(void) {
-    return ReadTDO() != 0;      //return a boolean
-}
-
-
 //----------------------------------------------------------------------------
 /* This function sets the target JTAG state machine (JTAG FSM) back into the 
    Run-Test/Idle state after a shift access.
@@ -1122,3 +1119,84 @@
     ClkTCK();
     // JTAG FSM = Run-Test/Idle
 }
+
+void WINAPI HIL_CheckJtagFuse(void)
+{
+    /* Slow fuse check */
+    HIL_TDI(1);  // be sure that all JTAG inputs are high
+    HIL_TMS(1);
+    HIL_TCK(1);
+    /* check fuse */
+    HIL_TMS(0);
+    HIL_DelayMSec(1);
+    HIL_TMS(1);
+    HIL_TMS(0);
+    HIL_DelayMSec(1);
+    HIL_TMS(1);
+}
+
+void WINAPI HIL_ResetJtagTap(void)
+{
+    // Reset Jtag state machine.
+    HIL_TMS(1);  // be sure that TMS is high on entry
+    HIL_TCK(POS_EDGE);
+    HIL_TCK(POS_EDGE);
+    HIL_TCK(POS_EDGE);
+    HIL_TCK(POS_EDGE);
+    HIL_TCK(POS_EDGE);
+    HIL_TCK(POS_EDGE); // Jtag state machine: Test Logic Reset.
+    HIL_TCK(0);
+    HIL_TMS(0);
+    HIL_TCK(1); // Jtag state machine: Run Test Idle.
+}
+
+/* ----------------------------------------------------------------------------
+Function:
+ STATUS_T WINAPI HIL_Trace(BOOL OnOff, char *str);
+
+Description:
+ Switches Debug Trace on/off when compiled for DEBUG_TRACE.
+
+Parameters:
+
+Returns:
+
+Notes:
+*/
+STATUS_T WINAPI HIL_Trace(BOOL OnOff, char *str)
+{
+	return STATUS_ERROR;
+}
+
+/* ----------------------------------------------------------------------------
+Function:
+ STATUS_T WINAPI HIL_SetProtocol(int protocol_id);
+
+Description:
+ Sets the Protocol type (actual: JTAG, SPYBYWIRE)
+
+Parameters:
+ protocol_id:  Protocol type (Default: JTAG)
+
+Returns:
+ STATUS_OK:    The interface was initialized.
+ STATUS_ERROR: The interface was not initialized.
+
+Notes:
+*/
+STATUS_T WINAPI HIL_SetProtocol(int protocol_id)
+{
+    if (protocol_id == SPYBIWIREJTAG)
+        return STATUS_ERROR;
+    protocol = protocol_id;
+
+    return STATUS_OK;
+}
+
+WINAPI void HIL_sbw_ExecuteFuseBlow(void)
+{
+}
+
+WINAPI void HIL_sbw_StepPSA(LONG Length)
+{
+}

Index: HIL.def
===================================================================
RCS file: /cvsroot/mspgcc/jtag/hardware_access/HIL.def,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- HIL.def	12 Jul 2004 19:57:44 -0000	1.2
+++ HIL.def	6 Apr 2006 14:20:30 -0000	1.3
@@ -2,6 +2,8 @@
 EXPORTS
 DllMain@12
 DllMain=DllMain@12
+HIL_CheckJtagFuse@0
+HIL_CheckJtagFuse=HIL_CheckJtagFuse@0
 HIL_Close@4
 HIL_Close=HIL_Close@4
 HIL_Connect@0
@@ -22,6 +24,10 @@
 HIL_ReadTimer=HIL_ReadTimer@0
 HIL_Release@0
 HIL_Release=HIL_Release@0
+HIL_ResetJtagTap@0
+HIL_ResetJtagTap=HIL_ResetJtagTap@0
+HIL_SetProtocol@4
+HIL_SetProtocol=HIL_SetProtocol@4
 HIL_StartTimer@0
 HIL_StartTimer=HIL_StartTimer@0
 HIL_StopTimer@0
@@ -38,9 +44,13 @@
 HIL_TMS=HIL_TMS@4
 HIL_TST@4
 HIL_TST=HIL_TST@4
+HIL_Trace@8
+HIL_Trace=HIL_Trace@8
 HIL_VCC@4
 HIL_VCC=HIL_VCC@4
 HIL_VPP@4
 HIL_VPP=HIL_VPP@4
-HIL_ReadTDO@0
-HIL_ReadTDO=HIL_ReadTDO@0
+HIL_sbw_ExecuteFuseBlow@0
+HIL_sbw_ExecuteFuseBlow=HIL_sbw_ExecuteFuseBlow@0
+HIL_sbw_StepPSA@4
+HIL_sbw_StepPSA=HIL_sbw_StepPSA@4

Index: HIL.h
===================================================================
RCS file: /cvsroot/mspgcc/jtag/hardware_access/HIL.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- HIL.h	6 Jun 2005 12:44:13 -0000	1.5
+++ HIL.h	6 Apr 2006 14:20:30 -0000	1.6
@@ -18,6 +18,13 @@
 
 enum
 {
+    JTAG = 0,
+    SPYBIWIRE,
+    SPYBIWIREJTAG
+};
+
+enum
+{
     POS_EDGE = 2,
     NEG_EDGE,
 };
@@ -52,6 +59,13 @@
 void WINAPI HIL_StopTimer(void);
 LONG WINAPI HIL_ReadTDO(void);
 
+void WINAPI HIL_CheckJtagFuse(void);
+void WINAPI HIL_ResetJtagTap(void);
+STATUS_T WINAPI HIL_Trace(BOOL OnOff, char *str);
+STATUS_T WINAPI HIL_SetProtocol(int protocol_id);
+WINAPI void HIL_sbw_StepPSA(LONG Length);
+WINAPI void HIL_sbw_ExecuteFuseBlow(void);
+
 #define SetTMS()        HIL_TMS(1)
 #define ClrTMS()        HIL_TMS(0)
 #define SetTCK()        HIL_TCK(1)



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.