AtMega CAN Bootloader
Well documented CAN-based bootloader for AtMega processors
Functions | Variables
<canbootloader.c>: Main bootloader file.

Functions

void bootProgramPage (uint32_t address, uint8_t *buf)
 Write temporary buffer to flash. More...
 
void clearFlashBuffer ()
 Clear the flash pagebuffer.
 
void startApplication ()
 Jump to application. More...
 
int main ()
 Main bootloader code.
 

Variables

uint8_t flashblock [SPM_PAGESIZE]
 
uint8_t currentPage = 0
 
uint32_t currentPageByte = 0
 

Detailed Description

This is the main file for the CAN bootloader.

Function Documentation

◆ bootProgramPage()

void bootProgramPage ( uint32_t  address,
uint8_t *  buf 
)

Write temporary buffer to flash.

Parameters
addressPage address to write to.
bufPointer to page buffer.

◆ startApplication()

void startApplication ( )

Jump to application.

Moves the interrupts to the application section and jumps to the application section (0x0000).

Variable Documentation

◆ currentPage

uint8_t currentPage = 0

Current flashpage that is used.

◆ currentPageByte

uint32_t currentPageByte = 0

Current byte used in current page

◆ flashblock

uint8_t flashblock[SPM_PAGESIZE]

Temporary flash buffer