Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Chip Identifier (CHIPID)

Purpose

Driver for the Chip Identifier. This driver provides access to the main features of the CHIPID.

Usage
  1. Read whole Chip ID information to a struct using chipid_read(). The read data is defined using chipid_data_t.
  2. Read Chip ID fields using following functions:

Dependencies

This driver does not depend on other modules.

Functions

uint32_t chipid_read (Chipid *p_chipid, chipid_data_t *p_chipid_data)
 Get chip identifier information. More...
 
uint32_t chipid_read_arch (Chipid *p_chipid)
 Get the identifier of the architecture. More...
 
uint32_t chipid_read_extchipid (Chipid *p_chipid)
 Get the chip extension identifier. More...
 
uint32_t chipid_read_nvpm2size (Chipid *p_chipid)
 Get the size of the second non-volatile program memory. More...
 
uint32_t chipid_read_nvpmsize (Chipid *p_chipid)
 Get the size of the first non-volatile program memory. More...
 
uint32_t chipid_read_nvpmtype (Chipid *p_chipid)
 Get the type of non-volatile program memory. More...
 
uint32_t chipid_read_processor (Chipid *p_chipid)
 Get the version of the embedded ARM processor. More...
 
uint32_t chipid_read_sramsize (Chipid *p_chipid)
 Get the size of the embedded SRAM. More...
 
uint32_t chipid_read_version (Chipid *p_chipid)
 Get the revision number of the silicon. More...
 

uint32_t chipid_read ( Chipid *  p_chipid,
chipid_data_t p_chipid_data 
)

Get chip identifier information.

Parameters
p_chipidPointer to a CHIPID instance.
p_chipid_dataPointer to a data structure to store chip information.
Returns
0 on success.

References 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().

uint32_t chipid_read_arch ( Chipid *  p_chipid)

Get the identifier of the architecture.

Parameters
p_chipidPointer to a CHIPID instance.
Returns
Identifier of the architecture.
uint32_t chipid_read_extchipid ( Chipid *  p_chipid)

Get the chip extension identifier.

Parameters
p_chipidPointer to a CHIPID instance.
Returns
Chip extension identifier if available, else 0.
uint32_t chipid_read_nvpm2size ( Chipid *  p_chipid)

Get the size of the second non-volatile program memory.

Parameters
p_chipidPointer to a CHIPID instance.
Returns
Memory size value.
uint32_t chipid_read_nvpmsize ( Chipid *  p_chipid)

Get the size of the first non-volatile program memory.

Parameters
p_chipidPointer to a CHIPID instance.
Returns
Memory size value.
uint32_t chipid_read_nvpmtype ( Chipid *  p_chipid)

Get the type of non-volatile program memory.

Parameters
p_chipidPointer to a CHIPID instance.
Returns
Memory type.
uint32_t chipid_read_processor ( Chipid *  p_chipid)

Get the version of the embedded ARM processor.

Parameters
p_chipidPointer to a CHIPID instance.
Returns
Version of the embedded ARM processor.
uint32_t chipid_read_sramsize ( Chipid *  p_chipid)

Get the size of the embedded SRAM.

Parameters
p_chipidPointer to a CHIPID instance.
Returns
SRAM size value.
uint32_t chipid_read_version ( Chipid *  p_chipid)

Get the revision number of the silicon.

Parameters
p_chipidPointer to a CHIPID instance.
Returns
Revision number of the silicon.