![]() |
![]() |
Low Level Functions regarding user's Hardware.
Definition in file LowLevelFunc430.c.
Go to the source code of this file.
Functions | |
void | TMSL_TDIL (void) |
Combination of SBW macros: TMS low, TDI low, no TDO read. More... | |
void | TMSH_TDIL (void) |
Combination of SBW macros: TMS high, TDI low, no TDO read. More... | |
void | TMSL_TDIH (void) |
Combination of SBW macros: TMS low, TDI high, no TDO read. More... | |
void | TMSH_TDIH (void) |
Combination of SBW macros: TMS high, TDI high, no TDO read. More... | |
void | TMSL_TDIH_TDOrd (void) |
Combination of SBW macros: TMS low, TDI high, TDO read. More... | |
void | TMSL_TDIL_TDOrd (void) |
Combination of SBW macros: TMS low, TDI low, TDO read. More... | |
void | TMSH_TDIH_TDOrd (void) |
Combination of SBW macros: TMS high, TDI high, TDO read. More... | |
void | TMSH_TDIL_TDOrd (void) |
Combination of SBW macros: TMS high, TDI low, TDO read. More... | |
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 | IR_Ex_Blow_SBW_Shift (void) |
Provide JTAG fuse blow instruction. More... | |
word | Shift (word Format, word Data) |
Shift a value into TDI (MSB first) and simultaneously shift out a value from TDO (MSB first). More... | |
void | InitController (void) |
Initialization of the Controller Board. More... | |
void | SetVCoreUp (word level) |
Function to set a specific voltage level via the PMM. 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... | |
word | Get_Vx (word index) |
Measure different voltages via ADC12. 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 | RST_dir (word dir) |
Set the direction for the RST pin. More... | |
void | TCK_dir (word dir) |
Set the direction for the TCK pin. More... | |
void | SetVpp (word source) |
function to set the fuse blow voltage Vpp More... | |
void | Enable_Vpp (void) |
Enable fuse blow voltage Vpp. More... | |
void | Disable_Vpp (void) |
Disable fuse blow voltage Vpp. 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... | |
void | IO_3state (void) |
Set all JTAG pins to input direction - from target to REP430F. More... | |
void | TDOisInput (void) |
This function switches TDO to Input (used for fuse blowing) More... | |
void | DrvSignals (void) |
Set up I/O pins for JTAG communication. More... | |
void | RlsSignals (void) |
Release I/O pins. 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... | |
void | MsDelay (word milliseconds) |
Delay function (resolution is 1 ms) More... | |
void | usDelay (word microseconds) |
Delay function (resolution is ~1 us) More... | |
void | TCLKstrobes (word Amount) |
void | ShowStatus (word status, word index) |
This function controls the status LEDs depending on the status argument. It stops program in error case. More... | |
Variables | |
byte | tdo_bit |
Holds the value of TDO-bit. More... | |
byte | TCLK_saved = SBWDATO |
Holds the last value of TCLK before entering a JTAG sequence. More... | |
void ClrTCLK_sbw | ( | void | ) |
Clear TCLK in Spy-Bi-Wire mode.
enters with TCLK_saved and exits with TCLK = 0
Definition at line 135 of file LowLevelFunc430.c.
void configure_IO_JTAG | ( | void | ) |
Set JTAG pins to output direction - from REP430F to target.
Definition at line 610 of file LowLevelFunc430.c.
void configure_IO_SBW | ( | void | ) |
Set SBW pins to output direction - from REP430F to target.
Definition at line 622 of file LowLevelFunc430.c.
void Disable_Vpp | ( | void | ) |
Disable fuse blow voltage Vpp.
Definition at line 603 of file LowLevelFunc430.c.
void DrvSignals | ( | void | ) |
Set up I/O pins for JTAG communication.
Definition at line 650 of file LowLevelFunc430.c.
void Enable_Vpp | ( | void | ) |
Enable fuse blow voltage Vpp.
Definition at line 594 of file LowLevelFunc430.c.
word Get_Ext_Vcc | ( | void | ) |
Determine external VCC.
Definition at line 445 of file LowLevelFunc430.c.
word Get_target_Vcc | ( | void | ) |
Determine target VCC.
Definition at line 437 of file LowLevelFunc430.c.
word Get_Vx | ( | word | index | ) |
Measure different voltages via ADC12.
Definition at line 453 of file LowLevelFunc430.c.
void InitController | ( | void | ) |
Initialization of the Controller Board.
Definition at line 302 of file LowLevelFunc430.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 680 of file LowLevelFunc430.c.
void IO_3state | ( | void | ) |
Set all JTAG pins to input direction - from target to REP430F.
Definition at line 630 of file LowLevelFunc430.c.
void IR_Ex_Blow_SBW_Shift | ( | void | ) |
Provide JTAG fuse blow instruction.
Definition at line 174 of file LowLevelFunc430.c.
void MsDelay | ( | word | milliseconds | ) |
Delay function (resolution is 1 ms)
[in] | milliseconds | (number of ms, max number is 0xFFFF) |
Definition at line 697 of file LowLevelFunc430.c.
void ReleaseTarget | ( | void | ) |
Release Target Board (switch voltages off, JTAG pins are HI-Z)
Definition at line 688 of file LowLevelFunc430.c.
void RlsSignals | ( | void | ) |
Release I/O pins.
Definition at line 668 of file LowLevelFunc430.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 548 of file LowLevelFunc430.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
[in] | level | (requested VCC in V * 10) |
Definition at line 417 of file LowLevelFunc430.c.
void SetTCLK_sbw | ( | void | ) |
Set TCLK in Spy-Bi-Wire mode.
enters with TCLK_saved and exits with TCLK = 1
Definition at line 155 of file LowLevelFunc430.c.
void SetVCoreUp | ( | word | level | ) |
Function to set a specific voltage level via the PMM.
[in] | level |
Definition at line 387 of file LowLevelFunc430.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 575 of file LowLevelFunc430.c.
word Shift | ( | word | Format, |
word | Data | ||
) |
Shift a value into TDI (MSB first) and simultaneously shift out a value from TDO (MSB first).
[in] | Format | (number of bits shifted, 8 (F_BYTE), 16 (F_WORD), 20 (F_ADDR) or 32 (F_LONG)) |
[in] | Data | (data to be shifted into TDI) |
Definition at line 218 of file LowLevelFunc430.c.
void ShowStatus | ( | word | status, |
word | index | ||
) |
This function controls the status LEDs depending on the status argument. It stops program in error case.
[in] | status | (4 stati - can be extended to 8 - possible for 3 LEDs - Yellow,Green,Red) |
[in] | index | (additional number for detailed diagnostics or watch variable during debugging phase) |
Definition at line 861 of file LowLevelFunc430.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 564 of file LowLevelFunc430.c.
void TDI_dir | ( | word | dir | ) |
Set the direction for the TDI pin.
[in] | dir | (0 = IN - from target to REP430F, !0 = OUT) |
Definition at line 494 of file LowLevelFunc430.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 505 of file LowLevelFunc430.c.
void TDOisInput | ( | void | ) |
This function switches TDO to Input (used for fuse blowing)
Definition at line 642 of file LowLevelFunc430.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 516 of file LowLevelFunc430.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 532 of file LowLevelFunc430.c.
void TMSH_TDIH | ( | void | ) |
Combination of SBW macros: TMS high, TDI high, no TDO read.
Definition at line 103 of file LowLevelFunc430.c.
void TMSH_TDIH_TDOrd | ( | void | ) |
Combination of SBW macros: TMS high, TDI high, TDO read.
Definition at line 121 of file LowLevelFunc430.c.
void TMSH_TDIL | ( | void | ) |
Combination of SBW macros: TMS high, TDI low, no TDO read.
Definition at line 91 of file LowLevelFunc430.c.
void TMSH_TDIL_TDOrd | ( | void | ) |
Combination of SBW macros: TMS high, TDI low, TDO read.
Definition at line 127 of file LowLevelFunc430.c.
void TMSL_TDIH | ( | void | ) |
Combination of SBW macros: TMS low, TDI high, no TDO read.
Definition at line 97 of file LowLevelFunc430.c.
void TMSL_TDIH_TDOrd | ( | void | ) |
Combination of SBW macros: TMS low, TDI high, TDO read.
Definition at line 109 of file LowLevelFunc430.c.
void TMSL_TDIL | ( | void | ) |
Combination of SBW macros: TMS low, TDI low, no TDO read.
Definition at line 85 of file LowLevelFunc430.c.
void TMSL_TDIL_TDOrd | ( | void | ) |
Combination of SBW macros: TMS low, TDI low, TDO read.
Definition at line 115 of file LowLevelFunc430.c.
void usDelay | ( | word | microseconds | ) |
Delay function (resolution is ~1 us)
[in] | microseconds | (number of ms, max number is 0xFFFF) |
Definition at line 712 of file LowLevelFunc430.c.
byte TCLK_saved = SBWDATO |
Holds the last value of TCLK before entering a JTAG sequence.
Definition at line 75 of file LowLevelFunc430.c.
byte tdo_bit |
Holds the value of TDO-bit.
Definition at line 73 of file LowLevelFunc430.c.