Lab 9: DSP/BIOS
Main_9.c
Labcfg.cmd
Lab.cdb
DSP281x_Headers_BIOS.cmd
User_8_9.cmd
CodeStartBranch.asm
SysCtrl.c
Gpio.c
DSP281x_GlobalVariableDefs.c
PieCtrl_5_6_7_8_9.c
DefaultIsr_9_10.c
Adc.c
Ev_7_8_9_10.c
Filter.c
Add a SWI to main.c
2. Open
Main_9.c
and notice that space has been added at the end of main() for two new
functions which will be used in this module – AdcSwi() and LedBlink(). In the next few
steps, we will move part of the ADCINT_ISR() routine from
DefaultIsr_9_10.c
to
this space in
Main_9.c
.
3. Open
DefaultIsr_9_10.c
and locate the ADCINT_ISR() routine. Move the entire
contents of the ADCINT_ISR() routine to the AdcSwi() function in
Main_9.c
with the
following exceptions:
DO NOT MOVE:
•
The instruction used to acknowledge the PIE group interrupt.
•
The GPIO pin toggle code.
•
The LED toggle code.
Be sure to move the static local variable declaration that is used to index into the ADC
buffers.
Comment:
In almost all appplications, the PIE group acknowledge code is left in the HWI
(rather than move it to a SWI). This allows other interrupts to occur on that PIE group
even if the SWI has not yet executed. On the other hand, we are leaving the GPIO and
LED toggle code in the HWI just as an example. It illustrates that you can post a SWI
and also do additional operations in the HWI. DSP/BIOS is extremely flexible!
4. In the beginning of
DefaultIsr_9_10.c
, move the global variables, definition
statements and coefficients for the filter function to the beginning of
Main_9.c
.
5. Delete
the
interrupt
key word from the ADCINT_ISR. The interrupt keyword is not
used when a HWI is under DSP/BIOS control. A HWI is under DSP/BIOS control when
it uses any DSP/BIOS functionality, such as posting a SWI, or calling any DSP/BIOS
function or macro.
6. In
Main_9.c
remove the in-line assembly code used to enable global interrupts.
DSP/BIOS will enable global interrupts after main().
7. In
Main_9.c
remove the while() loop (the endless loop). When using DSP/BIOS, you
must return from main(). DSP/BIOS will then take-over control of the software
execution.
9 - 16
C28x - Using DSP/BIOS
Содержание C28 Series
Страница 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Страница 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Страница 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Страница 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Страница 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Страница 275: ...Appendix eZdsp F2812 eZdsp F2812 Connector Header and Pin Diagram C28x Appendix A eZdsp F2812 A 3 ...
Страница 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Страница 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Страница 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Страница 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Страница 281: ...Appendix JP7 JP8 JP11 JP12 Boot Mode Select JP9 PLL Disable DS1 DS2 LEDs C28x Appendix A eZdsp F2812 A 9 ...
Страница 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...