Chip Identifier (CHIPID) example for SAM.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | chipidtype |
Chip ID catalog information: Type ID and its description stream. More... | |
Macros | |
#define | CHIPID_ARCH_SIZE 47 |
Number of architectures Supported. More... | |
#define | CHIPID_EPROC_SIZE 7 |
Number of Embedded Processors Supported. More... | |
#define | CHIPID_NVPSIZE2_SIZE 16 |
Number of 2nd Non-Volatile Program Memories Supported. More... | |
#define | CHIPID_NVPSIZE_SIZE 16 |
Number of 1st Non-Volatile Program Memories Supported. More... | |
#define | CHIPID_NVPTYPE_SIZE 5 |
Number of ROMs Supported. More... | |
#define | CHIPID_SRAMSIZE_SIZE 16 |
Number of SRAMs Supported. More... | |
#define | STRING_EOL "\r" |
#define | STRING_HEADER |
Typedefs | |
typedef struct chipidtype | chipidtype_t |
Chip ID catalog information: Type ID and its description stream. More... | |
Functions | |
static bool | chipid_find (const chipidtype_t *p_cid_types, uint32_t ul_size, uint32_t ul_id, chipidtype_t *p_cid_type) |
The function finds chipid from specific list according to ul_id. More... | |
static void | chipid_print (chipid_data_t *p_chipid_data) |
The function prints specific chipid data structure. More... | |
static void | configure_console (void) |
Configure UART console. More... | |
int | main (void) |
Application entry point. More... | |
Variables | |
const chipidtype_t | chipid_archsize [CHIPID_ARCH_SIZE] |
Architectures support list. More... | |
const chipidtype_t | chipid_eproc [CHIPID_EPROC_SIZE] |
Embedded Processors support list. More... | |
const chipidtype_t | chipid_nvpsize [CHIPID_NVPSIZE_SIZE] |
1st Non-Volatile Program Memories support list More... | |
const chipidtype_t | chipid_nvpsize2 [CHIPID_NVPSIZE2_SIZE] |
2nd Non-Volatile Program Memories support list More... | |
const chipidtype_t | chipid_nvptype [CHIPID_NVPTYPE_SIZE] |
ROMs support list. More... | |
const chipidtype_t | chipid_sramsize [CHIPID_SRAMSIZE_SIZE] |
SRAMs support list. More... | |
chipid_data_t | g_chipid_data |
ChipID data read. More... | |
#define CHIPID_ARCH_SIZE 47 |
Number of architectures Supported.
Referenced by chipid_print().
#define CHIPID_EPROC_SIZE 7 |
Number of Embedded Processors Supported.
Referenced by chipid_print().
#define CHIPID_NVPSIZE2_SIZE 16 |
Number of 2nd Non-Volatile Program Memories Supported.
Referenced by chipid_print().
#define CHIPID_NVPSIZE_SIZE 16 |
Number of 1st Non-Volatile Program Memories Supported.
Referenced by chipid_print().
#define CHIPID_NVPTYPE_SIZE 5 |
Number of ROMs Supported.
Referenced by chipid_print().
#define CHIPID_SRAMSIZE_SIZE 16 |
Number of SRAMs Supported.
Referenced by chipid_print().
#define STRING_EOL "\r" |
#define STRING_HEADER |
Referenced by main().
typedef struct chipidtype chipidtype_t |
Chip ID catalog information: Type ID and its description stream.
|
static |
The function finds chipid from specific list according to ul_id.
p_cid_types | Pointer to the chipid list. |
ul_size | chipid list size |
ul_id | chipid number |
p_cid_type | pointer to chipid type |
Referenced by chipid_print().
|
static |
The function prints specific chipid data structure.
p_chipid_data | Pointer to the chipid data. |
References CHIPID_ARCH_SIZE, CHIPID_EPROC_SIZE, chipid_find(), CHIPID_NVPSIZE2_SIZE, CHIPID_NVPSIZE_SIZE, CHIPID_NVPTYPE_SIZE, CHIPID_SRAMSIZE_SIZE, chipidtype::p_str, chipid_data::ul_arch, chipid_data::ul_eproc, chipid_data::ul_extflag, chipid_data::ul_extid, chipid_data::ul_nvpsiz, chipid_data::ul_nvpsiz2, chipid_data::ul_nvptyp, chipid_data::ul_sramsiz, and chipid_data::ul_version.
Referenced by main().
|
static |
Configure UART console.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_CHAR_LENGTH, CONF_UART_PARITY, CONF_UART_STOP_BITS, CONSOLE_UART_ID, stdio_serial_init(), and sysclk_enable_peripheral_clock().
Referenced by main().
int main | ( | void | ) |
Application entry point.
References board_init(), chipid_print(), chipid_read(), configure_console(), STRING_HEADER, and sysclk_init().
const chipidtype_t chipid_archsize[CHIPID_ARCH_SIZE] |
Architectures support list.
const chipidtype_t chipid_eproc[CHIPID_EPROC_SIZE] |
Embedded Processors support list.
const chipidtype_t chipid_nvpsize[CHIPID_NVPSIZE_SIZE] |
1st Non-Volatile Program Memories support list
const chipidtype_t chipid_nvpsize2[CHIPID_NVPSIZE2_SIZE] |
2nd Non-Volatile Program Memories support list
const chipidtype_t chipid_nvptype[CHIPID_NVPTYPE_SIZE] |
ROMs support list.
const chipidtype_t chipid_sramsize[CHIPID_SRAMSIZE_SIZE] |
SRAMs support list.
chipid_data_t g_chipid_data |
ChipID data read.