AnsweredAssumed Answered

Flash operations result in "No source available for ..." 

Question asked by Nikolai Baschinski on Apr 4, 2017
Latest reply on Apr 9, 2017 by Daniel Martynek

Hi,

I am currently developing a flash driver for the S12Z and I need your help. All flash operations result in "No source available for "0xBC6192 (0xBC6192)() " ".

I can step over all c instructions. Everything works fine while debugging. The flash is erased/written properly. If I run without breakpoints, it results in "No source available for "0xBC6192 (0xBC6192)() " "

Here are my function. Before calling I check the CCIF flag for being TRUE. Can anybody see a bug?

void flash_erase_sector(uint16 address)
{

    FSTAT = 0x30;    // clear ACCERR and PVIOL
    FCCOBIX = 0x01;
    FCCOB0HI = 0x0A; // erase pflash sector
    FCCOB0LO = (uint8)((address & 0x00FF0000) >> 16);
    FCCOB1 = (uint16)(address & 0x0000FFFF);
    FSTAT_CCIF = 1;         // launch command
}

void flash_write_phrase(uint16 address, uint8* data)
{
    FSTAT = 0x30;    // clear ACCERR and PVIOL
    FCCOBIX = 5;     // write 8 bytes (1 phrase)
    FCCOB0HI = 0x06; // write command
    FCCOB0LO = (uint8)((address & 0x00FF0000) >> 16);
    FCCOB1 = (uint16)(address & 0x0000FFFF);
    FCCOB2 = *((uint16*)data);
    FCCOB3 = *((uint16*)(data+2));
    FCCOB4 = *((uint16*)(data+4));
    FCCOB5 = *((uint16*)(data+6));
    FSTAT_CCIF = 1;           // launch command
}

After crashing the error flags ACCERR and FPVIOL are FALSE (0). The FDIV is set to 0x0F (16 MHz bus clock). All EEPROM operations are working fine and are programmed the same way.

Any idea? Thank you very much.

Outcomes