#include <avr32/io.h>
#include <stddef.h>
#include <string.h>
#include "compiler.h"
#include "board.h"
#include "conf_uart.h"
#include "conf_clocks.h"
#include "gpio.h"
#include "intc.h"
#include "usart.h"
#include "power_clocks_lib.h"
#include "flash_api.h"
#include "uart_dfu.h"
#include "boot.h"
#include "conf_isp.h"
#include "isp.h"
Functions | |
void | _unhandled_interrupt (void) |
Default interrupt handler. More... | |
static U8 | conv_ascii_to_hex (U8 *ascii) |
convert an ascii 2-byte data into a 1-byte hexdecimal value. More... | |
static U8 | Crc8 (U8 inCrc, U8 inData) |
static void | dump_dfu_packet (U8 data_nb_Bytes_left) |
static void | dump_dfu_packet_and_reset_dfu_state (U8 data_nb_Bytes_left) |
static void | erase_check_mem (void) |
Read n Bytes from the currently chosen memory and verify that each. More... | |
static void | force_isp (bool force) |
static U8 | get_and_check_mem_range_and_crc (req_header_t *req_header, U8 *checksum) |
Read and check the start address and the end address. Validate the checksum. More... | |
static bool | is_isp_forced (void) |
static void | mem_bootloader_read (void *dst, U32 src, size_t nbytes) |
Read the bootloader memory (i.e. the ISP version info) More... | |
static void | mem_configuration_read (void *dst, U32 src, size_t nbytes) |
Read nbytes GP fuse bit, copy each bit to a Byte. More... | |
static int | mem_configuration_write (U32 dst, const void *src, size_t nbytes) |
Write nbytes GP fuse bit (one Byte per bit) More... | |
static void | mem_flash_read (void *dst, U32 src, size_t nbytes) |
Read n Bytes from the internal Flash memory at address src and copy at address dst. More... | |
static int | mem_flash_write (U32 dst, const void *src, size_t nbytes) |
Write n Bytes from src to the internal Flash memory address dst. More... | |
static void | mem_intram_read (void *dst, U32 src, size_t nbytes) |
Read n Bytes from the internal page address src and copy to the address dst. More... | |
static void | mem_security_read (void *dst, U32 src, size_t nbytes) |
Write the value 1 to *dst if the security bit is set, else write 0. More... | |
static int | mem_security_write (U32 dst, const void *src, size_t nbytes) |
Set the security bit. More... | |
static void | mem_signature_read (void *dst, U32 src, size_t nbytes) |
Read the signature memory (i.e. the UC3 device info) More... | |
static void | mem_user_read (void *dst, U32 src, size_t nbytes) |
Read n Bytes from the user page address src and copy to the address dst. More... | |
static int | mem_user_write (U32 dst, const void *src, size_t nbytes) |
Write n Bytes from src to the user page address dst. More... | |
static void | parse_dfu_intel_hex_header (req_header_t *req_header, U8 *intel_hex_req_header, U8 *checksum) |
Parse a DFU Intel hex string and store info into a structure. This parser parses only the first 9 bytes of this structure (including the ':' character). More... | |
void | process_cmd_grp_data (req_header_t *req_header, U8 *checksum) |
Process commands under the CMD_GRP_DATA type. More... | |
void | process_cmd_grp_dnload (req_header_t *req_header, U8 *checksum) |
Process commands under the CMD_GRP_DOWNLOAD type. More... | |
void | process_cmd_grp_exec (req_header_t *req_header, U8 *checksum) |
Process commands under the CMD_GRP_EXEC type. More... | |
void | process_cmd_grp_select (req_header_t *req_header, U8 *checksum) |
Process commands under the CMD_GRP_SELECT type. More... | |
void | process_cmd_grp_upload (req_header_t *req_header, U8 *checksum) |
Process commands under the CMD_GRP_UPLOAD type. More... | |
static void | read_mem (void) |
Read address_range_nb_bytes Bytes from the currently selected memory. More... | |
static void | send_answer_frame (void) |
Build and send the answer frame. More... | |
static void | stop_dfu_and_reset (int forceisp) |
static int | uart_autobaud_process (void) |
Perform the UART autobaud process by using the synchronizer character sent by the external programmer. More... | |
static void | uart_configure (void) |
function used to configure the 4 potential USART candidates with the current PBA frequency. More... | |
static void | uart_convert16bit2ascii_write (U16 u16_val) |
Convert and write on the USART a 2-byte value into a 4 characters ascii string. More... | |
static void | uart_convertbyte2ascii_write (U8 *pdfu_buffer, int nb_bytes) |
Convert each Byte of a input buffer into a hexadecimal 2-ascii-character string and write each digit to the UART. More... | |
static void | uart_dfu_read_char (U8 *data) |
UART DFU read function (read + echo) More... | |
void | uart_dfu_start (void) |
Configure the USART, initialize the DFU and setup/calculate the autobaud. More... | |
static void | uart_dfu_stop (int forceisp) |
void | uart_execute_dfu_command (req_header_t *req_header, U8 *checksum) |
Execute the DFU command required by the external programmer tool. More... | |
U8 | uart_get_dfu_command (req_header_t *req_header) |
Get the DFU command from the external programmer tool. More... | |
static U16 | uart_read_16bits (U8 *checksum) |
static U8 | uart_read_Byte (U8 *checksum) |
static U8 | validate_checksum (U8 *checksum) |
Validate the checksum with the one read on the USART. More... | |
static void | vUSART_ISR (void) |
static void | vUSART_ISR_init (void) |
static void | write_mem (req_header_t *req_header, U8 *checksum) |
Receive the data from one intel-Hex frame and program the data to the. More... | |
#define CMD_BLANK_CHECK 0x01 |
Referenced by process_cmd_grp_upload().
#define CMD_ERASE 0x00 |
Referenced by process_cmd_grp_exec().
#define CMD_ERASE_ARG_CHIP 0xFF |
Referenced by process_cmd_grp_exec().
#define CMD_GRP_DATA 0x00 |
Referenced by uart_execute_dfu_command().
#define CMD_GRP_DNLOAD 0x01 |
Referenced by uart_execute_dfu_command().
#define CMD_GRP_EXEC 0x04 |
Referenced by uart_execute_dfu_command().
#define CMD_GRP_SELECT 0x06 |
Referenced by uart_execute_dfu_command().
#define CMD_GRP_UPLOAD 0x03 |
Referenced by uart_execute_dfu_command().
#define CMD_PROGRAM_START 0x00 |
Referenced by process_cmd_grp_dnload().
#define CMD_READ_MEMORY 0x00 |
Referenced by process_cmd_grp_upload().
#define CMD_SELECT_MEMORY 0x03 |
Referenced by process_cmd_grp_select().
#define CMD_SELECT_MEMORY_ARG_PAGE 0x01 |
Referenced by process_cmd_grp_select().
#define CMD_SELECT_MEMORY_ARG_UNIT 0x00 |
Referenced by process_cmd_grp_select().
#define CMD_START_APPLI 0x03 |
Referenced by process_cmd_grp_exec().
#define CMD_START_APPLI_ARG_NO_RESET 0x01 |
Referenced by process_cmd_grp_exec().
#define CMD_START_APPLI_ARG_RESET 0x00 |
Referenced by process_cmd_grp_exec().
#define DFU_ANSWER_CHKSUM_ERR 'X' |
Referenced by send_answer_frame().
#define DFU_ANSWER_END_CHAR1 '\r' |
Referenced by read_mem(), and send_answer_frame().
#define DFU_ANSWER_END_CHAR2 '\n' |
Referenced by read_mem(), and send_answer_frame().
#define DFU_ANSWER_EQUAL '=' |
Referenced by read_mem().
#define DFU_ANSWER_OK '.' |
Referenced by send_answer_frame().
#define DFU_ANSWER_RW_ERROR_SECURITY_SET 'L' |
Referenced by send_answer_frame().
#define DFU_ANSWER_UNKNOWN 'K' |
Answer codes.
Referenced by send_answer_frame().
#define DFU_ANSWER_WRITE_ERROR 'P' |
Referenced by send_answer_frame().
#define DFU_CMD_STATUS_errADDRESS 0x8 |
Referenced by get_and_check_mem_range_and_crc(), process_cmd_grp_dnload(), process_cmd_grp_upload(), and send_answer_frame().
#define DFU_CMD_STATUS_errBLANKCHECK 0x80 |
Referenced by erase_check_mem(), and send_answer_frame().
#define DFU_CMD_STATUS_errCHECKSUM 0x20 |
#define DFU_CMD_STATUS_errSECURITY_SET 0x2 |
Referenced by process_cmd_grp_dnload(), process_cmd_grp_upload(), and send_answer_frame().
#define DFU_CMD_STATUS_errUNEXPECTED 0x40 |
Referenced by process_cmd_grp_data(), process_cmd_grp_dnload(), and send_answer_frame().
#define DFU_CMD_STATUS_errUNKNOWN 0x4 |
#define DFU_CMD_STATUS_errWRITE 0x10 |
Referenced by process_cmd_grp_dnload(), send_answer_frame(), and write_mem().
#define DFU_CMD_STATUS_OK 0x1 |
Referenced by process_cmd_grp_dnload(), process_cmd_grp_upload(), send_answer_frame(), and uart_execute_dfu_command().
#define DFU_CMD_STATUS_OK_NORETCHAR 0x0 |
Referenced by process_cmd_grp_upload().
#define DFU_PACKET_START_CHAR ':' |
Referenced by uart_get_dfu_command().
#define DFU_STATE_IDLE 0 |
Referenced by dump_dfu_packet_and_reset_dfu_state(), and process_cmd_grp_dnload().
#define DFU_STATE_PROGRAM 1 |
Referenced by process_cmd_grp_data(), and process_cmd_grp_dnload().
#define DFU_SYNCHRO_CHAR 'U' |
Referenced by uart_autobaud_process(), and vUSART_ISR_init().
#define INTELHEX_MAX_DATA_LENGTH 0xFFu |
Referenced by write_mem().
#define ISP_ID0_ADDRESS 0x01 |
#define ISP_ID1_ADDRESS 0x02 |
#define ISP_INF_ITEM_COUNT (ISP_ID1_ADDRESS + 1) |
#define ISP_VERSION_ADDRESS 0x00 |
#define MEM_BOOTLOADER 0x04 |
Referenced by process_cmd_grp_select().
#define MEM_CONFIGURATION 0x03 |
Referenced by process_cmd_grp_select().
#define MEM_COUNT (MEM_INTRAM + 1) |
#define MEM_EEPROM 0x01 |
Referenced by process_cmd_grp_select(), and process_cmd_grp_upload().
#define MEM_FLASH 0x00 |
Referenced by process_cmd_grp_exec(), process_cmd_grp_select(), process_cmd_grp_upload(), and uart_dfu_start().
#define MEM_INTRAM 0x07 |
Referenced by process_cmd_grp_select(), and process_cmd_grp_upload().
#define MEM_SECURITY 0x02 |
Referenced by process_cmd_grp_select().
#define MEM_SIGNATURE 0x05 |
Referenced by process_cmd_grp_select().
#define MEM_USER 0x06 |
Referenced by process_cmd_grp_select(), and process_cmd_grp_upload().
#define POLYNOMIAL (ISP_CFG1_CRC8_POLYNOMIAL << 7) |
Calculates the CRC-8-CCITT.
CRC-8-CCITT is defined to be x^8 + x^2 + x + 1
To use this function use the following template:
crc = Crc8( crc, data );
Referenced by Crc8().
#define PRODUCT_INF_ITEM_COUNT (PRODUCT_REVISION_ADDRESS + 1) |
#define PRODUCT_MANUFACTURER_ID_ADDRESS 0x00 |
Referenced by uart_dfu_start().
#define PRODUCT_PART_NUMBER_LSB_ADDRESS 0x02 |
Referenced by uart_dfu_start().
#define PRODUCT_PART_NUMBER_MSB_ADDRESS 0x01 |
Referenced by uart_dfu_start().
#define PRODUCT_REVISION_ADDRESS 0x03 |
Referenced by uart_dfu_start().
#define UART_RX_BUFFER_SIZE 32 |
Referenced by uart_dfu_read_char(), vUSART_ISR(), and vUSART_ISR_init().
void _unhandled_interrupt | ( | void | ) |
Default interrupt handler.
Referenced by uart_dfu_stop(), and vUSART_ISR_init().
convert an ascii 2-byte data into a 1-byte hexdecimal value.
ascii | a pointer on the 2-byte data to convert. |
Referenced by parse_dfu_intel_hex_header(), and uart_read_Byte().
References POLYNOMIAL.
Referenced by force_isp().
|
static |
References send_answer_frame(), and uart_read_Byte().
Referenced by dump_dfu_packet_and_reset_dfu_state(), process_cmd_grp_dnload(), and write_mem().
|
static |
References DFU_STATE_IDLE, and dump_dfu_packet().
Referenced by process_cmd_grp_data(), process_cmd_grp_dnload(), process_cmd_grp_exec(), process_cmd_grp_select(), process_cmd_grp_upload(), uart_execute_dfu_command(), and write_mem().
|
static |
Read n Bytes from the currently chosen memory and verify that each.
References dfu_buffer, DFU_BUFFER_LENGTH_READ, DFU_CMD_STATUS_errBLANKCHECK, address_t::long_address, memory, MEMORY_ACCESS, and min.
Referenced by process_cmd_grp_upload().
|
static |
References Crc8(), ISP_CFG1, ISP_CFG1_CRC8_MASK, ISP_CFG1_CRC8_OFFSET, ISP_CFG1_FORCE_MASK, ISP_CFG1_FORCE_OFFSET, ISP_CFG1_OFFSET, and mem_user_write().
Referenced by uart_dfu_stop(), and uart_execute_dfu_command().
|
static |
Read and check the start address and the end address. Validate the checksum.
req_header | pointer on a structure containing the frame header information |
checksum | A pointer on a 8-bit value that contains the actual checksum. |
References current_page, DFU_CMD_STATUS_errADDRESS, FAIL, req_header_t::length, address_t::long_address, address_t::page, address_t::page_offset, uart_read_16bits(), and validate_checksum().
Referenced by process_cmd_grp_dnload(), and process_cmd_grp_upload().
|
static |
References ISP_CFG1, ISP_CFG1_FORCE_MASK, and ISP_CFG1_FORCE_OFFSET.
Referenced by uart_execute_dfu_command().
|
static |
Read the bootloader memory (i.e. the ISP version info)
|
static |
Read nbytes GP fuse bit, copy each bit to a Byte.
|
static |
|
static |
Read n Bytes from the internal Flash memory at address src and copy at address dst.
|
static |
|
static |
Read n Bytes from the internal page address src and copy to the address dst.
|
static |
Write the value 1 to *dst if the security bit is set, else write 0.
|
static |
|
static |
Read the signature memory (i.e. the UC3 device info)
|
static |
Read n Bytes from the user page address src and copy to the address dst.
|
static |
Write n Bytes from src to the user page address dst.
Referenced by force_isp().
|
static |
Parse a DFU Intel hex string and store info into a structure. This parser parses only the first 9 bytes of this structure (including the ':' character).
req_header | The structure where the formatted info will be stored. |
intel_hex_req_header | The raw Intel Hex header frame (a pointer on the first 9 bytes). |
checksum | A pointer on a 8-bit value used to contain the checksum of the header frame. |
References req_header_t::address, conv_ascii_to_hex(), current_page, req_header_t::length, address_t::page, address_t::page_offset, and req_header_t::type.
Referenced by uart_get_dfu_command().
void process_cmd_grp_data | ( | req_header_t * | req_header, |
U8 * | checksum | ||
) |
Process commands under the CMD_GRP_DATA type.
References DFU_CMD_STATUS_errUNEXPECTED, DFU_STATE_PROGRAM, dump_dfu_packet_and_reset_dfu_state(), req_header_t::length, and write_mem().
Referenced by uart_execute_dfu_command().
void process_cmd_grp_dnload | ( | req_header_t * | req_header, |
U8 * | checksum | ||
) |
Process commands under the CMD_GRP_DOWNLOAD type.
References CMD_PROGRAM_START, DFU_CMD_STATUS_errADDRESS, DFU_CMD_STATUS_errCHECKSUM, DFU_CMD_STATUS_errSECURITY_SET, DFU_CMD_STATUS_errUNEXPECTED, DFU_CMD_STATUS_errUNKNOWN, DFU_CMD_STATUS_errWRITE, DFU_CMD_STATUS_OK, DFU_STATE_IDLE, DFU_STATE_PROGRAM, dump_dfu_packet(), dump_dfu_packet_and_reset_dfu_state(), get_and_check_mem_range_and_crc(), req_header_t::length, MEMORY_ACCESS, uart_read_Byte(), and write.
Referenced by uart_execute_dfu_command().
void process_cmd_grp_exec | ( | req_header_t * | req_header, |
U8 * | checksum | ||
) |
Process commands under the CMD_GRP_EXEC type.
References boot_program(), CMD_ERASE, CMD_ERASE_ARG_CHIP, CMD_START_APPLI, CMD_START_APPLI_ARG_NO_RESET, CMD_START_APPLI_ARG_RESET, DFU_CMD_STATUS_errCHECKSUM, DFU_CMD_STATUS_errUNKNOWN, dump_dfu_packet_and_reset_dfu_state(), req_header_t::length, address_t::long_address, MEM_FLASH, stop_dfu_and_reset(), sys_clk_gen_stop(), uart_dfu_stop(), uart_read_Byte(), validate_checksum(), and wait_10_ms().
Referenced by uart_execute_dfu_command().
void process_cmd_grp_select | ( | req_header_t * | req_header, |
U8 * | checksum | ||
) |
Process commands under the CMD_GRP_SELECT type.
References CMD_SELECT_MEMORY, CMD_SELECT_MEMORY_ARG_PAGE, CMD_SELECT_MEMORY_ARG_UNIT, DFU_CMD_STATUS_errCHECKSUM, DFU_CMD_STATUS_errUNKNOWN, dump_dfu_packet_and_reset_dfu_state(), req_header_t::length, address_t::long_address, MEM_BOOTLOADER, MEM_CONFIGURATION, MEM_EEPROM, MEM_FLASH, MEM_INTRAM, MEM_SECURITY, MEM_SIGNATURE, MEM_USER, address_t::page, STATUS_errADDRESS, uart_read_16bits(), uart_read_Byte(), and validate_checksum().
Referenced by uart_execute_dfu_command().
void process_cmd_grp_upload | ( | req_header_t * | req_header, |
U8 * | checksum | ||
) |
Process commands under the CMD_GRP_UPLOAD type.
References CMD_BLANK_CHECK, CMD_READ_MEMORY, DFU_CMD_STATUS_errADDRESS, DFU_CMD_STATUS_errCHECKSUM, DFU_CMD_STATUS_errSECURITY_SET, DFU_CMD_STATUS_errUNKNOWN, DFU_CMD_STATUS_OK, DFU_CMD_STATUS_OK_NORETCHAR, dump_dfu_packet_and_reset_dfu_state(), erase_check_mem(), get_and_check_mem_range_and_crc(), req_header_t::length, MEM_EEPROM, MEM_FLASH, MEM_INTRAM, MEM_USER, MEMORY_ACCESS, read, read_mem(), and uart_read_Byte().
Referenced by uart_execute_dfu_command().
|
static |
Read address_range_nb_bytes Bytes from the currently selected memory.
References DFU_ANSWER_END_CHAR1, DFU_ANSWER_END_CHAR2, DFU_ANSWER_EQUAL, DFU_BUFFER_LENGTH_READ, address_t::long_address, memory, MEMORY_ACCESS, min, address_t::page_offset, uart_convert16bit2ascii_write(), uart_convertbyte2ascii_write(), and usart_bw_write_char().
Referenced by process_cmd_grp_upload().
|
static |
Build and send the answer frame.
References DFU_ANSWER_CHKSUM_ERR, DFU_ANSWER_END_CHAR1, DFU_ANSWER_END_CHAR2, DFU_ANSWER_OK, DFU_ANSWER_RW_ERROR_SECURITY_SET, DFU_ANSWER_UNKNOWN, DFU_ANSWER_WRITE_ERROR, DFU_CMD_STATUS_errADDRESS, DFU_CMD_STATUS_errBLANKCHECK, DFU_CMD_STATUS_errCHECKSUM, DFU_CMD_STATUS_errSECURITY_SET, DFU_CMD_STATUS_errUNEXPECTED, DFU_CMD_STATUS_errUNKNOWN, DFU_CMD_STATUS_errWRITE, DFU_CMD_STATUS_OK, address_t::page_offset, uart_convert16bit2ascii_write(), and usart_bw_write_char().
Referenced by dump_dfu_packet().
|
static |
References Disable_global_interrupt, and uart_dfu_stop().
Referenced by process_cmd_grp_exec(), and uart_dfu_start().
|
static |
Perform the UART autobaud process by using the synchronizer character sent by the external programmer.
References DFU_SYNCHRO_CHAR, FAIL, PASS, SLEEP, and usart_bw_write_char().
Referenced by uart_dfu_start().
|
static |
function used to configure the 4 potential USART candidates with the current PBA frequency.
References AVR32_ENTER_CRITICAL_REGION, AVR32_LEAVE_CRITICAL_REGION, usart_options_t::baudrate, DFU_UART_BAUD_RATE, DFU_USART_CANDIDATES, Enable_global_interrupt, gpio_enable_module(), INTC_register_interrupt(), TARGET_PBA_FREQ_HZ, USART_1_STOPBIT, usart_init_rs232(), USART_NO_PARITY, USART_NORMAL_CHMODE, and vUSART_ISR_init().
Referenced by uart_dfu_start().
|
static |
Convert and write on the USART a 2-byte value into a 4 characters ascii string.
u16_val | the 2-byte value to process. |
References usart_bw_write_char().
Referenced by read_mem(), and send_answer_frame().
|
static |
Convert each Byte of a input buffer into a hexadecimal 2-ascii-character string and write each digit to the UART.
pdfu_buffer | buffer of Bytes |
nb_bytes | number of Bytes in dfu_buffer[] |
References usart_bw_write_char().
Referenced by read_mem().
|
inlinestatic |
UART DFU read function (read + echo)
data | a pointer on an unsigned 8-bit data which will contain the data read. |
References SLEEP, UART_RX_BUFFER_SIZE, and usart_bw_write_char().
Referenced by uart_get_dfu_command(), and uart_read_Byte().
void uart_dfu_start | ( | void | ) |
Configure the USART, initialize the DFU and setup/calculate the autobaud.
References Get_debug_register, address_t::long_address, MEM_FLASH, PRODUCT_MANUFACTURER_ID_ADDRESS, PRODUCT_PART_NUMBER_LSB_ADDRESS, PRODUCT_PART_NUMBER_MSB_ADDRESS, PRODUCT_REVISION_ADDRESS, Rd_bitfield, stop_dfu_and_reset(), uart_autobaud_process(), and uart_configure().
Referenced by main().
|
static |
References _unhandled_interrupt(), DFU_USART_CANDIDATES, Disable_global_interrupt, force_isp(), gpio_enable_gpio(), INTC_register_interrupt(), and usart_reset().
Referenced by process_cmd_grp_exec(), and stop_dfu_and_reset().
void uart_execute_dfu_command | ( | req_header_t * | req_header, |
U8 * | checksum | ||
) |
Execute the DFU command required by the external programmer tool.
References CMD_GRP_DATA, CMD_GRP_DNLOAD, CMD_GRP_EXEC, CMD_GRP_SELECT, CMD_GRP_UPLOAD, DFU_CMD_STATUS_errUNKNOWN, DFU_CMD_STATUS_OK, dump_dfu_packet_and_reset_dfu_state(), force_isp(), is_isp_forced(), req_header_t::length, process_cmd_grp_data(), process_cmd_grp_dnload(), process_cmd_grp_exec(), process_cmd_grp_select(), process_cmd_grp_upload(), and req_header_t::type.
Referenced by main().
U8 uart_get_dfu_command | ( | req_header_t * | req_header | ) |
Get the DFU command from the external programmer tool.
References DFU_PACKET_START_CHAR, parse_dfu_intel_hex_header(), and uart_dfu_read_char().
Referenced by main().
References uart_read_Byte().
Referenced by get_and_check_mem_range_and_crc(), and process_cmd_grp_select().
References conv_ascii_to_hex(), and uart_dfu_read_char().
Referenced by dump_dfu_packet(), process_cmd_grp_dnload(), process_cmd_grp_exec(), process_cmd_grp_select(), process_cmd_grp_upload(), uart_read_16bits(), validate_checksum(), and write_mem().
Validate the checksum with the one read on the USART.
checksum | A pointer on a 8-bit value that contains the actual checksum. |
References uart_read_Byte().
Referenced by get_and_check_mem_range_and_crc(), process_cmd_grp_exec(), process_cmd_grp_select(), and write_mem().
|
static |
References gpio_clr_gpio_pin(), and UART_RX_BUFFER_SIZE.
Referenced by vUSART_ISR_init().
|
static |
|
static |
Receive the data from one intel-Hex frame and program the data to the.
References DFU_BUFFER_LENGTH, dfu_buffer_nb_Bytes, DFU_CMD_STATUS_errCHECKSUM, DFU_CMD_STATUS_errWRITE, dump_dfu_packet(), dump_dfu_packet_and_reset_dfu_state(), FAIL, INTELHEX_MAX_DATA_LENGTH, req_header_t::length, address_t::long_address, MEMORY_ACCESS, uart_read_Byte(), validate_checksum(), and write.
Referenced by process_cmd_grp_data().
|
static |
|
static |
Referenced by get_and_check_mem_range_and_crc(), and parse_dfu_intel_hex_header().
|
static |
Referenced by erase_check_mem().
|
static |
Referenced by write_mem().
|
static |
|
static |
|
static |
|
static |
Referenced by uart_configure(), uart_dfu_stop(), and vUSART_ISR_init().
|
static |
Referenced by vUSART_ISR_init().
|
static |
|
static |
|
static |
Referenced by erase_check_mem(), and read_mem().
struct { ... } MEMORY_ACCESS[MEM_COUNT] |
Referenced by erase_check_mem(), process_cmd_grp_dnload(), process_cmd_grp_upload(), read_mem(), and write_mem().
|
static |
|
static |
void(* read)(void *dst, U32 src, size_t nbytes) |
Referenced by process_cmd_grp_upload().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int(* write)(U32 dst, const void *src, size_t nbytes) |
Referenced by process_cmd_grp_dnload(), and write_mem().