![]() |
![]() |
Low Level function prototypes, macros, and pin-to-signal assignments regarding to user's hardware.
Definition in file LowLevelFunc430Xv2.h.
Go to the source code of this file.
Macros | |
#define | SPYBIWIREJTAG_IF 1 |
JTAG interface on a device that supports JTAG and SBW. More... | |
#define | SPYBIWIRE_IF 2 |
Spy-Bi-Wire interface. More... | |
#define | SPYBIWIRE_MODE |
#define | RSTLOW_SBW 0 |
#define | RSTLOW_JTAG 1 |
#define | RSTHIGH_SBW 2 |
#define | RSTHIGH_JTAG 3 |
#define | __DATAFORMATS__ |
#define | F_BYTE 8 |
#define | F_WORD 16 |
#define | F_ADDR 20 |
#define | F_LONG 32 |
#define | STATUS_ERROR 0 |
return 0 = error More... | |
#define | STATUS_OK 1 |
return 1 = no error More... | |
#define | STATUS_FUSEBLOWN 2 |
GetDevice returns this if the security fuse is blown. More... | |
#define | STATUS_ACTIVE 2 |
Replicator is active. More... | |
#define | STATUS_IDLE 3 |
Replicator is idling. More... | |
#define | TRSLDIR P2OUT |
#define | TRSL_CDIR P2DIR |
#define | BRX_DIR 0x01 |
BSL RX Translator direction 0 - output from REP430F, 1 - input to REP430F. More... | |
#define | BTX_DIR 0x02 |
BSL TX Translator direction 0 - output from REP430F, 1 - input to REP430F. More... | |
#define | TEST_DIR 0x04 |
TEST Translator direction 0 - output from REP430F, 1 - input to REP430F. More... | |
#define | RST_DIR 0x08 |
RESET Translator direction 0 - output from REP430F, 1 - input to REP430F. More... | |
#define | TCK_DIR 0x10 |
TCK Translator direction 0 - output from REP430F, 1 - input to REP430F. More... | |
#define | TMS_DIR 0x20 |
TMS Translator direction 0 - output from REP430F, 1 - input to REP430F. More... | |
#define | TDOI_DIR 0x40 |
TDO/TDI Translator direction 0 - output from REP430F, 1 - input to REP430F. More... | |
#define | TDI_DIR 0x80 |
TDI Translator direction 0 - output from REP430F, 1 - input to REP430F. More... | |
#define | SW_OUT P1OUT |
#define | SW_IN P1IN |
#define | SW_DIR P1DIR |
#define | SW_PULLUP P1REN |
#define | LED_OUT P1OUT |
LED output register. More... | |
#define | LED_DIR P1DIR |
LED direction register. More... | |
#define | SW_MODE0 0x01 |
Mode-0 switch. More... | |
#define | SW_MODE1 0x02 |
Mode-1 switch. More... | |
#define | SW_VPPEN 0x04 |
Switch-Vpp Enable - test and set/clr. More... | |
#define | LED_YELLOW 0x08 |
YELLOW LED. More... | |
#define | LED_GREEN 0x10 |
GREEN LED. More... | |
#define | LED_RED 0x20 |
RED LED. More... | |
#define | SW_1 0x40 |
SW-1 TEST. More... | |
#define | TVCC_OUT P6OUT |
VCC output register. More... | |
#define | TVCC_DIR P6DIR |
VCC direction register. More... | |
#define | TVCC_MASK 0xF0 |
Minimum VCC value. More... | |
#define | TVCC_SHIFT 4 |
Value to shift up voltage level. More... | |
#define | TVCC_EN_DIR P5DIR |
#define | TVCC_EN_OUT P5OUT |
#define | TVCC_DIS_BIT 1 |
#define | LED_yellow_on() ( LED_OUT |= LED_YELLOW ) |
Switch on yellow LED. More... | |
#define | LED_yellow_off() ( LED_OUT &= ~LED_YELLOW ) |
Switch off yellow LED. More... | |
#define | LED_red_on() ( LED_OUT |= LED_RED ) |
Switch on red LED. More... | |
#define | LED_red_off() ( LED_OUT &= ~LED_RED ) |
Switch off red LED. More... | |
#define | LED_green_on() ( LED_OUT |= LED_GREEN ) |
Switch on green LED. More... | |
#define | LED_green_off() ( LED_OUT &= ~LED_GREEN ) |
Switch off green LED. More... | |
#define | All_LEDs_off() ( LED_OUT &= ~(LED_GREEN | LED_RED | LED_YELLOW )) |
Switch off all LEDs. More... | |
#define | JTAGOUT P5OUT |
JTAG output register. More... | |
#define | JTAGIN P5IN |
JTAG input register. More... | |
#define | JTAGDIR P5DIR |
JTAG direction register. More... | |
#define | JTAGSEL P5SEL |
JTAG select register. More... | |
#define | TMS 0x20 |
P5.5 JTAG TMS input pin. More... | |
#define | TDI 0x80 |
P5.7 JTAG TDI input pin. More... | |
#define | TDO 0x40 |
P5.6 JTAG TDO output pin. More... | |
#define | TCK 0x10 |
P5.4 JTAG TCK input pin. More... | |
#define | TEST 0x04 |
P5.2 JTAG Test input pin. More... | |
#define | RST 0x08 |
P5.3 Hardware RESET input pin. More... | |
#define | TCLK TDI |
P5.7 TDI (former XOUT) receives TCLK. More... | |
#define | BSLOUT P3OUT |
BSL output register. More... | |
#define | BSLIN P3IN |
BSL input register. More... | |
#define | BSLDIR P3DIR |
BSL direction register. More... | |
#define | BSLSEL P3SEL |
BSL select register. More... | |
#define | BSLTX 0x20 |
P3.5 BSL-TX output pin. More... | |
#define | BSLRX 0x10 |
P3.4 BSL-RX input pin. More... | |
#define | VPPOUT P8OUT |
Fuse blow voltage (Vpp) output register. More... | |
#define | VPPDIR P8DIR |
Fuse blow voltage (Vpp) direction register. More... | |
#define | VPPSEL P8SEL |
Fuse blow voltage (Vpp) select register. More... | |
#define | VPPONTEST 0x04 |
P8.2 Fuse blow voltage switched to TEST. More... | |
#define | VPPONTDI 0x02 |
P8.1 Fuse blow voltage switched to TDI. More... | |
#define | ONEMS 0x05DC |
CCR0 delay for 1ms with a 1.5 MHz TA clock. More... | |
#define | ClrTMS() ((JTAGOUT) &= (~TMS)) |
JTAG macro: clear TMS signal. More... | |
#define | SetTMS() ((JTAGOUT) |= (TMS)) |
JTAG macro: set TMS signal. More... | |
#define | ClrTDI() ((JTAGOUT) &= (~TDI)) |
JTAG macro: clear TDI signal. More... | |
#define | SetTDI() ((JTAGOUT) |= (TDI)) |
JTAG macro: set TDI signal. More... | |
#define | ClrTCK() ((JTAGOUT) &= (~TCK)) |
JTAG macro: clear TCK signal. More... | |
#define | SetTCK() ((JTAGOUT) |= (TCK)) |
JTAG macro: set TCK signal. More... | |
#define | StoreTCLK() ((JTAGOUT & TCLK)) |
JTAG macro: return current TCLK signal (on TDI pin) More... | |
#define | RestoreTCLK(x) (x == 0 ? (JTAGOUT &= ~TCLK) : (JTAGOUT |= TCLK)) |
JTAG macro: restore TCLK signal on TDI pin (based on input: x) More... | |
#define | ScanTDO() ((JTAGIN & TDO)) |
JTAG macro: return TDO value (result 0 or TDO (0x40)) More... | |
#define | VPPon(x) (x == VPP_ON_TEST ? (SetVpp(VPPONTEST)) : (SetVpp(VPPONTDI))) |
Supply fuse blow voltage based on TEST or TDI pin (based on input: x(. More... | |
#define | VPPoff() (SetVpp(0)) |
Switch off fuse blow voltage. More... | |
#define | SBWDATO TDI |
JTAG data_out pin in SBW mode -separate pin in MSP430F5437 - common IO translator. More... | |
#define | SBWDATI TDO |
JTAG data in pin in SBW mode - separate pin in MSP430F5437 - common IO translator. More... | |
#define | SBWCLK TCK |
JTAG clock pin in SBW mode. More... | |
#define | nNOPS { _NOP(); _NOP(); _NOP(); _NOP(); _NOP(); _NOP(); } |
Delay function as a transition between SBW time slots. More... | |
#define | TMSH {JTAGOUT |= SBWDATO; nNOPS ;JTAGOUT &= ~SBWCLK; nNOPS JTAGOUT |= SBWCLK; } |
SBW macro: set TMS signal. More... | |
#define | TMSL {JTAGOUT &= ~SBWDATO; nNOPS JTAGOUT &= ~SBWCLK; nNOPS JTAGOUT |= SBWCLK;} |
SBW macro: clear TMS signal. More... | |
#define | TMSLDH {JTAGOUT &= ~SBWDATO; nNOPS JTAGOUT &= ~SBWCLK; nNOPS JTAGOUT |= SBWDATO; JTAGOUT |= SBWCLK;} |
SBW macro: clear TMS signal and immediately set it high again in the SBWTCK low phase to enter the TDI slot with a high signal. More... | |
#define | TDIH {JTAGOUT |= SBWDATO; nNOPS JTAGOUT &= ~SBWCLK; nNOPS JTAGOUT |= SBWCLK;} |
SBW macro: Set TDI = 1. More... | |
#define | TDIL {JTAGOUT &= ~SBWDATO; nNOPS JTAGOUT &= ~SBWCLK; nNOPS JTAGOUT |= SBWCLK;} |
SBW macro: clear TDI signal. More... | |
#define | TDOsbw {TRSLDIR |= TDOI_DIR; nNOPS JTAGOUT &= ~SBWCLK; nNOPS JTAGOUT |= SBWCLK; TRSLDIR &= ~TDOI_DIR;} |
SBW macro: TDO cycle without reading TDO. More... | |
#define | TDO_RD {TRSLDIR |= TDOI_DIR; nNOPS JTAGOUT &= ~SBWCLK; nNOPS tdo_bit = JTAGIN; JTAGOUT |= SBWCLK; TRSLDIR &= ~TDOI_DIR;} |
SBW macro: TDO cycle with TDO read. More... | |
#define | SetSBWTCK() (JTAGOUT |= SBWCLK) |
SBW macro: set TCK signal. More... | |
#define | ClrSBWTCK() (JTAGOUT &= ~SBWCLK) |
SBW macro: clear TCK signal. More... | |
#define | SetSBWTDIO() (JTAGOUT |= SBWDATO) |
SBW macro: set TDIO signal. More... | |
#define | ClrSBWTDIO() (JTAGOUT &= ~SBWDATO) |
SBW macro: clear TDIO signal. More... | |
#define | ClrTCLK() ClrTCLK_sbw() |
SBW macro: clear TCLK signal. More... | |
#define | SetTCLK() SetTCLK_sbw() |
SBW macro: set TCLK signal. More... | |
#define | SetRST() (JTAGOUT |= SBWDATO) |
SBW macro: set RST signal. More... | |
#define | ClrRST() (JTAGOUT &= ~SBWDATO) |
SBW macro: clear RST signal. More... | |
#define | ReleaseRST() () |
SBW macro: release RST signal (pro forma) More... | |
#define | SetTST() (JTAGOUT |= SBWCLK) |
SBW macro: set TEST pin signal. More... | |
#define | ClrTST() (JTAGOUT &= ~SBWCLK) |
SBW macro: clear TEST pin signal. More... | |
Functions | |
void | ClrTCLK_sbw (void) |
Clear TCLK in Spy-Bi-Wire mode. More... | |
void | SetTCLK_sbw (void) |
Set TCLK in Spy-Bi-Wire mode. More... | |
void | TMSL_TDIL (void) |
void | TMSH_TDIL (void) |
void | TMSL_TDIH (void) |
void | TMSH_TDIH (void) |
void | TMSL_TDIH_TDOrd (void) |
void | TMSL_TDIL_TDOrd (void) |
void | TMSH_TDIH_TDOrd (void) |
void | TMSH_TDIL_TDOrd (void) |
void | MsDelay (word milliseconds) |
Delay function (resolution is 1 ms) More... | |
void | usDelay (word microeconds) |
Delay function (resolution is ~1 us) More... | |
void | InitController (void) |
Initialization of the Controller Board. More... | |
void | InitTarget (void) |
Initialization of the Target Board (switch voltages on, preset JTAG pins) More... | |
void | ReleaseTarget (void) |
Release Target Board (switch voltages off, JTAG pins are HI-Z) More... | |
unsigned long | AllShifts (word Format, unsigned long Data) |
Shift a value into TDI (MSB first) and simultaneously shift out a value from TDO (MSB first). More... | |
void | TDOisInput (void) |
This function switches TDO to Input (used for fuse blowing) More... | |
void | TCLKstrobes (word Amount) |
This function generates Amount strobes with the Flash Timing Generator. More... | |
void | ShowStatus (word Status, word Index) |
This function controls the status LEDs depending on the status argument. It stops program in error case. More... | |
void | TriggerPulse (word Mode) |
void | DrvSignals (void) |
Set up I/O pins for JTAG communication. More... | |
void | RlsSignals (void) |
Release I/O pins. More... | |
void | SetTargetVcc (word level) |
Set target Vcc (supplied from REP430F) More... | |
word | Get_target_Vcc (void) |
Determine target VCC. More... | |
word | Get_Ext_Vcc (void) |
Determine external VCC. More... | |
void | SetVpp (word source) |
function to set the fuse blow voltage Vpp More... | |
void | RST_dir (word dir) |
Set the direction for the RST pin. More... | |
void | IO_3state (void) |
Set all JTAG pins to input direction - from target to REP430F. More... | |
void | SetVCoreUp (word level) |
Function to set a specific voltage level via the PMM. More... | |
word | Get_Vx (word index) |
Measure different voltages via ADC12. More... | |
void | Enable_Vpp (void) |
Enable fuse blow voltage Vpp. More... | |
void | Disable_Vpp (void) |
Disable fuse blow voltage Vpp. More... | |
void | TDI_dir (word dir) |
Set the direction for the TDI pin. More... | |
void | TDOI_dir (word dir) |
Set the direction for the TDO pin. More... | |
void | TEST_dir (word dir) |
Set the direction for the TEST pin. More... | |
void | TMS_dir (word dir) |
Set the direction for the TMS pin. More... | |
void | TCK_dir (word dir) |
Set the direction for the TCK pin. More... | |
void | configure_IO_JTAG (void) |
Set JTAG pins to output direction - from REP430F to target. More... | |
void | configure_IO_SBW (void) |
Set SBW pins to output direction - from REP430F to target. More... | |
#define All_LEDs_off | ( | ) | ( LED_OUT &= ~(LED_GREEN | LED_RED | LED_YELLOW )) |
Switch off all LEDs.
Definition at line 204 of file LowLevelFunc430Xv2.h.
#define BRX_DIR 0x01 |
BSL RX Translator direction 0 - output from REP430F, 1 - input to REP430F.
Not used in this project
Definition at line 135 of file LowLevelFunc430Xv2.h.
#define BSLDIR P3DIR |
BSL direction register.
Not used in this project
Definition at line 238 of file LowLevelFunc430Xv2.h.
#define BSLIN P3IN |
#define BSLOUT P3OUT |
#define BSLRX 0x10 |
P3.4 BSL-RX input pin.
Not used in this project
Definition at line 247 of file LowLevelFunc430Xv2.h.
#define BSLSEL P3SEL |
#define BSLTX 0x20 |
P3.5 BSL-TX output pin.
Not used in this project
Definition at line 244 of file LowLevelFunc430Xv2.h.
#define BTX_DIR 0x02 |
BSL TX Translator direction 0 - output from REP430F, 1 - input to REP430F.
Not used in this project
Definition at line 138 of file LowLevelFunc430Xv2.h.
SBW macro: clear RST signal.
Definition at line 375 of file LowLevelFunc430Xv2.h.
SBW macro: clear TCK signal.
Definition at line 355 of file LowLevelFunc430Xv2.h.
SBW macro: clear TDIO signal.
Definition at line 359 of file LowLevelFunc430Xv2.h.
JTAG macro: clear TCK signal.
Definition at line 279 of file LowLevelFunc430Xv2.h.
#define ClrTCLK | ( | ) | ClrTCLK_sbw() |
SBW macro: clear TCLK signal.
Definition at line 368 of file LowLevelFunc430Xv2.h.
JTAG macro: clear TDI signal.
Definition at line 275 of file LowLevelFunc430Xv2.h.
JTAG macro: clear TMS signal.
Definition at line 271 of file LowLevelFunc430Xv2.h.
SBW macro: clear TEST pin signal.
Definition at line 381 of file LowLevelFunc430Xv2.h.
#define JTAGDIR P5DIR |
JTAG direction register.
Definition at line 212 of file LowLevelFunc430Xv2.h.
#define JTAGIN P5IN |
JTAG input register.
Definition at line 210 of file LowLevelFunc430Xv2.h.
#define JTAGOUT P5OUT |
JTAG output register.
Definition at line 208 of file LowLevelFunc430Xv2.h.
#define JTAGSEL P5SEL |
JTAG select register.
Definition at line 214 of file LowLevelFunc430Xv2.h.
#define LED_DIR P1DIR |
LED direction register.
Definition at line 159 of file LowLevelFunc430Xv2.h.
#define LED_GREEN 0x10 |
GREEN LED.
Definition at line 170 of file LowLevelFunc430Xv2.h.
Switch off green LED.
Definition at line 202 of file LowLevelFunc430Xv2.h.
Switch on green LED.
Definition at line 200 of file LowLevelFunc430Xv2.h.
#define LED_OUT P1OUT |
LED output register.
Definition at line 157 of file LowLevelFunc430Xv2.h.
#define LED_RED 0x20 |
RED LED.
Definition at line 172 of file LowLevelFunc430Xv2.h.
Switch off red LED.
Definition at line 198 of file LowLevelFunc430Xv2.h.
Switch on red LED.
Definition at line 196 of file LowLevelFunc430Xv2.h.
#define LED_YELLOW 0x08 |
YELLOW LED.
Definition at line 168 of file LowLevelFunc430Xv2.h.
#define LED_yellow_off | ( | ) | ( LED_OUT &= ~LED_YELLOW ) |
Switch off yellow LED.
Definition at line 194 of file LowLevelFunc430Xv2.h.
#define LED_yellow_on | ( | ) | ( LED_OUT |= LED_YELLOW ) |
Switch on yellow LED.
Definition at line 192 of file LowLevelFunc430Xv2.h.
#define nNOPS { _NOP(); _NOP(); _NOP(); _NOP(); _NOP(); _NOP(); } |
Delay function as a transition between SBW time slots.
Definition at line 332 of file LowLevelFunc430Xv2.h.
#define ONEMS 0x05DC |
CCR0 delay for 1ms with a 1.5 MHz TA clock.
Definition at line 264 of file LowLevelFunc430Xv2.h.
#define ReleaseRST | ( | ) | () |
SBW macro: release RST signal (pro forma)
Definition at line 377 of file LowLevelFunc430Xv2.h.
JTAG macro: restore TCLK signal on TDI pin (based on input: x)
Definition at line 285 of file LowLevelFunc430Xv2.h.
#define RST 0x08 |
P5.3 Hardware RESET input pin.
Definition at line 226 of file LowLevelFunc430Xv2.h.
#define RST_DIR 0x08 |
RESET Translator direction 0 - output from REP430F, 1 - input to REP430F.
Definition at line 142 of file LowLevelFunc430Xv2.h.
#define SBWCLK TCK |
JTAG clock pin in SBW mode.
Definition at line 329 of file LowLevelFunc430Xv2.h.
#define SBWDATI TDO |
JTAG data in pin in SBW mode - separate pin in MSP430F5437 - common IO translator.
Definition at line 327 of file LowLevelFunc430Xv2.h.
#define SBWDATO TDI |
JTAG data_out pin in SBW mode -separate pin in MSP430F5437 - common IO translator.
Definition at line 325 of file LowLevelFunc430Xv2.h.
JTAG macro: return TDO value (result 0 or TDO (0x40))
Definition at line 287 of file LowLevelFunc430Xv2.h.
SBW macro: set RST signal.
Definition at line 373 of file LowLevelFunc430Xv2.h.
SBW macro: set TCK signal.
Definition at line 353 of file LowLevelFunc430Xv2.h.
SBW macro: set TDIO signal.
Definition at line 357 of file LowLevelFunc430Xv2.h.
JTAG macro: set TCK signal.
Definition at line 281 of file LowLevelFunc430Xv2.h.
#define SetTCLK | ( | ) | SetTCLK_sbw() |
SBW macro: set TCLK signal.
Definition at line 370 of file LowLevelFunc430Xv2.h.
JTAG macro: set TDI signal.
Definition at line 277 of file LowLevelFunc430Xv2.h.
JTAG macro: set TMS signal.
Definition at line 273 of file LowLevelFunc430Xv2.h.
SBW macro: set TEST pin signal.
Definition at line 379 of file LowLevelFunc430Xv2.h.
#define SPYBIWIRE_IF 2 |
Spy-Bi-Wire interface.
Definition at line 82 of file LowLevelFunc430Xv2.h.
#define SPYBIWIREJTAG_IF 1 |
JTAG interface on a device that supports JTAG and SBW.
Definition at line 80 of file LowLevelFunc430Xv2.h.
#define STATUS_ACTIVE 2 |
Replicator is active.
Definition at line 112 of file LowLevelFunc430Xv2.h.
#define STATUS_ERROR 0 |
return 0 = error
Definition at line 105 of file LowLevelFunc430Xv2.h.
#define STATUS_FUSEBLOWN 2 |
GetDevice returns this if the security fuse is blown.
Definition at line 109 of file LowLevelFunc430Xv2.h.
#define STATUS_IDLE 3 |
Replicator is idling.
Definition at line 114 of file LowLevelFunc430Xv2.h.
#define STATUS_OK 1 |
return 1 = no error
Definition at line 107 of file LowLevelFunc430Xv2.h.
JTAG macro: return current TCLK signal (on TDI pin)
Definition at line 283 of file LowLevelFunc430Xv2.h.
#define SW_1 0x40 |
SW-1 TEST.
Definition at line 174 of file LowLevelFunc430Xv2.h.
#define SW_MODE0 0x01 |
Mode-0 switch.
Definition at line 162 of file LowLevelFunc430Xv2.h.
#define SW_MODE1 0x02 |
Mode-1 switch.
Definition at line 164 of file LowLevelFunc430Xv2.h.
#define SW_VPPEN 0x04 |
Switch-Vpp Enable - test and set/clr.
Definition at line 166 of file LowLevelFunc430Xv2.h.
#define TCK 0x10 |
P5.4 JTAG TCK input pin.
Definition at line 222 of file LowLevelFunc430Xv2.h.
#define TCK_DIR 0x10 |
TCK Translator direction 0 - output from REP430F, 1 - input to REP430F.
Definition at line 144 of file LowLevelFunc430Xv2.h.
#define TCLK TDI |
P5.7 TDI (former XOUT) receives TCLK.
Definition at line 228 of file LowLevelFunc430Xv2.h.
#define TDI 0x80 |
P5.7 JTAG TDI input pin.
Definition at line 218 of file LowLevelFunc430Xv2.h.
#define TDI_DIR 0x80 |
TDI Translator direction 0 - output from REP430F, 1 - input to REP430F.
Definition at line 150 of file LowLevelFunc430Xv2.h.
SBW macro: Set TDI = 1.
Definition at line 344 of file LowLevelFunc430Xv2.h.
SBW macro: clear TDI signal.
Definition at line 346 of file LowLevelFunc430Xv2.h.
#define TDO 0x40 |
P5.6 JTAG TDO output pin.
Definition at line 220 of file LowLevelFunc430Xv2.h.
#define TDO_RD {TRSLDIR |= TDOI_DIR; nNOPS JTAGOUT &= ~SBWCLK; nNOPS tdo_bit = JTAGIN; JTAGOUT |= SBWCLK; TRSLDIR &= ~TDOI_DIR;} |
SBW macro: TDO cycle with TDO read.
Definition at line 350 of file LowLevelFunc430Xv2.h.
#define TDOI_DIR 0x40 |
TDO/TDI Translator direction 0 - output from REP430F, 1 - input to REP430F.
Definition at line 148 of file LowLevelFunc430Xv2.h.
#define TDOsbw {TRSLDIR |= TDOI_DIR; nNOPS JTAGOUT &= ~SBWCLK; nNOPS JTAGOUT |= SBWCLK; TRSLDIR &= ~TDOI_DIR;} |
SBW macro: TDO cycle without reading TDO.
Definition at line 348 of file LowLevelFunc430Xv2.h.
#define TEST 0x04 |
P5.2 JTAG Test input pin.
Definition at line 224 of file LowLevelFunc430Xv2.h.
#define TEST_DIR 0x04 |
TEST Translator direction 0 - output from REP430F, 1 - input to REP430F.
Definition at line 140 of file LowLevelFunc430Xv2.h.
#define TMS 0x20 |
P5.5 JTAG TMS input pin.
Definition at line 216 of file LowLevelFunc430Xv2.h.
#define TMS_DIR 0x20 |
TMS Translator direction 0 - output from REP430F, 1 - input to REP430F.
Definition at line 146 of file LowLevelFunc430Xv2.h.
SBW macro: set TMS signal.
Definition at line 335 of file LowLevelFunc430Xv2.h.
SBW macro: clear TMS signal.
Definition at line 337 of file LowLevelFunc430Xv2.h.
#define TMSLDH {JTAGOUT &= ~SBWDATO; nNOPS JTAGOUT &= ~SBWCLK; nNOPS JTAGOUT |= SBWDATO; JTAGOUT |= SBWCLK;} |
SBW macro: clear TMS signal and immediately set it high again in the SBWTCK low phase to enter the TDI slot with a high signal.
Only used to clock TCLK (=TDI for SBW) in Run-Test/IDLE mode of the JTAG FSM
Definition at line 342 of file LowLevelFunc430Xv2.h.
#define TVCC_DIR P6DIR |
VCC direction register.
Definition at line 181 of file LowLevelFunc430Xv2.h.
#define TVCC_MASK 0xF0 |
Minimum VCC value.
Definition at line 183 of file LowLevelFunc430Xv2.h.
#define TVCC_OUT P6OUT |
VCC output register.
Definition at line 179 of file LowLevelFunc430Xv2.h.
#define TVCC_SHIFT 4 |
Value to shift up voltage level.
Definition at line 185 of file LowLevelFunc430Xv2.h.
#define VPPDIR P8DIR |
Fuse blow voltage (Vpp) direction register.
Definition at line 253 of file LowLevelFunc430Xv2.h.
#define VPPoff | ( | ) | (SetVpp(0)) |
Switch off fuse blow voltage.
Definition at line 291 of file LowLevelFunc430Xv2.h.
#define VPPon | ( | x | ) | (x == VPP_ON_TEST ? (SetVpp(VPPONTEST)) : (SetVpp(VPPONTDI))) |
Supply fuse blow voltage based on TEST or TDI pin (based on input: x(.
Definition at line 289 of file LowLevelFunc430Xv2.h.
#define VPPONTDI 0x02 |
P8.1 Fuse blow voltage switched to TDI.
Definition at line 260 of file LowLevelFunc430Xv2.h.
#define VPPONTEST 0x04 |
P8.2 Fuse blow voltage switched to TEST.
Definition at line 258 of file LowLevelFunc430Xv2.h.
#define VPPOUT P8OUT |
Fuse blow voltage (Vpp) output register.
Definition at line 251 of file LowLevelFunc430Xv2.h.
#define VPPSEL P8SEL |
Fuse blow voltage (Vpp) select register.
Definition at line 255 of file LowLevelFunc430Xv2.h.
unsigned long AllShifts | ( | word | Format, |
unsigned long | Data | ||
) |
Shift a value into TDI (MSB first) and simultaneously shift out a value from TDO (MSB first).
Format | (number of bits shifted, 8 (F_BYTE), 16 (F_WORD), 20 (F_ADDR) or 32 (F_LONG)) |
Data | (data to be shifted into TDI) |
Definition at line 173 of file LowLevelFunc430Xv2.c.
void ClrTCLK_sbw | ( | void | ) |
Clear TCLK in Spy-Bi-Wire mode.
enters with TCLK_saved and exits with TCLK = 0
Definition at line 129 of file LowLevelFunc430Xv2.c.
void configure_IO_JTAG | ( | void | ) |
Set JTAG pins to output direction - from REP430F to target.
Definition at line 593 of file LowLevelFunc430Xv2.c.
void configure_IO_SBW | ( | void | ) |
Set SBW pins to output direction - from REP430F to target.
Definition at line 604 of file LowLevelFunc430Xv2.c.
void Disable_Vpp | ( | void | ) |
Disable fuse blow voltage Vpp.
Definition at line 585 of file LowLevelFunc430Xv2.c.
void DrvSignals | ( | void | ) |
Set up I/O pins for JTAG communication.
Definition at line 632 of file LowLevelFunc430Xv2.c.
void Enable_Vpp | ( | void | ) |
Enable fuse blow voltage Vpp.
Definition at line 576 of file LowLevelFunc430Xv2.c.
word Get_Ext_Vcc | ( | void | ) |
Determine external VCC.
Definition at line 423 of file LowLevelFunc430Xv2.c.
word Get_target_Vcc | ( | void | ) |
Determine target VCC.
Definition at line 415 of file LowLevelFunc430Xv2.c.
word Get_Vx | ( | word | index | ) |
Measure different voltages via ADC12.
Definition at line 431 of file LowLevelFunc430Xv2.c.
void InitController | ( | void | ) |
Initialization of the Controller Board.
Definition at line 289 of file LowLevelFunc430Xv2.c.
void InitTarget | ( | void | ) |
Initialization of the Target Board (switch voltages on, preset JTAG pins)
For devices with normal 4wires JTAG (JTAG4SBW=0)
For devices with Spy-Bi-Wire to work in 4wires JTAG (JTAG4SBW=1)
Definition at line 662 of file LowLevelFunc430Xv2.c.
void IO_3state | ( | void | ) |
Set all JTAG pins to input direction - from target to REP430F.
Definition at line 612 of file LowLevelFunc430Xv2.c.
void MsDelay | ( | word | milliseconds | ) |
Delay function (resolution is 1 ms)
milliseconds | (number of ms, max number is 0xFFFF) |
Definition at line 679 of file LowLevelFunc430Xv2.c.
void ReleaseTarget | ( | void | ) |
Release Target Board (switch voltages off, JTAG pins are HI-Z)
Definition at line 670 of file LowLevelFunc430Xv2.c.
void RlsSignals | ( | void | ) |
Release I/O pins.
Definition at line 650 of file LowLevelFunc430Xv2.c.
void RST_dir | ( | word | dir | ) |
Set the direction for the RST pin.
dir | (0 = IN - from target to REP430F, !0 = OUT) |
Definition at line 529 of file LowLevelFunc430Xv2.c.
void SetTargetVcc | ( | word | level | ) |
Set target Vcc (supplied from REP430F)
input - 10*Vcc[V]-> range 2.1V to 3.6 V (data 21 to 36) or data = 0 -> Vcc OFF
level | (requested VCC in V * 10) |
Definition at line 395 of file LowLevelFunc430Xv2.c.
void SetTCLK_sbw | ( | void | ) |
Set TCLK in Spy-Bi-Wire mode.
enters with TCLK_saved and exits with TCLK = 1
Definition at line 149 of file LowLevelFunc430Xv2.c.
void SetVCoreUp | ( | word | level | ) |
Function to set a specific voltage level via the PMM.
level |
Definition at line 367 of file LowLevelFunc430Xv2.c.
void SetVpp | ( | word | source | ) |
function to set the fuse blow voltage Vpp
source | (Select the pin to which Vpp is applied according to chosen interface) |
Definition at line 557 of file LowLevelFunc430Xv2.c.
void ShowStatus | ( | word | status, |
word | index | ||
) |
This function controls the status LEDs depending on the status argument. It stops program in error case.
status | (4 stati - can be extended to 8 - possible for 3 LEDs - Yellow,Green,Red) |
index | (additional number for detailed diagnostics or watch variable during debugging phase) |
Definition at line 777 of file LowLevelFunc430Xv2.c.
void TCK_dir | ( | word | dir | ) |
Set the direction for the TCK pin.
dir | (0 = IN - from target to REP430F, !0 = OUT) |
Definition at line 546 of file LowLevelFunc430Xv2.c.
void TCLKstrobes | ( | word | Amount | ) |
This function generates Amount strobes with the Flash Timing Generator.
Frequency fFTG = 257..476kHz (t = 3.9..2.1us). Used freq. in procedure - 400 kHz
User knows target frequency, instruction cycles, C implementation.
No. of MCKL cycles - 18MHz/400 kHz = 45 or 12MHz/400 kHz = 30
Amount | (number of strobes to be generated) |
Definition at line 725 of file LowLevelFunc430Xv2.c.
void TDI_dir | ( | word | dir | ) |
Set the direction for the TDI pin.
dir | (0 = IN - from target to REP430F, !0 = OUT) |
Definition at line 471 of file LowLevelFunc430Xv2.c.
void TDOI_dir | ( | word | dir | ) |
Set the direction for the TDO pin.
dir | (0 = IN - from target to REP430F, !0 = OUT) |
Definition at line 483 of file LowLevelFunc430Xv2.c.
void TDOisInput | ( | void | ) |
This function switches TDO to Input (used for fuse blowing)
Definition at line 624 of file LowLevelFunc430Xv2.c.
void TEST_dir | ( | word | dir | ) |
Set the direction for the TEST pin.
dir | (0 = IN - from target to REP430F, !0 = OUT) |
Definition at line 495 of file LowLevelFunc430Xv2.c.
void TMS_dir | ( | word | dir | ) |
Set the direction for the TMS pin.
dir | (0 = IN - from target to REP430F, !0 = OUT) |
Definition at line 512 of file LowLevelFunc430Xv2.c.
void usDelay | ( | word | microseconds | ) |
Delay function (resolution is ~1 us)
microseconds | (number of ms, max number is 0xFFFF) |
Definition at line 694 of file LowLevelFunc430Xv2.c.