4.8.2 _program_secondary Function
Programs the Secondary core with the specified image.
Include
<libpic30.h>
Prototype
int _program_secondary(int secondary_number, int verify, __eds__
unsigned char *image)
Arguments
secondary_number
|
Identifier of the Secondary core to be
programmed. The identifier for the first Secondary core is
1 . |
verify
|
A 0 will load the entire
Secondary image to the PRAM. A 1 will verify the entire
image in the PRAM. |
*image |
Pointer to the image to be programmed into
PRAM. Secondary core PRAM images not following the Microchip language tool format will require a custom routine. |
Return Value
- ESLV_INVALID - returned if an invalid Secondary core number is given
- ESLV_BAD_IMAGE - returned if there is an error decoding the Secondary core image
- ESLV_VERIFY_FAIL - returned if 'verify' fails
Remarks
None.
Default Behavior
The _program_secondary
routine uses the verify
parameter as a switch to either load or verify the Secondary core PRAM image using the
LDSEC
or VFSEC
instructions.
File
program_secondary.c (in libpic30.zip>data_init_dualch.S)