...
Blank check is enabled by default but can be disabled to save time by disabling configuration option https://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57802857/General+Configuration#EnableBlankCheck General Configuration | EnableBlankCheck .
The target device can be locked at the end of this procedure if https://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57770239/Memory + Protection +Overview#WriteLockingBitsEnConfiguration | WriteLockingBitsEn is enabled. Even if enabled, custom MCU protection bits need to be configured (check Memory Protection section in this Guide for your vendor)
...
Code Block | ||
---|---|---|
| ||
INT_X F_AutoProgram( INT_X mode = 0 ); |
Input
INT_X mode : for future use (currently has no effect)
Select FPA to perform operation on using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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
2. F_Verify_Access_to_MCU
Anchor | ||||
---|---|---|---|---|
|
...
Determine if FPA has successfully established communication with the target device. This step requires a working connection, a read of the processor ID, RAM 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.
If https://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57802857/General+Configuration#MetadataWrnIsErr General Configuration | MetadataWrnIsErr is disabled, only the processor ID needs to match records, the RAM and flash size do not. If the RAM and flash do not match a warning will be printed and accessible via Generic Functions | F_ReportMessage.
If https://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57802857/General+Configuration#MetadataWrnIsErr General Configuration | MetadataWrnIsErr is enabled, all values need to match, processor ID, RAM size, and flash size, otherwise function will fail.
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 https://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57770414/Encapsulated+Functions#F 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 return values.
...
Select FPA to perform operation on using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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
3. F_Memory_Erase
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
INT_X F_Memory_Erase( INT_X mode = 0 ); |
Input
INT_X mode : type of memory erase operation
...
Select FPA to perform operation on using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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
4. F_Memory_Blank_Check
Anchor | ||||
---|---|---|---|---|
|
...
Select FPA to perform operation on using using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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
5. F_Memory_Write
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
INT_X F_Memory_Write( INT_X mode = 0 ); |
Input
INT_X mode : for future use (currently has no effect)
Select FPA to perform operation on using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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
6. F_Memory_Verify
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
INT_X F_Memory_Verify( INT_X mode = 0 ); |
Input
INT_X mode : for future use (currently has no effect)
Select FPA to perform operation on using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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
7. F_Memory_Read
Anchor | ||||
---|---|---|---|---|
|
...
FlashPro-ARM - store in Read Data Buffer shown in https://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57704798/Data+Buffer+Functions#FlashPro-ARM-buffers
GangPro-ARM - store in Gang Read Buffers shown inhttps://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57704798/Data+Buffer+Functions#GangPro-ARM-buffers
...
Select FPA to perform operation on using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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
8. F_Lock_MCU
Anchor | ||||
---|---|---|---|---|
|
...
Select FPA to perform operation on using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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 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
9. F_Clear_Locked_Device
Anchor | ||||
---|---|---|---|---|
|
...
Will attempt to return MCU 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 https://elprotronic.atlassian.net/wiki/spaces/FPGPARM/pages/57770414/Encapsulated+Functions#F Encapsulated Functions | F_Lock_MCU function.
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 return values.
...
Select FPA to perform operation on using Multi API-DLL Functions | F_Set_FPA_index, index 1 to 64. Use index 0 to perform operation on all FPAs (if results differ, use Multi API-DLL Functions | F_LastStatus to get individual results).
...
FALSE (0) : failed
FlashPro-ARM - TRUE (1) : succeeded
GangPro-ARM - 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