Hi Bill,
I've created a project with the wizard including Processor Expert.
I've added the intFlash bean and enabled the SetByteflash and Getbyteflash function.
In the main.c file I've added the code:
/* Erase whole sector - necessary only if Write mode property is set to "Write" */
Err = IFsh1_EraseSector(0xE000);
/* Write number 28 to address 0xE000 */
Err = IFsh1_SetByteFlash(0xE000, 28);
/* Read contents of internal FLASH array on address
0xE000 and write it to variable Data */
Err = IFsh1_GetByteFlash(0xE000, &Data);
This is working fine on my board.
I see in the flash memory the value 1C at 0xE000.
I've disassembled the IFsh1.c file and got:
DISASSEMBLY OF: '.text' FROM 1036 TO 1905 SIZE 869 (0X365)
Opening source file 'F:/Temp_bis/Community/331964/MCU_10.6/test_pt60\Generated_Code\IFsh1.c'
121: static void FnCmdInRam_(void)
FnCmdInRam_:
00000000 A680 LDA #0x80
00000002 C70000 STA NVM_FSTAT
124: while (NVM_FSTAT_CCIF == 0U) {} /* Wait to command complete */
00000005 C60000 LDA NVM_FSTAT
00000008 2AFB BPL *-3 ;abs = 0x0005
126: }
0000000A 81 RTS
the size of the function is 0xA =10.
Have a great day,
Pascal Irrle
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------