Monitor functions for SAM-BA on SAM0 Port of rom monitor functions from legacy sam-ba software.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <string.h>
#include "sam_ba_monitor.h"
#include "usart_sam_ba.h"
#include "conf_board.h"
Data Structures | |
struct | t_monitor_if |
Functions | |
void | call_applet (uint32_t address) |
Execute an applet from the specified address. More... | |
void | sam_ba_monitor_init (uint8_t com_interface) |
This function initializes the SAM-BA monitor. More... | |
void | sam_ba_monitor_run (void) |
This function starts the SAM-BA monitor. More... | |
void | sam_ba_putdata_term (uint8_t *data, uint32_t length) |
This function allows data rx by USART. More... | |
Variables | |
volatile bool | b_terminal_mode = false |
uint8_t | command |
uint32_t | current_number |
uint8_t | data [SIZEBUFMAX] |
uint32_t | i |
uint8_t | j |
uint32_t | length |
uint8_t * | ptr |
uint8_t * | ptr_data |
t_monitor_if * | ptr_monitor_if |
const char | RomBOOT_Version [] = SAM_BA_VERSION |
volatile uint32_t | sp |
uint32_t | u32tmp |
const t_monitor_if | uart_if |
const t_monitor_if | usbcdc_if |
void call_applet | ( | uint32_t | address | ) |
Execute an applet from the specified address.
address | Applet address |
References cpu_irq_disable, and sp.
Referenced by sam_ba_monitor_run().
void sam_ba_monitor_init | ( | uint8_t | com_interface | ) |
This function initializes the SAM-BA monitor.
Initialize the monitor.
com_interface | Communication interface to be used. |
References SAM_BA_INTERFACE_USART, and SAM_BA_INTERFACE_USBCDC.
Referenced by main().
void sam_ba_monitor_run | ( | void | ) |
This function starts the SAM-BA monitor.
Main function of the SAM-BA Monitor.
References b_terminal_mode, call_applet(), command, cpu_irq_enable, current_number, data, t_monitor_if::getdata, t_monitor_if::getdata_xmd, i, j, length, min, ptr, ptr_data, t_monitor_if::putdata, t_monitor_if::putdata_xmd, RomBOOT_Version, sam_ba_putdata_term(), SIZEBUFMAX, sp, and u32tmp.
Referenced by main().
void sam_ba_putdata_term | ( | uint8_t * | data, |
uint32_t | length | ||
) |
This function allows data rx by USART.
*data | Data pointer |
length | Length of the data |
References b_terminal_mode, i, and t_monitor_if::putdata.
Referenced by sam_ba_monitor_run().
Referenced by sam_ba_monitor_run(), and sam_ba_putdata_term().
uint8_t command |
Referenced by sam_ba_monitor_run().
uint32_t current_number |
Referenced by sam_ba_monitor_run().
uint8_t data[SIZEBUFMAX] |
Referenced by putPacket(), and sam_ba_monitor_run().
uint32_t i |
Referenced by _extint_disable(), _extint_enable(), _sercom_get_sercom_inst_index(), _sercom_set_handler(), _system_extint_init(), _usb_device_interrupt_handler(), extint_disable_events(), extint_enable_events(), extint_is_syncing(), putPacket(), sam_ba_monitor_run(), sam_ba_putdata_term(), sleepmgr_init(), system_pinmux_group_set_config(), udc_req_std_dev_get_str_desc(), usart_init(), usart_putdata(), usart_read_buffer_wait(), usart_write_buffer_wait(), and usb_init().
uint8_t j |
Referenced by _system_extint_init(), extint_disable_events(), extint_enable_events(), sam_ba_monitor_run(), and usb_init().
uint32_t length |
Referenced by _usart_read_buffer(), _usart_write_buffer(), getbytes(), sam_ba_monitor_run(), usart_getdata_xmd(), usart_putdata(), and usart_putdata_xmd().
uint8_t * ptr |
Referenced by sam_ba_monitor_run().
uint8_t * ptr_data |
Referenced by sam_ba_monitor_run(), usart_getdata_xmd(), and usart_putdata_xmd().
t_monitor_if* ptr_monitor_if |
const char RomBOOT_Version[] = SAM_BA_VERSION |
Referenced by sam_ba_monitor_run().
volatile uint32_t sp |
Referenced by call_applet(), and sam_ba_monitor_run().
uint32_t u32tmp |
Referenced by sam_ba_monitor_run().
const t_monitor_if uart_if |
const t_monitor_if usbcdc_if |