|
PIC32 BootLoader
|
The functions are declared and defined state enumerations. More...
#include <p32xxxx.h>#include <string.h>#include <stdlib.h>#include <sys/attribs.h>

Go to the source code of this file.
Macros | |
| #define | NVM_PAGE_SIZE 1024 |
| #define | BYTE_PAGE_SIZE (4 * PAGE_SIZE) |
| #define | ROW_SIZE 128 |
| #define | BYTE_ROW_SIZE (4 * ROW_SIZE) |
| #define | NUM_ROWS_PAGE 8 |
| #define | APP_FLASH_BASE_ADDRESS 0x9D006000 |
| #define | APP_FLASH_END_ADDRES 0x9D00FFFF |
Typedefs | |
| typedef unsigned char | uint8_t |
| typedef unsigned short | uint16_t |
| typedef unsigned long | uint32_t |
| typedef unsigned int | uint_t |
| typedef enum SYSTEM_STATUS_Tag | SYS_STATE_t |
| Enumeral represents different system states. | |
| typedef enum SYSTEM_COM_PROTOCOL_MSG_Tag | SYS_COM_PROTOCL_MSG_t |
| Enumeral represents handshaking signals between programmer and controller. | |
Enumerations | |
| enum | SYSTEM_STATUS_Tag { SYS_WAIT_FOR_START_CMND, SYS_CONFIG_FLASH, SYS_RCV_FIRMWARE_HEADER, SYS_FIRMWARE_UPDATE, SYS_RUN_APPLCN, SYS_SND_ADDRS_RANGE } |
| Enumeral represents different system states. More... | |
| enum | SYSTEM_COM_PROTOCOL_MSG_Tag { SYS_START_CMND_FROM_PROGRMR = 0x01, SYS_READY_FOR_FIRMWARE_HEADER, SYS_FIRMWARE_HEADER_POS_ACK, SYS_FIRMWARE_HEADER_NEG_ACK, SYS_SND_NXT_CHUNK, SYS_ADDRESS_RANGE_TAG, SYS_ADDRESS_RANGE_RQT } |
| Enumeral represents handshaking signals between programmer and controller. More... | |
Functions | |
| void | runStateMachine (void) |
| function executes different states of the system. SYS_SND_ADDRS_RANGE - Send the PIC programmable start and end address of the program memory SYS_WAIT_FOR_START_CMND - The Start command triggers system to start the process and initializes buffer counter SYS_RCV_FIRMWARE_HEADER - Get the total packet count from the host and applcn start address SYS_CONFIG_FLASH - Erase application program area and update table pointer SYS_FIRMWARE_UPDATE - Receive and put the binary chunks in the flash memory SYS_RUN_APPLCN - Run the application | |
| void | initVarConfigPort (void) |
| void | runApplcn (void) |
| PC is updated with the new pointer to execute loaded binary from the application flash program memory. | |
Variables | |
| uint32_t | applStartAdd |
| uint8_t | totalNumberOfPacckets |
The functions are declared and defined state enumerations.
| #define APP_FLASH_BASE_ADDRESS 0x9D006000 |
NVM start adress.
| #define APP_FLASH_END_ADDRES 0x9D00FFFF |
NVM end adress.
Enumeral represents handshaking signals between programmer and controller.
| enum SYSTEM_STATUS_Tag |
Enumeral represents different system states.
| uint32_t applStartAdd |
Application start address.
| uint8_t totalNumberOfPacckets |
Variable holds the (size of the firmware/64) in bytes.
1.8.12