Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Tree
root@self
startDepth1

...

Encapsulated functions are powerful and easy to use. When called, these functions perform all device actions from beginning to end automatically.

These functions require that all FPAs were opened using the Multi API-DLL function F OpenInstancesAndFPAs (Section 3.1) and each API-DLL instance was correctly initialized using Generic Functions (Section 3.2). If not already included in configuration settings, the code being programmed by each FPA to its target device can be set using Data Buffer Functions (Section 3.3).

Encapsulated functions use the following sequence:

  • FPA opens target device according to configuration settings (power source, reset, etc.),

  • FPA establishes communication with target device (JTAG/SWD), checks ID, calibrates clock,

  • FPA performs selected encapsulated function,

  • FPA terminates communication with target device,

FPA closes target device according to configuration settings (power setting, app. start for F AutoProgram only, adapter line states, etc.)

...

General Description

Perform full programming sequence on selected FPA. Power on (optional), open communication, erase, blank check, program, verify and lock device (optional). Exact behavior of each action is controlled through configuration settings (i.e. PowerFromFpaEn has to be enabled to power target device from FPA, otherwise outside power source is required).

Syntax

INT_X F_AutoProgram( INT_X mode )

Input

INT X mode : for future use (currently has no effect)

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Determine if FPA has successfully established communication with the target device. This step requires a working connection, a read of the processor ID, memory size, and flash size checked against internal records (except when target MCU doesn’t have this meta-data available), and calibration of internal CPU clock. If these steps match expected values the operation will succeed. This function is internally called by all other encapsulated functions at startup before they proceed to perform any other operations (except one). Therefore if this function fails, other encap- sulated functions will invariably fail as well. The exception is F Clear Locked Device which uses a

custom procedure to unlock the MCU (if supported by vendor).

Syntax

INT_X F_Verify_Access_to_MCU( void )

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Erase memory specified in configuration options. Depending on settings, this operation will erase all or part of target device’s memory contents. Use Retain Data settings to preserve calibration or custom data. Retain Data settings only apply to encapsulated functions (F AutoProgram, this function, etc.) custom writes using Data Buffer or Sequential instructions will not retain data.

Syntax

INT_X F_Memory_Erase( INT_X mode )

Input

INT X mode : type of memory erase operation

  • 0 : erase memory specified by configuration option FlashEraseModeIndex

  • 1 : erase all flash memory, regardless of configuration options

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

Blank check memory specified in configuration options. Depending on settings, this operation will blank check all or part of target device’s memory contents.

Syntax

INT_X F_Memory_Blank_Check( void )

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Write contents of Code Buffer to target device’s memory. The Code Buffer is usually written from a code file using F ReadCodeFile, but can be modified with custom instructions such as F Put Byte to Code Buffer. An enabled configuration option, CodeFileReload, will cause this function to always reload code file before proceeding. This setting can be useful if code file is frequently modified, but it can cause issues if custom instructions are used to modify the code buffer before programming, as their modifications will be discarded.

Syntax

INT_X F_Memory_Write( INT_X mode )

Input

INT X mode : for future use (currently has no effect)

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Verify target device’s memory contents against Code Buffer. The sections compared depend on configuration settings, and are identical to sections of memory being programmed using F Memory Write. For common behavior, do not modify settings between calling F Memory Write and this function.

Syntax

INT_X F_Memory_Verify( INT_X mode )

Input

INT X mode : for future use (currently has no effect)

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

Read target device’s memory contents and store in Read Data Buffer (see Figure 1.2). The sections of memory read depend on configuration settings, FlashReadModeIndex. Use F Get Byte from Buffer to access the contents of this buffer after this function has completed.

Syntax

INT_X F_Memory_Read( void )

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

This function can write memory protection bits and disable debug access. Performs the functions F Write Locking Registers and F Write Debug Register together. If the former fails, the latter will not execute (locking bits are verified first before debug access is disabled).

This procedure is not supported by all target devices. Consult individual device manuals or the FlashPro GUI, Setup, Memory Protection window which will indicate which bits can be set.

Syntax

INT_X F_Lock_MCU( void )

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Will attempt to return all memory to factory settings. Usually requires a mass erase of the memory contents. This procedure can be used to unlock memory protection or enable debug access after the F Lock MCU procedure.

This procedure is not supported by all target devices. Consult individual device manuals or the FlashPro GUI, Setup, Memory Protection window which will indicate which bits can be reset.

Syntax

INT_X F_Clear_Locked_Device( void )

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

Sequential functions allow access to the target device in any combination of small instructions like erase, read, write sector, modify part of memory, etc. Sequential functions work correctly after communication between target device and programming adapter has been initialized. This requires the target FPA to be opened using F OpenInstancesAndFPAs and F Initialization, and for proper configuration options to be set using F ConfigFileLoad or F Set Config Value by Name.

Once the FPA has been initialized using the aforementioned functions, open the target de- vice using the function F Open Target Device. When communication is established, then any

of the sequential instructions can be called. When finished, conclude your task by calling F Close Target Device.

F_OpenInstancesAndFPAs F_Set_FPA_index F_Initialization F_ConfigFileLoad F_Open_Target_Device

... < sequential functions here > ... F_Close_Target_Device

...

General Description

The FPA will establish communication with the target device. This step requires a working con- nection, a read of the processor ID, memory size, and flash size checked against internal records (except when target MCU doesn’t have this meta-data available), and calibration of internal CPU clock. If these steps match expected values the operation will succeed.

This function is identical to F Verify Access to MCU except that the target device is not closed when this function concludes (F Open Target Device keeps the target device open to accept further instructions listed below).

Syntax

INT_X F_Open_Target_Device( void );

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Terminates communication between FPA and target device. Sets reset line to GND and communi- cation lines (TMS, TCK, TDI) to configuration setting ReleaseJtagState.

Syntax

INT_X F_Close_Target_Device( void );

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Send command to erase target device’s memory segment.

Syntax

INT_X F_Segment_Erase( INT_X address );

Input

INT X address : address of segment/sector to be erased

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

  • STATUS ADDRESS OUT OF FLASH SPACE ERR (534): address out of range

  • STATUS ERASE SEGMENT FAILED (549): erase operation failed

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Blank check part or all of the target device’s memory.

Syntax

INT_X F_Sectors_Blank_Check( INT_X start_addr, INT_X stop_addr );

Input

INT X start addr : first memory address to be included in blank check (inclusive) INT X stop addr : last memory address to be included in blank check (inclusive)

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Write specified number of bytes from temporary Write Data Buffer (see Figure 1.2) to MCU flash or OTP.

Syntax

INT_X F_Copy_Buffer_to_Flash( INT_X start_addr, INT_X size )

Input

INT X start addr : valid flash or OTP start address

INT X size : number of bytes to copy beginning at start address

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Read specified number of bytes from MCU flash or OTP to temporary Read Data Buffer (see Figure 1.2).

Syntax

INT_X F_Copy_Flash_to_Buffer( INT_X start_addr, INT_X size )

Input

INT X start addr : valid flash or OTP start address

INT X size : number of bytes to copy beginning at start address

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Use the FPA to write a byte to the target device’s RAM. This write is not verified (no read performed). Use F Read Byte to verify.

Syntax

INT_X F_Write_Byte_to_RAM( INT_X addr, BYTE data )

Input

INT X addr : address of byte to be written (byte addressable) BYTE data : byte to be written

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Use the FPA to write two bytes to the target device’s RAM. This write is not verified (no read performed). Use F Read Word16 to verify.

Syntax

INT_X F_Write_Word16_to_RAM( INT_X addr, INT_X data )

Input

INT X addr : address of 16-bit data to be written (byte addressable) INT X data : 16-bit data to be written

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Use the FPA to write four bytes to the target device’s RAM. This write is not verified (no read performed). Use F Read Word32 to verify.

Syntax

INT_X F_Write_Word32_to_RAM( INT_X addr, INT_X data )

Input

INT X addr : address of 32-bit data to be written (byte addressable) INT X data : 32-bit data to be written

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Use the FPA to write a block of bytes to RAM. Currently this function only writes a block of bytes with a size that is a multiple of four, to a 32-bit word aligned address. These writes are not verified (no reads performed). Use F Read Bytes Block to verify.

Syntax

INT_X F_Write_Bytes_Block_to_RAM( INT_X addr, INT_X size, BYTE *data )

Input

INT X addr : address of 32-bit data to be written (byte addressable) INT X size : number of bytes to be written

BYTE *data : array of bytes to be written (not verified)

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

  • STATUS ADDR ALIGNMENT ERROR (543) : not 32-bit word aligned address

  • STATUS SIZE ALIGNMENT ERROR (544) : number of bytes not a multiple of four

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Use the FPA to read one byte from any address (RAM, flash, etc.).

Syntax

INT_X F_Read_Byte( INT_X addr )

Input

INT X addr : address of byte to be read

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : data read

0-0xFF : byte value

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus(avoid this by not using FPA index 0)

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range(avoid this by using F Check FPA index first)

...

General Description

Use the FPA to read two bytes from any address (RAM, flash, etc.).

Syntax

INT_X F_Read_Word16( INT_X addr )

Input

INT X addr : address of 16-bit word to be read

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : data read

0-0xFFFF : 16-bit word value

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus(avoid this by not using FPA index 0)

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range(avoid this by using F Check FPA index first)

...

General Description

Use the FPA to read four bytes from any address (RAM, flash, etc.).

Syntax

INT_X F_Read_Word32( INT_X addr )

Input

INT X addr : address of 32-bit word to be read

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : data read

0-0xFFFFFFFF : 32-bit word value

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus(avoid this by not using FPA index 0)

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range(avoid this by using F Check FPA index first)

...

General Description

Use the FPA to read a block of bytes from any address (RAM, flash, etc.).

Syntax

INT_X F_Read_Bytes_Block( INT_X addr, INT_X size, BYTE *data );

Input

INT X addr : first byte address to be read (byte addressable) INT X size : number of bytes to be read

BYTE *data : array of bytes that will be written with memory contents

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Start target MCU from specified program counter (PC). There should be a valid instruction at the target address.

Syntax

INT_X F_Set_PC_and_RUN( INT_X PC_addr )

Input

INT X PC addr : set program counter to this address and start processor

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

TRUE (1) : succeeded

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Write to non-volatile memory protection bits and/or persistent user-data registers (if supported). Does not block communication over debug interface, but can disable writing and/or reading from target device’s memory. These bits can be reset to factory settings using the F Clear Locked Device function if the device supports it. To write protection bits, enable the WriteLockingBitsEn config- uration option.

Syntax

INT_X F_Write_Locking_Registers( void )

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Write to non-volatile protection bits to disable communication over debug interface. These bits can be reset to factory settings using the F Clear Locked Device function if the device supports it. To disable debug access, enable WriteLockingBitsEn and (vendor) USER DBG WrEn configuration options.

Syntax

INT_X F_Write_Debug_Register( void )

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed

  • TRUE (1) : succeeded

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range

...

General Description

Return the MCU ID, flash size, or RAM size read by the FPA to identify a specific target device, if supported by vendor.

Syntax

INT_X F_Get_MCU_Data( INT_X type )

Input

INT X type : select type of information to receive

GET MCU ID (1) : connected MCU package identifier (MCU family and group, etc.), not a unique silicon ID

  • GET MCU FLASH SIZE (2) : connected MCU flash size, if available

  • GET MCU RAM SIZE (3) : connected MCU RAM size, if available

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed. No communication or incorrect parameters.

  • any postive value: MCU ID, flash size, RAM size

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus(avoid this by not using FPA index 0)

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range(avoid this by using F Check FPA index first)

...

General Description

Read program counter (PC) register using debug interface.

Syntax

INT_X F_Capture_PC_Addr( void );

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed.

  • any postive value: program counter

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus(avoid this by not using FPA index 0)

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range(avoid this by using F Check FPA index first)

...

General Description

Stop target device (debug enable and halt).

Syntax

INT_X F_Synch_CPU_JTAG();

Input

none.

Select FPA to perform operation on using F Set FPA index, index 1 to 64.Use index 0 to perform operation on all FPAs (if results differ, use F LastStatus to get individual results).

Output

INT X : result of operation

  • FALSE (0) : failed.

  • TRUE (1) : succeeded. MCU stopped.

FPA UNMATCHED RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to F LastStatus(avoid this by not using FPA index 0)

FPA INVALID NO (-2 or 0xFFFFFFFE) : FPA not opened with F OpenInstancesAndFPAs or index out of range(avoid this by using F Check FPA index first)