Microchip PIC32AK6416GC41036 handleiding

76 pagina's
PDF beschikbaar

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 congured to place the target device into the following operational mode.
DSP multipliers are congured 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 eects, refer to the respective device data
sheets.
1.2.7. Overow and Saturaon 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 overow, the
corresponding overow 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 specied range marks an
important event, it is recommended to enable the Accumulator Overow Trap via the OVATE, OVBTE
and COVTE bits in the INTCON4 register. This will have the eect of generating an Arithmetic Math
Error Trap as soon as the Overow condition occurs to then take the required action.
1.2.8. Integrang 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 Prole 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 Funcons
The DSP library supports the functional modules listed below:
Vector Functions
Window Functions

Bekijk gratis de handleiding van Microchip PIC32AK6416GC41036, 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
ModelPIC32AK6416GC41036
CategorieNiet gecategoriseerd
TaalNederlands
Grootte11302 MB