EasyManua.ls Logo

Elprotronic MSP430 - Example with Multi-FPA API DLL

Default Icon
119 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
{
................................................
}
} while(1); //make an infinite loop until last target device programmed
.................................................................
//– functions below called at the end of session
F_CloseInstances();
Note: The F_OpenInstancesAndFPAs(..) and F_Initialization() functions should be called once
and the startup and the F_CloseInstances() function should be called as the last one after all
functions are finished in similar way like the FlashPro430 GUI software is opening once
and closed at the end when job is finished. The startup initialization take few seconds (when
the F_OpenInstancesAndFPAs(..) and F_Initialization() are executed) until dll
installation is established and desired firmware downloaded to FPA adapter(s). Application
software should call the initialization procedures at the startup only, and close access to API-
DLL at the end, when all tests of a lot of units are finished. Closing instances and opening
it again is a waist a time.
3.2 Example with Multi-FPA API DLL
The code example described below uses Multi-FPA API-DLL. The multi-FPA API-DLL is a shell
that allows to transfer incoming instructions from application software to desired FPA’s. All
instructions related to single FPA are detailed described in the chapters 4.2, 4.3, 4.4 and 4.4.
Instructions specific to Multi-FPA features described in the chapter 4.1.
Application DLL should be initialized first, before other DLLs instruction can be used.
response = F_OpenInstancesAndFPAs( FPAs-setup.ini );
// DLL and FPA initialization
if( response == 0 )
{
//The FPA has not been found. Exit from the program.
}
F_Set_FPA_index( ALL_ACTIVE_FPA ); // select all FPA’s
F_Initialization( ); // init all FPA’s
In example above number of the opened USB-FPAs are specified in the ‘FPAs-setup.ini’
Below is an example of the simplified (without error handling procedures) application program
written in C++ that allows to initialize all dlls and FPA, and run an autoprogram with the same
features like autoprogram in the standard FlashPro430 application software.
30

Table of Contents