- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# start_boot.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | GOTOBOOTKEY 0x55AAAA55
## Functions
void | start_boot (void)
void | start_boot_if_required (void)
void | goto_boot (void)
## Variables
__no_init U32 | boot_key

## Detailed Description

This file contains the routines to jump in ISP mode - Compiler: IAR EWAVR and GNU GCC for AVR

- Supported devices: AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
  Author:
    Atmel Corporation: http://www.atmel.com
    Support and FAQ: http://support.atmel.no/

Definition in file start_boot.h.

## Define Documentation

#define GOTOBOOTKEY 0x55AAAA55

Definition at line 45 of file start_boot.h.

Referenced by start_boot_if_required().

## Function Documentation

void start_boot | ( | void |  | ) |

This function will start the on-chip bootloader after a watchdog timer reset.

The function set a special key in sram (uninitialized during mcu start-up execution) and performs a mcu watchdog timer reset. This function should be called when a special eve,t is detected in the application that requires the bootloader activation. When this function is used, be sure to implement the "start_boot_if_required()" function at the begining of main().

Definition at line 78 of file start_boot.c.

References boot_key, wdtdrv_enable(), and WDTO_500MS.

    00079 {
    00080    boot_key=0x55AAAA55;
    00081
    00082    // Enable the WDT for reset mode
    00083    wdtdrv_enable(WDTO_500MS);
    00084    while(1);
    00085 }

Here is the call graph for this function:

void start_boot_if_required | ( | void |  | ) |

This function calls the on-chip bootloader.

The function starts the on-chip bootloader if the application has posted such a request. This function sould be inserted at the begining of the main function.

Jumping to bootloader

Definition at line 93 of file start_boot.c.

References boot_key, and GOTOBOOTKEY.

    00094 {
    00095   if(boot_key==GOTOBOOTKEY)
    00096   {
    00097       boot_key = 0;
    00098       (*start_bootloader)();
    00099   }
    00100 }

void goto_boot | ( | void |  | ) |

This function jump to on-chip bootloader without CPU reset.

Jumping to bootloader

Definition at line 105 of file start_boot.c.

    00106 {
    00107    (*start_bootloader)();
    00108 }

## Variable Documentation

__no_init U32 boot_key

Referenced by start_boot(), and start_boot_if_required().