CVS: jtag/hardware_access HIL.c,1.11,1.12
Chris Liechti <[email protected]> Wed, 15 Nov 2006 12:28:53 -0800
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/jtag/hardware_access
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26811/jtag/hardware_access
Modified Files:
HIL.c
Log Message:
- F20xx support (spy-bi-wire capable devices, use 4 wire JTAG mode)
- separate segment A lock handling (F2xx) so that the flash funclet + data fits again in 128 bytes
- debug messages and internal cleanups
- more updates for MSP430X arch
Index: HIL.c
===================================================================
RCS file: /cvsroot/mspgcc/jtag/hardware_access/HIL.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -d -r1.11 -r1.12
--- HIL.c 15 Nov 2006 12:37:13 -0000 1.11
+++ HIL.c 15 Nov 2006 20:28:50 -0000 1.12
@@ -102,7 +102,6 @@
// (Local) Function prototypes. -----------------------------------------------
-static BYTE ReadTDI(void);
static BYTE ReadTDO(void);
static void PrepTCLK(void);
@@ -355,7 +354,8 @@
#else
out_byte(port_base + CTRLOFF, portCtrl);
#endif
- HIL_TST(1); // Select Jtag pin functions on '11x devices.
+ HIL_TST(1); // Select JTAG pin functions on F11x and F2xx devices.
+
return (STATUS_OK);
}
@@ -680,7 +680,7 @@
}
#endif
- HIL_DelayMSec(10); // Delay 10mSec to give the device time to power-up.
+ HIL_DelayMSec(40); // Delay to give the device time to power-up.
return (STATUS_OK);
}
@@ -693,6 +693,16 @@
Parameters:
state: The device TST pin is set to state (0/1).
+ Special values: if one of the bits in the mask 0xff00 is set, then
+ is the extra delay disabled, allowinf for very quick changes on the
+ TST pin (default is to make a delay in the millisecond range)
+
+ Examples:
+ HIL_TST(1) -> test on vcc, 10 ms delay before and after pin change
+ HIL_TST(0) -> test on gnd, 10 ms delay before and after pin change
+
+ HIL_TST(0xff01) -> test on vcc, as fast as possible
+ HIL_TST(0xff00) -> test on gnd, as fast as possible
Returns:
@@ -701,8 +711,8 @@
*/
void WINAPI HIL_TST(LONG state)
{
- HIL_DelayMSec(10); //for slow hardware
- if (state)
+ if ((state & 0xff00) == 0) HIL_DelayMSec(10); //for slow hardware
+ if (state & 1)
portCtrl |= TST;
else
portCtrl &= ~TST;
@@ -711,7 +721,7 @@
#else
out_byte(port_base + CTRLOFF, portCtrl);
#endif
- HIL_DelayMSec(10); //for slow hardware
+ if ((state & 0xff00) == 0) HIL_DelayMSec(10); //for slow hardware
}
/* ----------------------------------------------------------------------------
@@ -978,9 +988,10 @@
#endif
slowdown();
/* Delay to allow for voltage supervisor/reset delay (if present). */
- if (state)
+ if (state) {
HIL_DelayMSec(DEFAULT_RSTDELAY);
}
+}
/* ----------------------------------------------------------------------------
Function:
@@ -1120,19 +1131,6 @@
// HIL local support functions. -----------------------------------------------
/* Parallel port status register functions. */
-static BYTE ReadTDI(void)
-{
- BYTE ret;
-
-#if defined(HIL_PPDEV)
- ioctl(fd, PPRSTATUS, &ret);
-#else
- ret = in_byte(port_base + STATOFF);
-#endif
- return ret & TDI;
-}
-
-/* Parallel port status register functions. */
static BYTE ReadTDO(void)
{
BYTE ret;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV