AnsweredAssumed Answered

MK10 series P-Flash question about Read/Write for bootload

Question asked by Eunseok Jung on Mar 2, 2015
Latest reply on Mar 4, 2015 by Kerry Zhou

Hi all.

I have trouble to writing p-flash area for coding bootload.

Basically my code is depending on AN2295 SW.

I want to write some word like 0x2143. But it is not writing at the address 0x0410. It is written at 0x1FFF8000. Here is SRAM area.

 

My modified code is blow:

 

__attribute__((section(".programbuff"))) Byte buffer[200];

FCC0B_STR CommandObj;

#define FLASH_FlashCommandSequence ((LWord (*)(Byte))&buffer[1])

 

FLASH_ProgramLongWord(destination, *pSource++)

{

    CommandObj.regsLong.fccob3210 = destination;

    CommandObj.regs.fccob0 = FLASH_PROGRAM_LONGWORD;

    CommandObj.regsLong.fccob7654 = data32b;

  return FLASH_FlashCommandSequence(PROGRAM_LONGWORD_INDEX);

}

 

I set the destination 0x410

*pSource is data array pointer.

But it write at 0x1FFF8000 not 0x0410.

 

Error message is this: No source available for "0x1FFF8000 (0x1FFF8000)() "

 

 

What is meaning of #define FLASH_FlashCommandSequence((LWord (*)(Byte))&buffer[1]) ?

Why i need this? and What is FCC0B STR CommandObj? I can't understand this meaning.

And my syntax is right?

 

Do you have idea?

 

Thank you.

Eunseok.

Attachments

Outcomes