12 Adding Chip Peripherals

This section describes how to add analog/digital peripherals to the application

The Chip Support Package(csp), which is downloaded as part of Install Harmony 3 Dependencies, is used to configure and generate code related to peripherals of choice.

Once a peripheral is added to Project Graph from the device resources tab as shown in the below image, a user can configure a variety of settings applicable to the peripheral. Upon code generation, users will have a code generated specific to the peripheral. Initialization of the peripheral, for example, SERCOM0_Initiliaze() will be added automatically to the SYS_Initialize() function call.

Figure 12-1. .
  1. Documentation to understand the usage of various API's available for a particular peripheral is available here.

  2. There are also precompiled application examples available. That can be downloaded from MPLAB Discover using the link - https://mplab-discover.microchip.com/v2?dsl=csp_apps_pic32cxbz3_wbz3 or from Microchip MPLAB® Harmony GitHub repo which give users ready to use examples to follow.