IntFLASH
 
 
 Bean IntFLASH
 
Internal FLASH

Events are functions called when some important event occurred and its processing starts.

Events:

  • EventModule - Name of the user module (without extension), where the events from this bean are placed.
  • Events for Freescale HCS12/HCS12X/56800 derivatives, Fujitsu 16LX and National Semiconductor microcontrollers.
    • OnWritePageEnd - Event is called after entire virtual page is written to FLASH. This event is only available when Virtual page property is enabled.

        ANSIC prototype: void OnWritePageEnd(void)
      • Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.

    • OnWriteEnd - Event is called after byte is written to FLASH.

        ANSIC prototype: void OnWriteEnd(void)
      • Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.

  • Events for Freescale HCS12/HCS12X/HCS08 derivatives, Fujitsu 16LX and National Semiconductor microcontrollers.
    • OnSaveBuffer - Event is called when it is needed to save the content of FLASH before erasing it. This event is only available when item Safe write is selected in Write method property and "Buffer type" property is set to "Implemented by the user" value. It could be called twice during the write operation depending on the location of the written data inside of the flash sector. The total sum of bytes to save never exceeds the size of the flash sector. Calling order of OnSaveBuffer and OnRestoreBuffer events also depends on the size and location of the written data.

        ANSIC prototype: void OnSaveBuffer(dword Addr,word Size)
      • Addr:dword - Address in FLASH
      • Size:word - The size of a buffer to save

    • OnRestoreBuffer - Event is called after the erasure of the sector, which is needed to be modificated. The data backuped should be restored by the event. RestoreToFlash method is used for such a purpose (other write-to-FLASH methods returns an error when called during this event). This event is available only if item Safe write is selected in Write method property and "Buffer type" property is set to "Implemented by the user" value.

        ANSIC prototype: void OnRestoreBuffer(dword Addr,word Size)
      • Addr:dword - Address in FLASH
      • Size:word - The size of a buffer to restore

    • OnEraseError - Event is called when a sector erase error occurred. This event allows user to deallocate the buffer with the stored data, even the OnRestoreBuffer event is not called because FLASH erase error. This event is only available when Safe write is selected in Write method property.

        ANSIC prototype: void OnEraseError(void)


For each generated event it is possible to set:



Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.