Microchip PIC32CX1025SG41128 Handleiding

Microchip Niet gecategoriseerd PIC32CX1025SG41128

Lees hieronder de 📖 handleiding in het Nederlandse voor Microchip PIC32CX1025SG41128 (10 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 61 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/10
TB3291
The Difference Between MPLAB Harmony v3 PLIBs and
Drivers, and When to Use Them
Introduction
MPLAB® Harmony v3 provides layered and modular software libraries that support a flexible embedded software
development model. The core libraries under MPLAB Harmony v3 includes Peripheral Libraries (PLIBs), drivers, and
system services. The PLIBs provide low-level device-specific support. The drivers and system services provide
hardware abstraction upon which a highly capable Middleware is built.
This document explains the differences between the MPLAB Harmony v3 PLIBs and drivers, and it also describes
when to use them.
© 2020 Microchip Technology Inc. Technical Brief DS90003291A-page 1
1. Description
1.1 Peripheral Libraries
The MPLAB Harmony v3 Peripheral Library (PLIB) is a low-level interface library to access a peripheral on a
microcontroller. The PLIB Application Program Interfaces (APIs) hide peripheral register details and make it easier to
configure the peripheral per the application requirements by calling the PLIB APIs.
The MPLAB Harmony v3 Peripheral Library features are as follows:
• Simple and user-friendly APIs.
• Abstraction layers are not implemented; has direct register access.
• Clean code and no conditional macros (for example, #if, #elif).
• Easy to integrate into existing applications.
• Self-containing and self-sufficient implementation. In general, all PLIBs are interrupt driven, but few PLIBs have
blocking implementation in addition to interrupt driven implementation.
• PLIBs can be easily extended to add new features.
• PLIBs provide status using polling and interrupt mode (through a callback mechanism) implementation models
for data transaction operations. By using these models, the application can either poll the status of the submitted
request, or choose to get notified when the request is complete by registering a callback API in an application.
• Consistent API signature for similar peripherals across 32-bit SAM and PIC microcontroller families. The
following table illustrates the PLIB API signatures.
Usage UART SPI I2C/TWI
Initialization UARTx_Initialize() SPIx_Initialize() TWIx_Initialize()
Transaction
UARTx_Write() SPIx_Write() TWIx_Write()
UARTx_Read() SPIx_Read() TWIx_Read()
-SPIx_WriteRead() TWIx_WriteRead()
Status
UARTx_ReadIsBusy()
SPIx_IsBusy() TWIx_IsBusy()
UARTx_WriteIsBusy()
1.2 Drivers
The MPLAB Harmony v3 drivers are a highly abstracted interface to control, access, manage peripherals, and other
resources on the 32-bit SAM and PIC microcontrollers. The driver interface allows applications and other client
modules (drivers, Middleware libraries and system services) to interact with the peripheral.
The following are MPLAB Harmony v3 driver features:
• Abstracted interfaces: Enables portability and interoperability.
• Drivers are built on the top of the PLIBs.
• A driver is capable of handling multiple instances of a peripheral without duplicating the driver code to handle
the individual instance of a peripheral. The multiple instance support of MPLAB Harmony v3 drivers enables the
application to remain the same even when the peripheral instance is changed.
USART Driver API USART PLIB API
DRV_USART_WriteBufferAdd(…)
USART1_Write(…)
USART2_Write(…)
TB3291
Description
© 2020 Microchip Technology Inc. Technical Brief DS90003291A-page 2
...........continued
USART Driver API USART PLIB API
DRV_USART_ReadBufferAdd(…)
USART1_Read(…)
USART2_Read(…)
• Multiple Client Support: Access of a peripheral by more than one entity. The multiple client support of MPLAB
Harmony v3 drivers enables seamless handling of client specific differences.
Figure 1-1. Multiple Client Example
SPI0
Sensor EEPROM
Application
(Client1)
Application
(Client2)
HarmonyDriver
(SPI)
• Supports DMA transfer mode: Provides an application with the option to enable the DMA for data transfer
operations. The driver interface/API remains the same with or without the DMA transfer mode.
• Provides queuing support: MPLAB Harmony v3 drivers provide applications with the ability to line up multiple
data transfer requests while an ongoing request is processing. The result of the data transfer request is notified
through a transfer complete event.
• MPLAB Harmony v3 drivers provide a non-blocking implementation model for data transfer operations known as
the Asynchronous Driver mode.
• MPLAB Harmony v3 drivers provide another driver model known as Synchronous mode to adhere to the
blocking need of applications using an RTOS. The synchronous driver mode of the MPLAB Harmony v3 driver
provides blocking implementation for the data transfer operations.
• MPLAB Harmony v3 drivers enable the usage of RTOS through the Operating System Abstraction Layer
(OSAL).
• MPLAB Harmony v3 drivers have a choice to configure both the Asynchronous and Synchronous modes in both
the non-RTOS and RTOS environments.
• The OSAL provides a consistent interface to the MPLAB Harmony v3 drivers. The OSAL takes care of the
underlying differences between the available and supported RTOS Kernels in MPLAB Harmony v3, and ensures
the correct operation in bare-metal (non-RTOS) and RTOS-based application environments.
• MPLAB Harmony v3 drivers handle cache maintenance operations on devices that have a data cache.
TB3291
Description
© 2020 Microchip Technology Inc. Technical Brief DS90003291A-page 3


Product specificaties

Merk: Microchip
Categorie: Niet gecategoriseerd
Model: PIC32CX1025SG41128

Heb je hulp nodig?

Als je hulp nodig hebt met Microchip PIC32CX1025SG41128 stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Microchip

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd