Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
driver_examples/flash/main.c File Reference
#include <string.h>
#include <stdio.h>
#include "board.h"
#include "main.h"
#include "fsl_debug_console.h"

Functions

int main (void)
 Use Standard Software Drivers (SSD) to modify flash. More...
 
void error_trap (void)
 

Variables

uint8_t buffer [BUFFER_SIZE_BYTE]
 
pFLASHCOMMANDSEQUENCE g_FlashLaunchCommand
 
uint16_t ramFunc [LAUNCH_CMD_SIZE/2]
 
FLASH_SSD_CONFIG flashSSDConfig
 

Function Documentation

void error_trap ( void  )
int main ( void  )

Function prototype for main function.

This function uses SSD to demonstrate flash mode:

  • Check flash information.
  • Erase a sector and verify.
  • Program a sector and verify.

Return code from each SSD function

Address of the target location

Return protection status

Number of longword or phrase to be verified

0=normal, 1=user, 2=factory - margin read for reading

Variable Documentation

uint8_t buffer[BUFFER_SIZE_BYTE]
FLASH_SSD_CONFIG flashSSDConfig
pFLASHCOMMANDSEQUENCE g_FlashLaunchCommand

Buffer for program

uint16_t ramFunc[LAUNCH_CMD_SIZE/2]