Microchip® Advanced Software Framework

main.c File Reference

SAM SAM-BA Bootloader.

Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <string.h>
#include "conf_board.h"
#include "conf_clocks.h"
#include "conf_bootloader.h"
#include "sam_ba_monitor.h"
#include "usart_sam_ba.h"

Macros

#define DEBUG_PIN_HIGH   do{}while(0)
 
#define DEBUG_PIN_LOW   do{}while(0)
 

Functions

static void check_start_application (void)
 Check the application startup condition. More...
 
int main (void)
 SAM-BA Main loop. More...
 

#define DEBUG_PIN_HIGH   do{}while(0)

Referenced by main().

#define DEBUG_PIN_LOW   do{}while(0)

Referenced by main().

static void check_start_application ( void  )
static

Check the application startup condition.

Test reset vector of application +4 Stay in SAM-BA if *(APP_START+0x4) == 0xFFFFFFFF Application erased condition

References APP_START_ADDRESS, BOOT_LOAD_PIN, and GPIO_BOOT_PIN_MASK.

Referenced by main().