fib-bootloader.h

Go to the documentation of this file.
00001 /** @file hal/micro/cortexm3/bootloader/fib-bootloader.h
00002  * @brief Definition and description of FIB bootloader shared functions.
00003  *
00004  * <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved.        -->
00005  */
00006 
00007 #ifndef __FIB_BOOTLOADER_H__
00008 #define __FIB_BOOTLOADER_H__
00009 
00010 //------------------------------------------------------------------------------
00011 // Reset signatures.
00012 
00013 #define FIB_RESET_GO_ZERO          0xF00F0100
00014 // Reset signatures 0xF00F0100 to 0xF00F010F can be chosen using the go command.
00015 #define FIB_RESET_GO_JUMP          0xF00F0110
00016 #define FIB_RESET_BAUD_RATE        0xF00F0111
00017 #define FIB_RESET_READ_UNPROTECT   0xF00F0112
00018 #define FIB_RESET_GPIO_BOOTMODE    0xF00F0113
00019 #define FIB_RESET_PART_DATA        0xF00F0114
00020 #define FIB_RESET_NMI_HARD_FAULT   0xF00F0115
00021 
00022 //------------------------------------------------------------------------------
00023 // Status values.
00024 
00025 typedef int32u FibStatus;
00026 
00027 #define FIB_SUCCESS             0
00028 #define FIB_ERR_UNALIGNED       1
00029 #define FIB_ERR_INVALID_ADDRESS 2
00030 #define FIB_ERR_INVALID_TYPE    3
00031 #define FIB_ERR_WRITE_PROTECTED 4
00032 #define FIB_ERR_WRITE_FAILED    5
00033 #define FIB_ERR_ERASE_REQUIRED  6
00034 #define FIB_ERR_VERIFY_FAILED   7
00035 
00036 //------------------------------------------------------------------------------
00037 // Erase types.
00038 
00039 typedef int32u FibEraseType;
00040 
00041 #define MFB_MASS_ERASE 0x01
00042 #define MFB_PAGE_ERASE 0x02
00043 #define CIB_ERASE      0x03
00044 
00045 #define DO_ERASE  0x0100
00046 #define DO_VERIFY 0x0200
00047 
00048 //------------------------------------------------------------------------------
00049 // Shared flash functions.
00050 
00051 FibStatus fibFlashWrite(int32u address, int8u *data,
00052                         int32u writeLength, int32u verifyLength);
00053 
00054 FibStatus fibFlashErase(FibEraseType eraseType, int32u address);
00055 
00056 #endif //__FIB_BOOTLOADER_H__

Generated on Mon Apr 11 14:23:40 2011 for Contiki 2.5 by  doxygen 1.6.1