This project offers a low-level API that provides control over some of PIC32MX microcontroller peripheral modules. Despite the fact that library was developed using PIC32MX family, it could be ported to any other of PIC32 family of MCUs.
Primary intention of developing my own set of libraries was to optimize low-level driver performance by excluding overhead provided by generic vendor libraries for PIC32 MCUs. Additionally, as I was developing these libraries I was working on drivers for some other, external devices whose repositories you can find on my main page.
All the modules, whose library was developed so far, are covered in the following sub-folders:
- Serial Peripheral Interface
- Programmable Inputs Outputs
- Timers
- Oscillator
- Interrupt Controller
- Configuration Registers
Check the links above for an extensive explanation of each module's driver.
- Introduction to PIC32MX-Peripheral-Libs
- Table of Contents
- Setting Up Your Environment
- General Dependencies
- Future Development
- Getting in Touch and Contributions
- License and Usage Terms
The development, testing, and API validation of the individual driver utilized the following setup.
The project development utilized MPLAB X (v6.05), paired with Microchip's XC32 (v4.21) toolchain for building the project. For detailed information on required libraries for using individual driver, please refer to the General Dependencies section.
Microchip's PicKit4 served as the emulator and debugger for this project, offering a cost-effective solution for successful debugging and code uploading from MPLAB X IDE to the target MCU. The specific MCU used was the PIC32MX170F256B, accompanied by its essential external components.
Each module requires one or more of the following dependencies:
- Standard Libraries
- XC32 compiler libraries:
xc.h
,cp0defs.h
, andattribs.h
Compiler libraries are mainly used for interrupt handler semantics, interrupt control, and accessing coprocessor registers CP0 for some specialized tasks.
Note
It should be mentioned that the necessary startup file .s
, linker file .ld
(or .sct
for ARM compilers), and MCU configuration bits (aka. fuses) are not provided in this project as these are toolchain and platform specifics and should be handled by the user.
Looking ahead of the PIC32MX peripheral libraries development the remaining peripheral module driver's libraries would need to be implemented, tested, and their documentation provided.
If you encounter any bugs or have suggestions, please raise an issue. Alternatively, feel free to contact me directly via email if you're interested in contributing or taking this project to the next level.
This project is licensed under the MIT License - see the LICENCE file for details.
© Luka Gacnik, 2023