...
These functions require that all FPAs are opened using the Multi API-DLL function F_OpenInstancesAndFPAs and each API-DLL instance is correctly initialized using Generic Functions. 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.
Encapsulated functions use the following sequence:
...
This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_AutoProgram( INT_X mode = 0 ); |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range
...
This function is internally called by all other encapsulated functions at startup before they proceed to perform any other operations. Therefore if this function fails, other encapsulated functions will invariably fail as well. The exception is Encapsulated Functions | F_Clear_Locked_Device which uses a custom procedure to unlock the MCU (if supported by vendor). This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_Verify_Access_to_MCU( void ); |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range
...
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 https://elprotronic.atlassian.net/wiki/spaces/FPGPARMFPGPM/pages/5777041496734882/Encapsulated+Functions#F_AutoProgram and this function. Custom writes using Data Buffer Functions or Sequential Functions will not retain data. This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_Memory_Erase( INT_X mode = 0 ); |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | 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. This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_Memory_Blank_Check( void ); |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range
...
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 Data Buffer Functions. An enabled configuration option, https://elprotronic.atlassian.net/wiki/spaces/FPGPARMFPGPM/pages/5780285796734622/General+Configuration#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. This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_Memory_Write( INT_X mode = 0 ); |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range
...
Verify target device’s memory contents against Code Buffer. The memory used for verification depends on configuration settings, and is identical to sections of memory being programmed using https://elprotronic.atlassian.net/wiki/spaces/FPGPARMFPGPM/pages/5777041496734882/Encapsulated+Functions#F_Memory_Write. For common behavior, do not modify settings between calling https://elprotronic.atlassian.net/wiki/spaces/FPGPARMFPGPM/pages/5777041496734882/Encapsulated+Functions#F_Memory_Write and this function. This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_Memory_Verify( INT_X mode = 0 ); |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range
...
Read target device’s memory contents.
FlashPro-ARMM - store in Read Data Buffer shown in https://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57704798/Data+Buffer+Functions#FlashPro-ARM- Data Buffer Functions | FlashPro M buffers
GangPro-ARMM - store in Gang Read Buffers shown inhttps://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57704798/Data +Buffer+Functions#GangPro-ARM-Buffer Functions | GangPro M buffers
The sections of memory read depend on configuration settings. Use Data Buffer Functions to access the contents of this buffer after this function has completed. This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_Memory_Read( void ); |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range
...
This function can write memory protection bits and disable debug access. Performs the functions Sequential 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). If https://elprotronic.atlassian.net/wiki/spaces/FPGPARMFPGPM/pages/5777023996734671/Memory+Protection+Overview#WriteLockingBitsEnConfiguration#WriteLockingBitsEn is not enabled this function will not perform any action.
This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_Lock_MCU( void ) |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range
...
This procedure is not supported by all target devices, or a target device might be permanently locked with settings that are not reversible. This function has some exclusive GangPro-ARM M return values.
Syntax
Code Block | ||
---|---|---|
| ||
INT_X F_Clear_Locked_Device( void ); |
...
FALSE (0) : failed
FlashPro-ARMM - TRUE (1) : succeeded
GangPro-ARM M - TRUE MASK (0x01..0x3F) : 0x01 - target 1, 0x02 - target 2, 0x04 - target 3, 0x08 - target
4, 0x10 - target 5, 0x20 - target 6FPA_UNMATCHED_RESULTS (-1 or 0xFFFFFFFF) : Result of operation inconsistent across all selected FPAs, refer to Multi API-DLL Functions | F_LastStatus
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range