_program_inactive_secondary Function

Programs the inactive partition PRAM with the specified image.

Include

<libpic30.h>

Prototype

int _program_inactive_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 PRAM images not following the Microchip language tool format will require a custom routine.

Return Value

Remarks

The Main core loads the PRAM inactive partition while the Secondary core is running and then the Secondary core executes the BOOTSWP instruction to swap partitions.

Default Behavior

The _program_inactive_secondary routine uses the verify parameter as a switch to either load or verify the inactive partition image using the LDSEC or VFSEC instructions.

File

program_inactive_secondary.c (in libpic30.zip>data_init_dualch.S)