Microchip PIC32AK6416GC41064 handleiding
Handleiding
Je bekijkt pagina 5 van 76

DSP Library for PIC32A MCU
User Guide
© 2025 Microchip Technology Inc. and its subsidiaries
DS70005605A - 5
from the stack to preserve its original value. This mechanism allows the library to execute without
disrupting the CORCON setting.
The CORCON register is congured to place the target device into the following operational mode.
• DSP multipliers are congured to utilize signed fractional data.
• Accumulator saturation is enabled for Accumulator A and Accumulator B.
• Saturation mode is set to 9.63 saturation (Super saturation).
• Data Space Write saturation is enabled.
• Convergent (unbiased) rounding is enabled.
For a detailed explanation of the CORCON register and its eects, refer to the respective device data
sheets.
1.2.7. Overow and Saturaon Handling
The DSP Library performs most computations using 9.63 saturation but must store the output of
the function in 1.31 format. If the accumulator in use saturates during the course of operation, the
corresponding saturation bit (SA or SB) in the STATUS register will be set. This bit will stay set until
it is cleared. This allows the inspection of SA or SB after the function executes and to determine if
action should be taken to scale the input data to the function.
Similarly, if a computation performed with the accumulator results in an overow, the
corresponding overow bit (OA or OB) in the STATUS register will be set. Unlike the SA and SB
status bits, OA and OB will not stay set until they are cleared. These bits are updated each time
an operation is executed by using the accumulator. If exceeding this specied range marks an
important event, it is recommended to enable the Accumulator Overow Trap via the OVATE, OVBTE
and COVTE bits in the INTCON4 register. This will have the eect of generating an Arithmetic Math
Error Trap as soon as the Overow condition occurs to then take the required action.
1.2.8. Integrang with Interrupts and an RTOS
The DSP Library may easily be integrated into an application which utilizes interrupts or an RTOS
with certain guidelines. To minimize execution time, the DSP Library utilizes REPEAT loops, Modulo
Addressing and Bit-Reversed Addressing. Each of these components is a nite hardware resource
on the PIC32A device, and the background code must consider the use of each resource when
disrupting execution of a DSP Library function.
When integrating with the DSP Library, make sure to examine the Function Prole of each function
description to determine which resources are used. If a library function is to be interrupted, it shall
be the user’s responsibility to save and restore the contents of all registers used by the function,
including the state of the REPEAT and special addressing hardware. This also includes saving and
restoring the contents of the CORCON and Status registers.
1.2.9. Rebuilding the DSP Library
To build the DSP library, extract the source les in the (Compiler Install Path)\src\libdsp.zip path;
this creates a sub-folder called libdsp. Execute the makedsplib.bat le within this folder to rebuild
the library archives. This creates two folders called "lib" and "obj". Once the batch le execution is
completed, the rebuild libdsp.a le can be found in the “lib” folder.
The MPLAB XC32 compiler is required to rebuild the DSP library, and its installation path must be
added to Windows
®
or Linux
®
environment variables.
1.2.10. DSP Library Funcons
The DSP library supports the functional modules listed below:
• Vector Functions
• Window Functions
Bekijk gratis de handleiding van Microchip PIC32AK6416GC41064, 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
Merk | Microchip |
Model | PIC32AK6416GC41064 |
Categorie | Niet gecategoriseerd |
Taal | Nederlands |
Grootte | 11302 MB |