Microchip PIC32AK1216GC41064 handleiding

76 pagina's
PDF beschikbaar

Handleiding

Je bekijkt pagina 3 van 76
DSP Library for PIC32A MCU
User Guide
© 2025 Microchip Technology Inc. and its subsidiaries
DS70005605A - 3
1. DSP Library for PIC32A MCU
1.1. C Code Applicaons
The DSP library for PIC32A devices is included with the XC32 compiler. Within the compiler install
directory, the library and its related les can be found at:
pic32a\lib\libdsp-elf.a – DSP library/archive le
pic32a\src\libdsp.zip – zipped source code for library functions, including a batch le to rebuild the
library
pic32a\support\generic\h\dsp.h – header le for DSP library
1.2. Using the DSP Library
Read the following document sections before using the DSP library in specic user or conventional
applications.
Building with the DSP Library
Memory Models
DSP Library Function Calling Convention
Data Types
Data Memory Usage
CORCON Register Usage
Overow and Saturation Handling
Integrating with Interrupts and an RTOS
Rebuilding the DSP Library
DSP Library Functions
1.2.1. Building with the DSP Library
Building an application which utilizes the DSP Library requires only two les:
dsp.h
and
libdsp-elf.a
.
dsp.h is a header le which provides all the function prototypes, #denes and typedefs used by the
library. libdsp-elf.a is the archived library le which contains all the individual object les for each
library function. (See the “MPLAB
®
XC32 Libraries Reference Manual for PIC32A MCU”, DS50003838, for
more on ELF-specic libraries.)
When compiling an application,
dsp.h
must be referenced (using #include) by all source les which
call a function in the DSP Library or use its symbols or typedefs. When linking an application,
libdsp-elf.a
must be provided as an input to the linker (using the
--library dsp
or
-ldsp
linker
switch), so the functions used by the application be linked to the project.
The linker will place the functions of the DSP library into a special text section named .libdsp. This
can be seen in the map le generated by the linker.
1.2.2. Memory Models
The DSP Library is built using the small code and small data memory models to minimize the
library footprint. Some functions within the DSP library are written in C and utilize the compiler’s
oating-point library. Consequently, the compiler linker script les position the .libm and .libdsp
text sections adjacent to each other. This ensures that the DSP library can safely call the RCALL
instruction to invoke the necessary oating-point routines from the oating-point library.

Bekijk gratis de handleiding van Microchip PIC32AK1216GC41064, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.

Productinformatie

MerkMicrochip
ModelPIC32AK1216GC41064
CategorieNiet gecategoriseerd
TaalNederlands
Grootte11302 MB