That code (HCS12XDP512) runs in debug mode (single step) fine but not in contiues mode. Any idea where the error could be? Thanks a lot!
#pragma CODE_SEG .data
static void LaunchCommand(void)
{
// launch flash command
FSTAT_CBEIF = 1;
// wait for command completion
do
{
} while (!FSTAT_CCIF);
}
#pragma CODE_SEG NON_BANKED
:
:
UInt16 *pDestination = (UInt16 *)0x8000;
PPAGE = 0xE0;
FSTAT = 0x32; // clear error flags
*pDestination = *pSource; // write data to address
FCMD = 0x20; // program command
__asm SEI; // disable interrupts
LaunchCommand(); // call routine in RAM
__asm CLI; // enable interrupts
pSource++;
pDestination++;
:
#pragma CODE_SEG DEFAULT