From 18728c7fbc6484d950e89516b96f7398b27c57c8 Mon Sep 17 00:00:00 2001 From: Oleg Date: Wed, 9 Apr 2025 09:59:49 +0300 Subject: [PATCH] Change configuration settings 1. Rename the project 2. Renew system headers and .c files from C2000 3. Update include options --- .cproject | 54 +-- .gitignore | 6 +- .project | 10 +- F28335/DSP2833x_ADC_cal.asm | 37 +- F28335/DSP2833x_Adc.c | 49 ++- F28335/DSP2833x_Adc.h | 39 +- F28335/DSP2833x_CSMPasswords.asm | 95 +++++ F28335/DSP2833x_CodeStartBranch.asm | 37 +- F28335/DSP2833x_CpuTimers.c | 45 ++- F28335/DSP2833x_CpuTimers.h | 39 +- F28335/DSP2833x_DBGIER.asm | 59 +++ F28335/DSP2833x_DMA.c | 37 +- F28335/DSP2833x_DMA.h | 39 +- F28335/DSP2833x_DefaultIsr.c | 39 +- F28335/DSP2833x_DefaultIsr.h | 39 +- F28335/DSP2833x_DevEmu.h | 39 +- F28335/DSP2833x_Device.h | 75 ++-- F28335/DSP2833x_DisInt.asm | 96 +++++ F28335/DSP2833x_Dma_defines.h | 39 +- F28335/DSP2833x_ECan.c | 39 +- F28335/DSP2833x_ECan.h | 39 +- F28335/DSP2833x_ECap.c | 39 +- F28335/DSP2833x_ECap.h | 39 +- F28335/DSP2833x_EPwm.c | 39 +- F28335/DSP2833x_EPwm.h | 39 +- F28335/DSP2833x_EPwm_defines.h | 39 +- F28335/DSP2833x_EQep.c | 39 +- F28335/DSP2833x_EQep.h | 39 +- F28335/DSP2833x_Examples.h | 52 ++- F28335/DSP2833x_GlobalPrototypes.h | 41 +- F28335/DSP2833x_GlobalVariableDefs.c | 39 +- F28335/DSP2833x_Gpio.c | 39 +- F28335/DSP2833x_Gpio.h | 39 +- F28335/DSP2833x_I2C.c | 39 +- F28335/DSP2833x_I2c.h | 39 +- F28335/DSP2833x_I2c_defines.h | 39 +- F28335/DSP2833x_Mcbsp.c | 552 +++++++++++++++++++++++++++ F28335/DSP2833x_Mcbsp.h | 39 +- F28335/DSP2833x_MemCopy.c | 39 +- F28335/DSP2833x_PieCtrl.c | 39 +- F28335/DSP2833x_PieCtrl.h | 39 +- F28335/DSP2833x_PieVect.c | 39 +- F28335/DSP2833x_PieVect.h | 39 +- F28335/DSP2833x_Sci.c | 39 +- F28335/DSP2833x_Sci.h | 39 +- F28335/DSP2833x_Spi.c | 39 +- F28335/DSP2833x_Spi.h | 39 +- F28335/DSP2833x_SysCtrl.c | 47 ++- F28335/DSP2833x_SysCtrl.h | 39 +- F28335/DSP2833x_XIntrupt.h | 39 +- F28335/DSP2833x_Xintf.c | 59 ++- F28335/DSP2833x_Xintf.h | 39 +- F28335/DSP28x_Project.h | 43 ++- Periphery.cpp | 4 + Protocol/CAN.cpp | 8 + cmd/F28335_nonBIOS_flash.cmd | 130 +++++++ main.cpp | 2 + targetConfigs/MASTER_RED.ccxml | 28 -- targetConfigs/SLAVE_BLACK.ccxml | 28 -- 59 files changed, 2629 insertions(+), 330 deletions(-) create mode 100644 F28335/DSP2833x_CSMPasswords.asm create mode 100644 F28335/DSP2833x_DBGIER.asm create mode 100644 F28335/DSP2833x_DisInt.asm create mode 100644 F28335/DSP2833x_Mcbsp.c create mode 100644 cmd/F28335_nonBIOS_flash.cmd delete mode 100644 targetConfigs/MASTER_RED.ccxml delete mode 100644 targetConfigs/SLAVE_BLACK.ccxml diff --git a/.cproject b/.cproject index 2e1311c..70fa781 100644 --- a/.cproject +++ b/.cproject @@ -4,9 +4,9 @@ - - - + + + @@ -32,8 +32,8 @@ - - + + + @@ -116,9 +100,9 @@ - - - + + + diff --git a/.gitignore b/.gitignore index e437788..4be425c 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,8 @@ SysConfig/ # Файлы проекта (опционально) # .project -# .cproject \ No newline at end of file +# .cproject + +# Файлы конфигурации отладчика +targetConfigs/MASTER_RED.ccxml +targetConfigs/SLAVE_BLACK.ccxml diff --git a/.project b/.project index ee0fcf2..fddb76b 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - CCS-Students + CommBoard @@ -30,12 +30,8 @@ $%7BTI_PRODUCTS_DIR__TIREX%7D/controlSUITE/libs - FAST_FPU32 - $%7BTI_PRODUCTS_DIR__TIREX%7D/controlSUITE/libs/math/FPUfastRTS/V100/lib - - - TMS320F_2833x_HEADERS - $%7BCOM_TI_C2000WARE_INSTALL_DIR%7D/device_support/f2833x + FPUfastRTS_controlSuite + $%7BTI_PRODUCTS_DIR%7D/controlSUITE/libs/math/FPUfastRTS/V100 diff --git a/F28335/DSP2833x_ADC_cal.asm b/F28335/DSP2833x_ADC_cal.asm index 4866bb6..063e8ae 100644 --- a/F28335/DSP2833x_ADC_cal.asm +++ b/F28335/DSP2833x_ADC_cal.asm @@ -13,10 +13,39 @@ ;; Notes: ;; ;;########################################################################### -;; $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -;; $Release Date: November 1, 2016 $ -;; $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -;; http://www.ti.com/ ALL RIGHTS RESERVED $ +;; $TI Release: 2833x/2823x Header Files V1.32 $ +;; $Release Date: June 28, 2010 $ +;; $Copyright: +;// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +;// +;// Redistribution and use in source and binary forms, with or without +;// modification, are permitted provided that the following conditions +;// are met: +;// +;// Redistributions of source code must retain the above copyright +;// notice, this list of conditions and the following disclaimer. +;// +;// Redistributions in binary form must reproduce the above copyright +;// notice, this list of conditions and the following disclaimer in the +;// documentation and/or other materials provided with the +;// distribution. +;// +;// Neither the name of Texas Instruments Incorporated nor the names of +;// its contributors may be used to endorse or promote products derived +;// from this software without specific prior written permission. +;// +;// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +;// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +;// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +;// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +;// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +;// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +;// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +;// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +;// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +;// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +;// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +;// $ ;;########################################################################### .def _ADC_cal diff --git a/F28335/DSP2833x_Adc.c b/F28335/DSP2833x_Adc.c index f7eb525..1929e45 100644 --- a/F28335/DSP2833x_Adc.c +++ b/F28335/DSP2833x_Adc.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/5 $ +// Checkin $Date: October 23, 2007 13:34:09 $ //########################################################################### // // FILE: DSP2833x_Adc.c @@ -5,17 +7,46 @@ // TITLE: DSP2833x ADC Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // // Included Files // -#include "F28335/DSP2833x_Device.h" // DSP2833x Headerfile Include File -#include "F28335/DSP2833x_Examples.h" // DSP2833x Examples Include File +#include "DSP2833x_Device.h" // DSP2833x Headerfile Include File +#include "DSP2833x_Examples.h" // DSP2833x Examples Include File // // Defines @@ -28,8 +59,7 @@ void InitAdc(void) { - //extern void DSP28x_usDelay(Uint32 Count); - extern void DelayUs(Uint16); + extern void DSP28x_usDelay(Uint32 Count); // // *IMPORTANT* @@ -60,8 +90,7 @@ InitAdc(void) // contain the correct CPU clock period in nanoseconds. // AdcRegs.ADCTRL3.all = 0x00E0; // Power up bandgap/reference/ADC circuits - DELAY_US(5000); // Delay before converting ADC channels - // + DELAY_US(ADC_usDELAY); // Delay before converting ADC channels } // diff --git a/F28335/DSP2833x_Adc.h b/F28335/DSP2833x_Adc.h index 3c2d5f1..9ccf069 100644 --- a/F28335/DSP2833x_Adc.h +++ b/F28335/DSP2833x_Adc.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:51:50 $ //########################################################################### // // FILE: DSP2833x_Adc.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device ADC Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_ADC_H diff --git a/F28335/DSP2833x_CSMPasswords.asm b/F28335/DSP2833x_CSMPasswords.asm new file mode 100644 index 0000000..e357111 --- /dev/null +++ b/F28335/DSP2833x_CSMPasswords.asm @@ -0,0 +1,95 @@ +;// TI File $Revision: /main/3 $ +;// Checkin $Date: June 26, 2007 16:41:07 $ +;//########################################################################### +;// +;// FILE: DSP2833x_CSMPasswords.asm +;// +;// TITLE: DSP2833x Code Security Module Passwords. +;// +;// DESCRIPTION: +;// +;// This file is used to specify password values to +;// program into the CSM password locations in Flash +;// at 0x33FFF8 - 0x33FFFF. +;// +;// In addition, the reserved locations 0x33FF80 - 0X33fff5 are +;// all programmed to 0x0000 +;// +;//########################################################################### +;// $TI Release: 2833x/2823x Header Files V1.32 $ +;// $Release Date: June 28, 2010 $ +;// $Copyright: +;// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +;// +;// Redistribution and use in source and binary forms, with or without +;// modification, are permitted provided that the following conditions +;// are met: +;// +;// Redistributions of source code must retain the above copyright +;// notice, this list of conditions and the following disclaimer. +;// +;// Redistributions in binary form must reproduce the above copyright +;// notice, this list of conditions and the following disclaimer in the +;// documentation and/or other materials provided with the +;// distribution. +;// +;// Neither the name of Texas Instruments Incorporated nor the names of +;// its contributors may be used to endorse or promote products derived +;// from this software without specific prior written permission. +;// +;// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +;// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +;// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +;// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +;// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +;// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +;// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +;// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +;// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +;// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +;// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +;// $ +;//########################################################################### + +; The "csmpasswords" section contains the actual CSM passwords that will be +; linked and programmed into to the CSM password locations (PWL) in flash. +; These passwords must be known in order to unlock the CSM module. +; All 0xFFFF's (erased) is the default value for the password locations (PWL). + +; It is recommended that all passwords be left as 0xFFFF during code +; development. Passwords of 0xFFFF do not activate code security and dummy +; reads of the CSM PWL registers is all that is required to unlock the CSM. +; When code development is complete, modify the passwords to activate the +; code security module. + + .sect "csmpasswds" + + .int 0xFFFF ;PWL0 (LSW of 128-bit password) + .int 0xFFFF ;PWL1 + .int 0xFFFF ;PWL2 + .int 0xFFFF ;PWL3 + .int 0xFFFF ;PWL4 + .int 0xFFFF ;PWL5 + .int 0xFFFF ;PWL6 + .int 0xFFFF ;PWL7 (MSW of 128-bit password) + +;---------------------------------------------------------------------- + +; For code security operation, all addresses between 0x33FF80 and +; 0X33fff5 cannot be used as program code or data. These locations +; must be programmed to 0x0000 when the code security password locations +; (PWL) are programmed. If security is not a concern, then these addresses +; can be used for code or data. + +; The section "csm_rsvd" can be used to program these locations to 0x0000. + + .sect "csm_rsvd" + .loop (33FFF5h - 33FF80h + 1) + .int 0x0000 + .endloop + +;//=========================================================================== +;// End of file. +;//=========================================================================== + + diff --git a/F28335/DSP2833x_CodeStartBranch.asm b/F28335/DSP2833x_CodeStartBranch.asm index 8507428..c4e5572 100644 --- a/F28335/DSP2833x_CodeStartBranch.asm +++ b/F28335/DSP2833x_CodeStartBranch.asm @@ -27,10 +27,39 @@ ;// to _c_init00 and thus there is no worry and this warning can be ignored. ;// ;//########################################################################### -;// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -;// $Release Date: November 1, 2016 $ -;// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -;// http://www.ti.com/ ALL RIGHTS RESERVED $ +;// $TI Release: 2833x/2823x Header Files V1.32 $ +;// $Release Date: June 28, 2010 $ +;// $Copyright: +;// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +;// +;// Redistribution and use in source and binary forms, with or without +;// modification, are permitted provided that the following conditions +;// are met: +;// +;// Redistributions of source code must retain the above copyright +;// notice, this list of conditions and the following disclaimer. +;// +;// Redistributions in binary form must reproduce the above copyright +;// notice, this list of conditions and the following disclaimer in the +;// documentation and/or other materials provided with the +;// distribution. +;// +;// Neither the name of Texas Instruments Incorporated nor the names of +;// its contributors may be used to endorse or promote products derived +;// from this software without specific prior written permission. +;// +;// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +;// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +;// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +;// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +;// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +;// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +;// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +;// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +;// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +;// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +;// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +;// $ ;//########################################################################### diff --git a/F28335/DSP2833x_CpuTimers.c b/F28335/DSP2833x_CpuTimers.c index fdce733..ae9c20d 100644 --- a/F28335/DSP2833x_CpuTimers.c +++ b/F28335/DSP2833x_CpuTimers.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/4 $ +// Checkin $Date: July 9, 2009 10:51:59 $ //########################################################################### // // FILE: DSP2833x_CpuTimers.c @@ -11,10 +13,39 @@ // on integrating DSP-BIOS or another realtime OS. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // @@ -126,7 +157,11 @@ ConfigCpuTimer(struct CPUTIMER_VARS *Timer, float Freq, float Period) Timer->CPUFreqInMHz = Freq; Timer->PeriodInUSec = Period; temp = (long) (Freq * Period); - Timer->RegsAddr->PRD.all = temp; + + // + // Counter decrements PRD+1 times each period + // + Timer->RegsAddr->PRD.all = temp - 1; // // Set pre-scale counter to divide by 1 (SYSCLKOUT) diff --git a/F28335/DSP2833x_CpuTimers.h b/F28335/DSP2833x_CpuTimers.h index 9cc32ab..cfe478f 100644 --- a/F28335/DSP2833x_CpuTimers.h +++ b/F28335/DSP2833x_CpuTimers.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/4 $ +// Checkin $Date: March 20, 2007 15:33:42 $ //########################################################################### // // FILE: DSP2833x_CpuTimers.h @@ -14,10 +16,39 @@ // timers if using DSP-BIOS or another realtime OS. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_CPU_TIMERS_H diff --git a/F28335/DSP2833x_DBGIER.asm b/F28335/DSP2833x_DBGIER.asm new file mode 100644 index 0000000..cb2189a --- /dev/null +++ b/F28335/DSP2833x_DBGIER.asm @@ -0,0 +1,59 @@ +;// TI File $Revision: /main/1 $ +;// Checkin $Date: August 18, 2006 13:46:03 $ +;//########################################################################### +;// +;// FILE: DSP2833x_DBGIER.asm +;// +;// TITLE: Set the DBGIER register +;// +;// DESCRIPTION: +;// +;// Function to set the DBGIER register (for realtime emulation). +;// Function Prototype: void SetDBGIER(Uint16) +;// Useage: SetDBGIER(value); +;// Input Parameters: Uint16 value = value to put in DBGIER register. +;// Return Value: none +;// +;//########################################################################### +;// $TI Release: 2833x/2823x Header Files V1.32 $ +;// $Release Date: June 28, 2010 $ +;// $Copyright: +;// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +;// +;// Redistribution and use in source and binary forms, with or without +;// modification, are permitted provided that the following conditions +;// are met: +;// +;// Redistributions of source code must retain the above copyright +;// notice, this list of conditions and the following disclaimer. +;// +;// Redistributions in binary form must reproduce the above copyright +;// notice, this list of conditions and the following disclaimer in the +;// documentation and/or other materials provided with the +;// distribution. +;// +;// Neither the name of Texas Instruments Incorporated nor the names of +;// its contributors may be used to endorse or promote products derived +;// from this software without specific prior written permission. +;// +;// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +;// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +;// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +;// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +;// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +;// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +;// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +;// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +;// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +;// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +;// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +;// $ +;//########################################################################### + .global _SetDBGIER + .text + +_SetDBGIER: + MOV *SP++,AL + POP DBGIER + LRETR + diff --git a/F28335/DSP2833x_DMA.c b/F28335/DSP2833x_DMA.c index e35de45..12a2c38 100644 --- a/F28335/DSP2833x_DMA.c +++ b/F28335/DSP2833x_DMA.c @@ -5,10 +5,39 @@ // TITLE: DSP2833x Device DMA Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_DMA.h b/F28335/DSP2833x_DMA.h index 49cb243..4ce9ce2 100644 --- a/F28335/DSP2833x_DMA.h +++ b/F28335/DSP2833x_DMA.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/11 $ +// Checkin $Date: June 23, 2008 11:34:15 $ //########################################################################### // // FILE: DSP2833x_DMA.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x DMA Module Register Bit Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_DMA_H diff --git a/F28335/DSP2833x_DefaultIsr.c b/F28335/DSP2833x_DefaultIsr.c index 0842ffc..b0a52d0 100644 --- a/F28335/DSP2833x_DefaultIsr.c +++ b/F28335/DSP2833x_DefaultIsr.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: January 14, 2008 11:17:46 $ //########################################################################### // // FILE: DSP2833x_DefaultIsr.c @@ -15,10 +17,39 @@ // production firmware. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_DefaultIsr.h b/F28335/DSP2833x_DefaultIsr.h index 0d969f0..712b04b 100644 --- a/F28335/DSP2833x_DefaultIsr.h +++ b/F28335/DSP2833x_DefaultIsr.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:45:37 $ //########################################################################### // // FILE: DSP2833x_DefaultIsr.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Devices Default Interrupt Service Routines Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: $ +// $Release Date: $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_DEFAULT_ISR_H diff --git a/F28335/DSP2833x_DevEmu.h b/F28335/DSP2833x_DevEmu.h index 7ff52c0..0aa33dc 100644 --- a/F28335/DSP2833x_DevEmu.h +++ b/F28335/DSP2833x_DevEmu.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/4 $ +// Checkin $Date: April 15, 2009 10:05:17 $ //########################################################################### // // FILE: DSP2833x_DevEmu.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device Emulation Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_DEV_EMU_H diff --git a/F28335/DSP2833x_Device.h b/F28335/DSP2833x_Device.h index 56c5a7e..ff2d98b 100644 --- a/F28335/DSP2833x_Device.h +++ b/F28335/DSP2833x_Device.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/5 $ +// Checkin $Date: January 22, 2008 16:55:35 $ //########################################################################### // // FILE: DSP2833x_Device.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_DEVICE_H @@ -99,24 +130,24 @@ typedef long double float64; // // Included Peripheral Header Files // -#include "F28335/DSP2833x_Adc.h" // ADC Registers -#include "F28335/DSP2833x_DevEmu.h" // Device Emulation Registers -#include "F28335/DSP2833x_CpuTimers.h" // 32-bit CPU Timers -#include "F28335/DSP2833x_ECan.h" // Enhanced eCAN Registers -#include "F28335/DSP2833x_ECap.h" // Enhanced Capture -#include "F28335/DSP2833x_DMA.h" // DMA Registers -#include "F28335/DSP2833x_EPwm.h" // Enhanced PWM -#include "F28335/DSP2833x_EQep.h" // Enhanced QEP -#include "F28335/DSP2833x_Gpio.h" // General Purpose I/O Registers -#include "F28335/DSP2833x_I2c.h" // I2C Registers -#include "F28335/DSP2833x_Mcbsp.h" // McBSP -#include "F28335/DSP2833x_PieCtrl.h" // PIE Control Registers -#include "F28335/DSP2833x_PieVect.h" // PIE Vector Table -#include "F28335/DSP2833x_Spi.h" // SPI Registers -#include "F28335/DSP2833x_Sci.h" // SCI Registers -#include "F28335/DSP2833x_SysCtrl.h" // System Control/Power Modes -#include "F28335/DSP2833x_XIntrupt.h" // External Interrupts -#include "F28335/DSP2833x_Xintf.h" // XINTF External Interface +#include "DSP2833x_Adc.h" // ADC Registers +#include "DSP2833x_DevEmu.h" // Device Emulation Registers +#include "DSP2833x_CpuTimers.h" // 32-bit CPU Timers +#include "DSP2833x_ECan.h" // Enhanced eCAN Registers +#include "DSP2833x_ECap.h" // Enhanced Capture +#include "DSP2833x_DMA.h" // DMA Registers +#include "DSP2833x_EPwm.h" // Enhanced PWM +#include "DSP2833x_EQep.h" // Enhanced QEP +#include "DSP2833x_Gpio.h" // General Purpose I/O Registers +#include "DSP2833x_I2c.h" // I2C Registers +#include "DSP2833x_Mcbsp.h" // McBSP +#include "DSP2833x_PieCtrl.h" // PIE Control Registers +#include "DSP2833x_PieVect.h" // PIE Vector Table +#include "DSP2833x_Spi.h" // SPI Registers +#include "DSP2833x_Sci.h" // SCI Registers +#include "DSP2833x_SysCtrl.h" // System Control/Power Modes +#include "DSP2833x_XIntrupt.h" // External Interrupts +#include "DSP2833x_Xintf.h" // XINTF External Interface #if DSP28_28335 || DSP28_28333 #define DSP28_EPWM1 1 diff --git a/F28335/DSP2833x_DisInt.asm b/F28335/DSP2833x_DisInt.asm new file mode 100644 index 0000000..af941ba --- /dev/null +++ b/F28335/DSP2833x_DisInt.asm @@ -0,0 +1,96 @@ +;// TI File $Revision: /main/1 $ +;// Checkin $Date: August 18, 2006 13:46:09 $ +;//########################################################################### +;// +;// FILE: DSP2833x_DisInt.asm +;// +;// TITLE: Disable and Restore INTM and DBGM +;// +;// Function Prototypes: +;// +;// Uint16 DSP28x_DisableInt(); +;// and void DSP28x_RestoreInt(Uint16 Stat0); +;// +;// Usage: +;// +;// DSP28x_DisableInt() sets both the INTM and DBGM +;// bits to disable maskable interrupts. Before doing +;// this, the current value of ST1 is stored on the stack +;// so that the values can be restored later. The value +;// of ST1 before the masks are set is returned to the +;// user in AL. This is then used to restore their state +;// via the DSP28x_RestoreInt(Uint16 ST1) function. +;// +;// Example +;// +;// Uint16 StatusReg1 +;// StatusReg1 = DSP28x_DisableInt(); +;// +;// ... May also want to disable INTM here +;// +;// ... code here +;// +;// DSP28x_RestoreInt(StatusReg1); +;// +;// ... Restore INTM enable +;// +;//########################################################################### +;// $TI Release: 2833x/2823x Header Files V1.32 $ +;// $Release Date: June 28, 2010 $ +;// $Copyright: +;// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +;// +;// Redistribution and use in source and binary forms, with or without +;// modification, are permitted provided that the following conditions +;// are met: +;// +;// Redistributions of source code must retain the above copyright +;// notice, this list of conditions and the following disclaimer. +;// +;// Redistributions in binary form must reproduce the above copyright +;// notice, this list of conditions and the following disclaimer in the +;// documentation and/or other materials provided with the +;// distribution. +;// +;// Neither the name of Texas Instruments Incorporated nor the names of +;// its contributors may be used to endorse or promote products derived +;// from this software without specific prior written permission. +;// +;// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +;// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +;// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +;// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +;// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +;// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +;// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +;// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +;// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +;// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +;// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +;// $ +;//########################################################################### + + + + + .def _DSP28x_DisableInt + .def _DSP28x_RestoreInt + + +_DSP28x_DisableInt: + PUSH ST1 + SETC INTM,DBGM + MOV AL, *--SP + LRETR + +_DSP28x_RestoreInt: + MOV *SP++, AL + POP ST1 + LRETR + + +;//=========================================================================== +;// End of file. +;//=========================================================================== + + diff --git a/F28335/DSP2833x_Dma_defines.h b/F28335/DSP2833x_Dma_defines.h index 1d4fbcc..5b0001b 100644 --- a/F28335/DSP2833x_Dma_defines.h +++ b/F28335/DSP2833x_Dma_defines.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: August 14, 2007 16:32:29 $ //########################################################################### // // FILE: DSP2833x_Dma_defines.h @@ -5,10 +7,39 @@ // TITLE: #defines used in DMA examples // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: $ +// $Release Date: $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_DMA_DEFINES_H diff --git a/F28335/DSP2833x_ECan.c b/F28335/DSP2833x_ECan.c index c078c24..f8daa4e 100644 --- a/F28335/DSP2833x_ECan.c +++ b/F28335/DSP2833x_ECan.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/8 $ +// Checkin $Date: June 25, 2008 15:19:07 $ //########################################################################### // // FILE: DSP2833x_ECan.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x Enhanced CAN Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_ECan.h b/F28335/DSP2833x_ECan.h index 6960a00..95dd823 100644 --- a/F28335/DSP2833x_ECan.h +++ b/F28335/DSP2833x_ECan.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: May 7, 2007 16:05:39 $ //########################################################################### // // FILE: DSP2833x_ECan.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device eCAN Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_ECAN_H diff --git a/F28335/DSP2833x_ECap.c b/F28335/DSP2833x_ECap.c index 11ab3ff..b15a8b9 100644 --- a/F28335/DSP2833x_ECap.c +++ b/F28335/DSP2833x_ECap.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: March 15, 2007 16:54:36 $ //########################################################################### // // FILE: DSP2833x_ECap.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x eCAP Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_ECap.h b/F28335/DSP2833x_ECap.h index 4094945..6614163 100644 --- a/F28335/DSP2833x_ECap.h +++ b/F28335/DSP2833x_ECap.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:52:07 $ //########################################################################### // // FILE: DSP2833x_ECap.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Enhanced Capture Module Register Bit Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_ECAP_H diff --git a/F28335/DSP2833x_EPwm.c b/F28335/DSP2833x_EPwm.c index 4588a4b..6f81a37 100644 --- a/F28335/DSP2833x_EPwm.c +++ b/F28335/DSP2833x_EPwm.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:46:19 $ //########################################################################### // // FILE: DSP2833x_EPwm.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x ePWM Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_EPwm.h b/F28335/DSP2833x_EPwm.h index 5b0d62d..0df8e48 100644 --- a/F28335/DSP2833x_EPwm.h +++ b/F28335/DSP2833x_EPwm.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:52:10 $ //########################################################################### // // FILE: DSP2833x_EPwm.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Enhanced PWM Module Register Bit Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_EPWM_H diff --git a/F28335/DSP2833x_EPwm_defines.h b/F28335/DSP2833x_EPwm_defines.h index 2e8d602..9a06c75 100644 --- a/F28335/DSP2833x_EPwm_defines.h +++ b/F28335/DSP2833x_EPwm_defines.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:45:39 $ //########################################################################### // // FILE: DSP2833x_EPwm_defines.h @@ -5,10 +7,39 @@ // TITLE: #defines used in ePWM examples examples // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: $ +// $Release Date: $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_EPWM_DEFINES_H diff --git a/F28335/DSP2833x_EQep.c b/F28335/DSP2833x_EQep.c index 8adb9e5..9798e4d 100644 --- a/F28335/DSP2833x_EQep.c +++ b/F28335/DSP2833x_EQep.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/3 $ +// Checkin $Date: July 27, 2007 11:55:20 $ //########################################################################### // // FILE: DSP2833x_EQep.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x eQEP Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_EQep.h b/F28335/DSP2833x_EQep.h index 08d24bd..be86c38 100644 --- a/F28335/DSP2833x_EQep.h +++ b/F28335/DSP2833x_EQep.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:52:13 $ //########################################################################### // // FILE: DSP2833x_EQep.h @@ -6,10 +8,39 @@ // Register Bit Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_EQEP_H diff --git a/F28335/DSP2833x_Examples.h b/F28335/DSP2833x_Examples.h index bee9ff2..4d3413d 100644 --- a/F28335/DSP2833x_Examples.h +++ b/F28335/DSP2833x_Examples.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/9 $ +// Checkin $Date: July 2, 2008 14:31:12 $ //########################################################################### // // FILE: DSP2833x_Examples.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: $ +// $Release Date: $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_EXAMPLES_H @@ -101,24 +132,21 @@ extern "C" { // // Prototypes for global functions within the .c files. // -#include "F28335/DSP2833x_GlobalPrototypes.h" -#include "F28335/DSP2833x_EPwm_defines.h" // Macros used for PWM examples. -#include "F28335/DSP2833x_Dma_defines.h" // Macros used for DMA examples. -#include "F28335/DSP2833x_I2c_defines.h" // Macros used for I2C examples. +#include "DSP2833x_GlobalPrototypes.h" +#include "DSP2833x_EPwm_defines.h" // Macros used for PWM examples. +#include "DSP2833x_Dma_defines.h" // Macros used for DMA examples. +#include "DSP2833x_I2c_defines.h" // Macros used for I2C examples. #define PARTNO_28335 0xEF #define PARTNO_28334 0xEE #define PARTNO_28333 0xEA #define PARTNO_28332 0xED -#define PARTNO_28235 0xE8 -#define PARTNO_28234 0xE7 -#define PARTNO_28232 0xE6 // // Include files not used with DSP/BIOS // #ifndef DSP28_BIOS -#include "F28335/DSP2833x_DefaultIsr.h" +#include "DSP2833x_DefaultIsr.h" #endif // diff --git a/F28335/DSP2833x_GlobalPrototypes.h b/F28335/DSP2833x_GlobalPrototypes.h index 325a066..b5a7be5 100644 --- a/F28335/DSP2833x_GlobalPrototypes.h +++ b/F28335/DSP2833x_GlobalPrototypes.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/11 $ +// Checkin $Date: May 12, 2008 14:30:08 $ //########################################################################### // // FILE: DSP2833x_GlobalPrototypes.h @@ -5,10 +7,39 @@ // TITLE: Global prototypes for DSP2833x Examples // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: $ +// $Release Date: $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_GLOBALPROTOTYPES_H @@ -205,7 +236,7 @@ extern void InitSpiaGpio(void); extern void InitSysCtrl(void); extern void InitTzGpio(void); extern void InitXIntrupt(void); -extern void XintfInit(void); +extern void InitXintf(void); extern void InitXintf16Gpio(); extern void InitXintf32Gpio(); extern void InitPll(Uint16 pllcr, Uint16 clkindiv); diff --git a/F28335/DSP2833x_GlobalVariableDefs.c b/F28335/DSP2833x_GlobalVariableDefs.c index 8be4d20..38a0341 100644 --- a/F28335/DSP2833x_GlobalVariableDefs.c +++ b/F28335/DSP2833x_GlobalVariableDefs.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/4 $ +// Checkin $Date: June 2, 2008 11:12:33 $ //########################################################################### // // FILE: DSP2833x_GlobalVariableDefs.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x Global Variables and Data Section Pragmas. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_Gpio.c b/F28335/DSP2833x_Gpio.c index 7276375..28f4e6f 100644 --- a/F28335/DSP2833x_Gpio.c +++ b/F28335/DSP2833x_Gpio.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:46:25 $ //########################################################################### // // FILE: DSP2833x_Gpio.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x General Purpose I/O Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_Gpio.h b/F28335/DSP2833x_Gpio.h index c1f3e8c..4714194 100644 --- a/F28335/DSP2833x_Gpio.h +++ b/F28335/DSP2833x_Gpio.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/4 $ +// Checkin $Date: November 15, 2007 09:58:53 $ //########################################################################### // // FILE: DSP2833x_Gpio.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x General Purpose I/O Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_GPIO_H diff --git a/F28335/DSP2833x_I2C.c b/F28335/DSP2833x_I2C.c index 83bf050..58d7bd2 100644 --- a/F28335/DSP2833x_I2C.c +++ b/F28335/DSP2833x_I2C.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:46:27 $ //########################################################################### // // FILE: DSP2833x_I2C.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x SCI Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_I2c.h b/F28335/DSP2833x_I2c.h index ebf6b3e..e2d1e35 100644 --- a/F28335/DSP2833x_I2c.h +++ b/F28335/DSP2833x_I2c.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: March 22, 2007 10:40:22 $ //########################################################################### // // FILE: DSP2833x_I2c.h @@ -6,10 +8,39 @@ // Register Bit Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_I2C_H diff --git a/F28335/DSP2833x_I2c_defines.h b/F28335/DSP2833x_I2c_defines.h index 9ea1efc..c40164d 100644 --- a/F28335/DSP2833x_I2c_defines.h +++ b/F28335/DSP2833x_I2c_defines.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: April 16, 2008 17:16:47 $ //########################################################################### // // FILE: DSP2833x_I2cExample.h @@ -5,10 +7,39 @@ // TITLE: 2833x I2C Example Code Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: $ +// $Release Date: $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_I2C_DEFINES_H diff --git a/F28335/DSP2833x_Mcbsp.c b/F28335/DSP2833x_Mcbsp.c new file mode 100644 index 0000000..e18dcee --- /dev/null +++ b/F28335/DSP2833x_Mcbsp.c @@ -0,0 +1,552 @@ +// TI File $Revision: /main/16 $ +// Checkin $Date: October 3, 2007 14:50:19 $ +//########################################################################### +// +// FILE: DSP2833x_McBSP.c +// +// TITLE: DSP2833x Device McBSP Initialization & Support Functions. +// +//########################################################################### +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ +//########################################################################### + +// +// Included Files +// +#include "DSP2833x_Device.h" // DSP2833x Headerfile Include File +#include "DSP2833x_Examples.h" // DSP2833x Examples Include File + +// +// MCBSP_INIT_DELAY determines the amount of CPU cycles in the 2 sample rate +// generator (SRG) cycles required for the Mcbsp initialization routine. +// MCBSP_CLKG_DELAY determines the amount of CPU cycles in the 2 clock +// generator (CLKG) cycles required for the Mcbsp initialization routine. +// For the functions defined in Mcbsp.c, MCBSP_INIT_DELAY and MCBSP_CLKG_DELAY +// are based off of either a 150 MHz SYSCLKOUT (default) or a 100 MHz SYSCLKOUT +// + +// +// CPU_FRQ_100MHZ and CPU_FRQ_150MHZ are defined in DSP2833x_Examples.h +// + +// +// For 150 MHz SYSCLKOUT(default) +// +#if CPU_FRQ_150MHZ + #define CPU_SPD 150E6 + + // + // SRG input is LSPCLK (SYSCLKOUT/4) for examples + // + #define MCBSP_SRG_FREQ CPU_SPD/4 +#endif + +// +// For 100 MHz SYSCLKOUT +// +#if CPU_FRQ_100MHZ + #define CPU_SPD 100E6 + + // + // SRG input is LSPCLK (SYSCLKOUT/4) for examples + // + #define MCBSP_SRG_FREQ CPU_SPD/4 +#endif + +#define CLKGDV_VAL 1 + +// +// # of CPU cycles in 2 SRG cycles-init delay +// +#define MCBSP_INIT_DELAY 2*(CPU_SPD/MCBSP_SRG_FREQ) + +// +// # of CPU cycles in 2 CLKG cycles-init delay +// +#define MCBSP_CLKG_DELAY 2*(CPU_SPD/(MCBSP_SRG_FREQ/(1+CLKGDV_VAL))) + +// +// Function Prototypes +// +void delay_loop(void); // Delay function used for SRG initialization +void clkg_delay_loop(void); // Delay function used for CLKG initialization + +// +// InitMcbsp - This function initializes the McBSP to a known state. +// +void InitMcbsp(void) +{ + InitMcbspa(); +#if DSP28_MCBSPB + InitMcbspb(); +#endif // end DSP28_MCBSPB +} + +// +// InitMcbspa - This function initializes McBSPa to a known state. +// +void +InitMcbspa(void) +{ + // + // McBSP-A register settings + // + + // + // Reset FS generator, sample rate generator & transmitter + // + McbspaRegs.SPCR2.all=0x0000; + + McbspaRegs.SPCR1.all=0x0000; // Reset Receiver, Right justify word + + // + // Enable loopback mode for test. + // Comment out for normal McBSP transfer mode. + // + McbspaRegs.SPCR1.bit.DLB = 1; + + McbspaRegs.MFFINT.all=0x0; // Disable all interrupts + + // + // Single-phase frame, 1 word/frame, No companding (Receive) + // + McbspaRegs.RCR2.all=0x0; + McbspaRegs.RCR1.all=0x0; + + // + // Single-phase frame, 1 word/frame, No companding (Transmit) + // + McbspaRegs.XCR2.all=0x0; + McbspaRegs.XCR1.all=0x0; + + // + // FSX generated internally, FSR derived from an external source + // + McbspaRegs.PCR.bit.FSXM = 1; + + // + // CLKX generated internally, CLKR derived from an external source + // + McbspaRegs.PCR.bit.CLKXM = 1; + + // + // CLKSM=1 (If SCLKME=0, i/p clock to SRG is LSPCLK) + // + McbspaRegs.SRGR2.bit.CLKSM = 1; + + McbspaRegs.SRGR2.bit.FPER = 31; // FPER = 32 CLKG periods + + McbspaRegs.SRGR1.bit.FWID = 0; // Frame Width = 1 CLKG period + + // + // CLKG frequency = LSPCLK/(CLKGDV+1) + // + McbspaRegs.SRGR1.bit.CLKGDV = CLKGDV_VAL; + + delay_loop(); // Wait at least 2 SRG clock cycles + + McbspaRegs.SPCR2.bit.GRST=1; // Enable the sample rate generator + clkg_delay_loop(); // Wait at least 2 CLKG cycles + McbspaRegs.SPCR2.bit.XRST=1; // Release TX from Reset + McbspaRegs.SPCR1.bit.RRST=1; // Release RX from Reset + McbspaRegs.SPCR2.bit.FRST=1; // Frame Sync Generator reset +} + +// +// InitMcbspb - This function initializes McBSPb to a known state. +// +#if (DSP28_MCBSPB) +void +InitMcbspb(void) +{ + // + // McBSP-B register settings + // + + // + // Reset FS generator, sample rate generator & transmitter + // + McbspbRegs.SPCR2.all=0x0000; + + McbspbRegs.SPCR1.all=0x0000; // Reset Receiver, Right justify word + + // + // Enable loopback mode for test. + // Comment out for normal McBSP transfer mode. + // + McbspbRegs.SPCR1.bit.DLB = 1; + + McbspbRegs.MFFINT.all=0x0; // Disable all interrupts + + // + // Single-phase frame, 1 word/frame, No companding (Receive) + // + McbspbRegs.RCR2.all=0x0; + McbspbRegs.RCR1.all=0x0; + + // + // Single-phase frame, 1 word/frame, No companding (Transmit) + // + McbspbRegs.XCR2.all=0x0; + McbspbRegs.XCR1.all=0x0; + + // + // CLKSM=1 (If SCLKME=0, i/p clock to SRG is LSPCLK) + // + McbspbRegs.SRGR2.bit.CLKSM = 1; + McbspbRegs.SRGR2.bit.FPER = 31; // FPER = 32 CLKG periods + + McbspbRegs.SRGR1.bit.FWID = 0; // Frame Width = 1 CLKG period + + // + // CLKG frequency = LSPCLK/(CLKGDV+1) + // + McbspbRegs.SRGR1.bit.CLKGDV = CLKGDV_VAL; + + // + // FSX generated internally, FSR derived from an external source + // + McbspbRegs.PCR.bit.FSXM = 1; + + // + // CLKX generated internally, CLKR derived from an external source + // + McbspbRegs.PCR.bit.CLKXM = 1; + + delay_loop(); // Wait at least 2 SRG clock cycles + McbspbRegs.SPCR2.bit.GRST=1; // Enable the sample rate generator + clkg_delay_loop(); // Wait at least 2 CLKG cycles + McbspbRegs.SPCR2.bit.XRST=1; // Release TX from Reset + McbspbRegs.SPCR1.bit.RRST=1; // Release RX from Reset + McbspbRegs.SPCR2.bit.FRST=1; // Frame Sync Generator reset +} +#endif // end DSP28_MCBSPB + +// +// InitMcbspa8bit - McBSP-A 8-bit Length +// +void +InitMcbspa8bit(void) +{ + McbspaRegs.RCR1.bit.RWDLEN1=0; // 8-bit word + McbspaRegs.XCR1.bit.XWDLEN1=0; // 8-bit word +} + +// +// InitMcbspa12bit - McBSP-A 12 bit Length +// +void +InitMcbspa12bit(void) +{ + McbspaRegs.RCR1.bit.RWDLEN1=1; // 12-bit word + McbspaRegs.XCR1.bit.XWDLEN1=1; // 12-bit word +} + +// +// InitMcbspa16bit - McBSP-A 16 bit Length +// +void +InitMcbspa16bit(void) +{ + McbspaRegs.RCR1.bit.RWDLEN1=2; // 16-bit word + McbspaRegs.XCR1.bit.XWDLEN1=2; // 16-bit word +} + +// +// InitMcbspa20bit - McBSP-A 20 bit Length +// +void +InitMcbspa20bit(void) +{ + McbspaRegs.RCR1.bit.RWDLEN1=3; // 20-bit word + McbspaRegs.XCR1.bit.XWDLEN1=3; // 20-bit word +} + +// +// InitMcbspa24bit - McBSP-A 24 bit Length +// +void +InitMcbspa24bit(void) +{ + McbspaRegs.RCR1.bit.RWDLEN1=4; // 24-bit word + McbspaRegs.XCR1.bit.XWDLEN1=4; // 24-bit word +} + +// +// InitMcbspa32bit - McBSP-A 32 bit Length +// +void +InitMcbspa32bit(void) +{ + McbspaRegs.RCR1.bit.RWDLEN1=5; // 32-bit word + McbspaRegs.XCR1.bit.XWDLEN1=5; // 32-bit word +} + +// +// McBSP-B Data Lengths +// +#if (DSP28_MCBSPB) +// +// InitMcbspb8bit - McBSP-B 8-bit Length +// +void +InitMcbspb8bit(void) +{ + McbspbRegs.RCR1.bit.RWDLEN1=0; // 8-bit word + McbspbRegs.XCR1.bit.XWDLEN1=0; // 8-bit word +} + +// +// InitMcbspb12bit - McBSP-B 12 bit Length +// +void +InitMcbspb12bit(void) +{ + McbspbRegs.RCR1.bit.RWDLEN1=1; // 12-bit word + McbspbRegs.XCR1.bit.XWDLEN1=1; // 12-bit word +} + +// +// InitMcbspb16bit - McBSP-B 16 bit Length +// +void +InitMcbspb16bit(void) +{ + McbspbRegs.RCR1.bit.RWDLEN1=2; // 16-bit word + McbspbRegs.XCR1.bit.XWDLEN1=2; // 16-bit word +} + +// +// InitMcbspb20bit - McBSP-B 20 bit Length +// +void +InitMcbspb20bit(void) +{ + McbspbRegs.RCR1.bit.RWDLEN1=3; // 20-bit word + McbspbRegs.XCR1.bit.XWDLEN1=3; // 20-bit word +} + +// +// InitMcbspb24bit - McBSP-B 24 bit Length +// +void +InitMcbspb24bit(void) +{ + McbspbRegs.RCR1.bit.RWDLEN1=4; // 24-bit word + McbspbRegs.XCR1.bit.XWDLEN1=4; // 24-bit word +} + +// +// InitMcbspb32bit - McBSP-B 32 bit Length +// +void +InitMcbspb32bit(void) +{ + McbspbRegs.RCR1.bit.RWDLEN1=5; // 32-bit word + McbspbRegs.XCR1.bit.XWDLEN1=5; // 32-bit word +} + +#endif //end DSP28_MCBSPB + +// +// InitMcbspGpio - +// +void +InitMcbspGpio(void) +{ + InitMcbspaGpio(); +#if DSP28_MCBSPB + InitMcbspbGpio(); +#endif // end DSP28_MCBSPB +} + +// +// InitMcbspaGpio - This function initializes GPIO pins to function as McBSP-A +// +void +InitMcbspaGpio(void) +{ + EALLOW; + + // + // Configure McBSP-A pins using GPIO regs + // This specifies which of the possible GPIO pins will be McBSP functional + // pins. + // Comment out other unwanted lines. + // + GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 2; // GPIO20 is MDXA pin + GpioCtrlRegs.GPAMUX2.bit.GPIO21 = 2; // GPIO21 is MDRA pin + GpioCtrlRegs.GPAMUX2.bit.GPIO22 = 2; // GPIO22 is MCLKXA pin + GpioCtrlRegs.GPAMUX1.bit.GPIO7 = 2; // GPIO7 is MCLKRA pin + //GpioCtrlRegs.GPBMUX2.bit.GPIO58 = 1; // GPIO58 is MCLKRA pin + GpioCtrlRegs.GPAMUX2.bit.GPIO23 = 2; // GPIO23 is MFSXA pin + GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 2; // GPIO5 is MFSRA pin + //GpioCtrlRegs.GPBMUX2.bit.GPIO59 = 1; // GPIO59 is MFSRA pin + + // + // Enable internal pull-up for the selected pins + // Pull-ups can be enabled or disabled by the user. + // This will enable the pullups for the specified pins. + // Comment out other unwanted lines. + // + GpioCtrlRegs.GPAPUD.bit.GPIO20 = 0; // Enable pull-up on GPIO20 (MDXA) + GpioCtrlRegs.GPAPUD.bit.GPIO21 = 0; // Enable pull-up on GPIO21 (MDRA) + GpioCtrlRegs.GPAPUD.bit.GPIO22 = 0; // Enable pull-up on GPIO22 (MCLKXA) + GpioCtrlRegs.GPAPUD.bit.GPIO7 = 0; // Enable pull-up on GPIO7 (MCLKRA) + //GpioCtrlRegs.GPBPUD.bit.GPIO58 = 0; // Enable pull-up on GPIO58 (MCLKRA) + GpioCtrlRegs.GPAPUD.bit.GPIO23 = 0; // Enable pull-up on GPIO23 (MFSXA) + GpioCtrlRegs.GPAPUD.bit.GPIO5 = 0; // Enable pull-up on GPIO5 (MFSRA) + //GpioCtrlRegs.GPBPUD.bit.GPIO59 = 0; // Enable pull-up on GPIO59 (MFSRA) + + // + // Set qualification for selected input pins to asynch only + // This will select asynch (no qualification) for the selected pins. + // Comment out other unwanted lines. + // + GpioCtrlRegs.GPAQSEL2.bit.GPIO21 = 3; // Asynch input GPIO21 (MDRA) + GpioCtrlRegs.GPAQSEL2.bit.GPIO22 = 3; // Asynch input GPIO22 (MCLKXA) + GpioCtrlRegs.GPAQSEL1.bit.GPIO7 = 3; // Asynch input GPIO7 (MCLKRA) + //GpioCtrlRegs.GPBQSEL2.bit.GPIO58 = 3; // Asynch input GPIO58(MCLKRA) + GpioCtrlRegs.GPAQSEL2.bit.GPIO23 = 3; // Asynch input GPIO23 (MFSXA) + GpioCtrlRegs.GPAQSEL1.bit.GPIO5 = 3; // Asynch input GPIO5 (MFSRA) + //GpioCtrlRegs.GPBQSEL2.bit.GPIO59 = 3; // Asynch input GPIO59 (MFSRA) + + EDIS; +} + +// +// InitMcbspbGpio - This function initializes GPIO pins to function as McBSP-B +// +#if DSP28_MCBSPB +void +InitMcbspbGpio(void) +{ + EALLOW; + + // + // Configure McBSP-A pins using GPIO regs + // This specifies which of the possible GPIO pins will be McBSP functional + // pins. + // Comment out other unwanted lines. + //GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 3; // GPIO12 is MDXB pin + GpioCtrlRegs.GPAMUX2.bit.GPIO24 = 3; // GPIO24 is MDXB pin + //GpioCtrlRegs.GPAMUX1.bit.GPIO13 = 3; // GPIO13 is MDRB pin + GpioCtrlRegs.GPAMUX2.bit.GPIO25 = 3; // GPIO25 is MDRB pin + //GpioCtrlRegs.GPAMUX1.bit.GPIO14 = 3; // GPIO14 is MCLKXB pin + GpioCtrlRegs.GPAMUX2.bit.GPIO26 = 3; // GPIO26 is MCLKXB pin + GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 3; // GPIO3 is MCLKRB pin + //GpioCtrlRegs.GPBMUX2.bit.GPIO60 = 1; // GPIO60 is MCLKRB pin + //GpioCtrlRegs.GPAMUX1.bit.GPIO15 = 3; // GPIO15 is MFSXB pin + GpioCtrlRegs.GPAMUX2.bit.GPIO27 = 3; // GPIO27 is MFSXB pin + GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 3; // GPIO1 is MFSRB pin + //GpioCtrlRegs.GPBMUX2.bit.GPIO61 = 1; // GPIO61 is MFSRB pin + + // + // Enable internal pull-up for the selected pins + // Pull-ups can be enabled or disabled by the user. + // This will enable the pullups for the specified pins. + // Comment out other unwanted lines. + // + GpioCtrlRegs.GPAPUD.bit.GPIO24 = 0; //Enable pull-up on GPIO24 (MDXB) + //GpioCtrlRegs.GPAPUD.bit.GPIO12 = 0; //Enable pull-up on GPIO12 (MDXB) + GpioCtrlRegs.GPAPUD.bit.GPIO25 = 0; //Enable pull-up on GPIO25 (MDRB) + //GpioCtrlRegs.GPAPUD.bit.GPIO13 = 0; //Enable pull-up on GPIO13 (MDRB) + GpioCtrlRegs.GPAPUD.bit.GPIO26 = 0; //Enable pull-up on GPIO26 (MCLKXB) + //GpioCtrlRegs.GPAPUD.bit.GPIO14 = 0; //Enable pull-up on GPIO14 (MCLKXB) + GpioCtrlRegs.GPAPUD.bit.GPIO3 = 0; //Enable pull-up on GPIO3 (MCLKRB) + //GpioCtrlRegs.GPBPUD.bit.GPIO60 = 0; //Enable pull-up on GPIO60 (MCLKRB) + GpioCtrlRegs.GPAPUD.bit.GPIO27 = 0; //Enable pull-up on GPIO27 (MFSXB) + //GpioCtrlRegs.GPAPUD.bit.GPIO15 = 0; //Enable pull-up on GPIO15 (MFSXB) + GpioCtrlRegs.GPAPUD.bit.GPIO1 = 0; //Enable pull-up on GPIO1 (MFSRB) + //GpioCtrlRegs.GPBPUD.bit.GPIO61 = 0; //Enable pull-up on GPIO61 (MFSRB) + + // + // Set qualification for selected input pins to asynch only + // This will select asynch (no qualification) for the selected pins. + // Comment out other unwanted lines. + // + GpioCtrlRegs.GPAQSEL2.bit.GPIO25 = 3; // Asynch input GPIO25 (MDRB) + //GpioCtrlRegs.GPAQSEL1.bit.GPIO13 = 3; // Asynch input GPIO13 (MDRB) + GpioCtrlRegs.GPAQSEL2.bit.GPIO26 = 3; // Asynch input GPIO26(MCLKXB) + //GpioCtrlRegs.GPAQSEL1.bit.GPIO14 = 3; // Asynch input GPIO14 (MCLKXB) + GpioCtrlRegs.GPAQSEL1.bit.GPIO3 = 3; // Asynch input GPIO3 (MCLKRB) + //GpioCtrlRegs.GPBQSEL2.bit.GPIO60 = 3; // Asynch input GPIO60 (MCLKRB) + GpioCtrlRegs.GPAQSEL2.bit.GPIO27 = 3; // Asynch input GPIO27 (MFSXB) + //GpioCtrlRegs.GPAQSEL1.bit.GPIO15 = 3; // Asynch input GPIO15 (MFSXB) + GpioCtrlRegs.GPAQSEL1.bit.GPIO1 = 3; // Asynch input GPIO1 (MFSRB) + //GpioCtrlRegs.GPBQSEL2.bit.GPIO61 = 3; // Asynch input GPIO61 (MFSRB) + + EDIS; +} +#endif // end DSP28_MCBSPB + +// +// delay_loop - +// +void +delay_loop(void) +{ + long i; + + // + // delay in McBsp init. must be at least 2 SRG cycles + // + for (i = 0; i < MCBSP_INIT_DELAY; i++) + { + + } +} + +// +// clkg_delay_loop - +// +void +clkg_delay_loop(void) +{ + long i; + + // + // delay in McBsp init. must be at least 2 SRG cycles + // + for (i = 0; i < MCBSP_CLKG_DELAY; i++) + { + + } +} + +// +// End of File +// + diff --git a/F28335/DSP2833x_Mcbsp.h b/F28335/DSP2833x_Mcbsp.h index 7ddf813..ff7633e 100644 --- a/F28335/DSP2833x_Mcbsp.h +++ b/F28335/DSP2833x_Mcbsp.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/5 $ +// Checkin $Date: May 14, 2008 16:30:31 $ //########################################################################### // // FILE: DSP2833x_Mcbsp.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device McBSP Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_MCBSP_H diff --git a/F28335/DSP2833x_MemCopy.c b/F28335/DSP2833x_MemCopy.c index 6dbe540..da076ca 100644 --- a/F28335/DSP2833x_MemCopy.c +++ b/F28335/DSP2833x_MemCopy.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:46:33 $ //########################################################################### // // FILE: DSP2833x_MemCopy.c @@ -20,10 +22,39 @@ // end address is > then the first start address. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_PieCtrl.c b/F28335/DSP2833x_PieCtrl.c index 83fa8e6..0b46fcf 100644 --- a/F28335/DSP2833x_PieCtrl.c +++ b/F28335/DSP2833x_PieCtrl.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:46:35 $ //########################################################################### // // FILE: DSP2833x_PieCtrl.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device PIE Control Register Initialization Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_PieCtrl.h b/F28335/DSP2833x_PieCtrl.h index c6a5625..3b00d75 100644 --- a/F28335/DSP2833x_PieCtrl.h +++ b/F28335/DSP2833x_PieCtrl.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:52:24 $ //########################################################################### // // FILE: DSP2833x_PieCtrl.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device PIE Control Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_PIE_CTRL_H diff --git a/F28335/DSP2833x_PieVect.c b/F28335/DSP2833x_PieVect.c index 8ec72c0..8c8d479 100644 --- a/F28335/DSP2833x_PieVect.c +++ b/F28335/DSP2833x_PieVect.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:46:38 $ //########################################################################### // // FILE: DSP2833x_PieVect.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x Devices PIE Vector Table Initialization Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_PieVect.h b/F28335/DSP2833x_PieVect.h index 2f9be8f..4831619 100644 --- a/F28335/DSP2833x_PieVect.h +++ b/F28335/DSP2833x_PieVect.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: March 16, 2007 09:00:21 $ //########################################################################### // // FILE: DSP2833x_PieVect.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Devices PIE Vector Table Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_PIE_VECT_H diff --git a/F28335/DSP2833x_Sci.c b/F28335/DSP2833x_Sci.c index c9f4c00..73e8ae3 100644 --- a/F28335/DSP2833x_Sci.c +++ b/F28335/DSP2833x_Sci.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: March 1, 2007 16:06:07 $ //########################################################################### // // FILE: DSP2833x_Sci.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x SCI Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_Sci.h b/F28335/DSP2833x_Sci.h index 8b4ce1a..e19cb54 100644 --- a/F28335/DSP2833x_Sci.h +++ b/F28335/DSP2833x_Sci.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/2 $ +// Checkin $Date: March 1, 2007 15:57:02 $ //########################################################################### // // FILE: DSP2833x_Sci.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device SCI Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_SCI_H diff --git a/F28335/DSP2833x_Spi.c b/F28335/DSP2833x_Spi.c index 353ea73..1624a3a 100644 --- a/F28335/DSP2833x_Spi.c +++ b/F28335/DSP2833x_Spi.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:46:44 $ //########################################################################### // // FILE: DSP2833x_Spi.c @@ -5,10 +7,39 @@ // TITLE: DSP2833x SPI Initialization & Support Functions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // diff --git a/F28335/DSP2833x_Spi.h b/F28335/DSP2833x_Spi.h index 6c3cf94..3d2dc0f 100644 --- a/F28335/DSP2833x_Spi.h +++ b/F28335/DSP2833x_Spi.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/3 $ +// Checkin $Date: April 17, 2008 11:08:27 $ //########################################################################### // // FILE: DSP2833x_Spi.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device SPI Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_SPI_H diff --git a/F28335/DSP2833x_SysCtrl.c b/F28335/DSP2833x_SysCtrl.c index 8bb7b0a..59379b2 100644 --- a/F28335/DSP2833x_SysCtrl.c +++ b/F28335/DSP2833x_SysCtrl.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/8 $ +// Checkin $Date: April 15, 2009 09:54:05 $ //########################################################################### // // FILE: DSP2833x_SysCtrl.c @@ -7,10 +9,39 @@ // DESCRIPTION: Example initialization of system resources. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: $ +// $Release Date: $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // @@ -24,7 +55,13 @@ // a different section. This section will then be mapped to a load and // run address using the linker cmd file. // -#pragma CODE_SECTION(InitFlash, "ramfuncs"); +#ifdef __TI_COMPILER_VERSION__ + #if __TI_COMPILER_VERSION__ >= 15009000 + #pragma CODE_SECTION(InitFlash, ".TI.ramfunc"); + #else + #pragma CODE_SECTION(InitFlash, "ramfuncs"); + #endif +#endif // // InitSysCtrl - This function initializes the System Control registers to a diff --git a/F28335/DSP2833x_SysCtrl.h b/F28335/DSP2833x_SysCtrl.h index f04697f..a4564ad 100644 --- a/F28335/DSP2833x_SysCtrl.h +++ b/F28335/DSP2833x_SysCtrl.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/5 $ +// Checkin $Date: May 12, 2008 09:34:58 $ //########################################################################### // // FILE: DSP2833x_SysCtrl.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device System Control Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_SYS_CTRL_H diff --git a/F28335/DSP2833x_XIntrupt.h b/F28335/DSP2833x_XIntrupt.h index e0422b0..4c4b852 100644 --- a/F28335/DSP2833x_XIntrupt.h +++ b/F28335/DSP2833x_XIntrupt.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: August 18, 2006 13:52:39 $ //########################################################################### // // FILE: DSP2833x_XIntrupt.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device External Interrupt Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_XINTRUPT_H diff --git a/F28335/DSP2833x_Xintf.c b/F28335/DSP2833x_Xintf.c index 567641d..d4b3bff 100644 --- a/F28335/DSP2833x_Xintf.c +++ b/F28335/DSP2833x_Xintf.c @@ -1,3 +1,5 @@ +// TI File $Revision: /main/5 $ +// Checkin $Date: August 16, 2007 11:06:26 $ //########################################################################### // // FILE: DSP2833x_Xintf.c @@ -12,10 +14,39 @@ // examples/run_from_xintf project. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### // @@ -79,15 +110,15 @@ InitXintf(void) // Zone write timing // XintfRegs.XTIMING0.bit.XWRLEAD = 3; - XintfRegs.XTIMING0.bit.XWRACTIVE = 5; - XintfRegs.XTIMING0.bit.XWRTRAIL = 1; + XintfRegs.XTIMING0.bit.XWRACTIVE = 7; + XintfRegs.XTIMING0.bit.XWRTRAIL = 3; // // Zone read timing // XintfRegs.XTIMING0.bit.XRDLEAD = 3; - XintfRegs.XTIMING0.bit.XRDACTIVE = 5; - XintfRegs.XTIMING0.bit.XRDTRAIL = 1; + XintfRegs.XTIMING0.bit.XRDACTIVE = 7; + XintfRegs.XTIMING0.bit.XRDTRAIL = 3; // // double all Zone read/write lead/active/trail timing @@ -114,15 +145,15 @@ InitXintf(void) // Zone write timing // XintfRegs.XTIMING6.bit.XWRLEAD = 3; - XintfRegs.XTIMING6.bit.XWRACTIVE = 5; - XintfRegs.XTIMING6.bit.XWRTRAIL = 1; + XintfRegs.XTIMING6.bit.XWRACTIVE = 7; + XintfRegs.XTIMING6.bit.XWRTRAIL = 3; // // Zone read timing // XintfRegs.XTIMING6.bit.XRDLEAD = 3; - XintfRegs.XTIMING6.bit.XRDACTIVE = 5; - XintfRegs.XTIMING6.bit.XRDTRAIL = 1; + XintfRegs.XTIMING6.bit.XRDACTIVE = 7; + XintfRegs.XTIMING6.bit.XRDTRAIL = 3; // // double all Zone read/write lead/active/trail timing @@ -132,8 +163,8 @@ InitXintf(void) // // Zone will sample XREADY signal // - XintfRegs.XTIMING6.bit.USEREADY = 0; - XintfRegs.XTIMING6.bit.READYMODE = 0; // sample asynchronous + XintfRegs.XTIMING6.bit.USEREADY = 1; + XintfRegs.XTIMING6.bit.READYMODE = 1; // sample asynchronous // // Size must be either: diff --git a/F28335/DSP2833x_Xintf.h b/F28335/DSP2833x_Xintf.h index 1ebbf9a..1461873 100644 --- a/F28335/DSP2833x_Xintf.h +++ b/F28335/DSP2833x_Xintf.h @@ -1,3 +1,5 @@ +// TI File $Revision: /main/4 $ +// Checkin $Date: July 27, 2009 13:57:25 $ //########################################################################### // // FILE: DSP2833x_Xintf.h @@ -5,10 +7,39 @@ // TITLE: DSP2833x Device External Interface Register Definitions. // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: 2833x/2823x Header Files V1.32 $ +// $Release Date: June 28, 2010 $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP2833x_XINTF_H diff --git a/F28335/DSP28x_Project.h b/F28335/DSP28x_Project.h index 10a894e..545526b 100644 --- a/F28335/DSP28x_Project.h +++ b/F28335/DSP28x_Project.h @@ -1,4 +1,6 @@ +// TI File $Revision: /main/1 $ +// Checkin $Date: April 22, 2008 14:35:56 $ //########################################################################### // // FILE: DSP28x_Project.h @@ -6,17 +8,46 @@ // TITLE: DSP28x Project Headerfile and Examples Include File // //########################################################################### -// $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $ -// $Release Date: November 1, 2016 $ -// $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated - -// http://www.ti.com/ ALL RIGHTS RESERVED $ +// $TI Release: $ +// $Release Date: $ +// $Copyright: +// Copyright (C) 2009-2024 Texas Instruments Incorporated - http://www.ti.com/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// Neither the name of Texas Instruments Incorporated nor the names of +// its contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// $ //########################################################################### #ifndef DSP28x_PROJECT_H #define DSP28x_PROJECT_H -#include "F28335/DSP2833x_Device.h" // DSP2833x Headerfile Include File -#include "F28335/DSP2833x_Examples.h" // DSP2833x Examples Include File +#include "DSP2833x_Device.h" // DSP2833x Headerfile Include File +#include "DSP2833x_Examples.h" // DSP2833x Examples Include File #endif // end of DSP28x_PROJECT_H definition diff --git a/Periphery.cpp b/Periphery.cpp index 71fa5ad..cef17a9 100644 --- a/Periphery.cpp +++ b/Periphery.cpp @@ -141,6 +141,7 @@ void Periphery::getModbusConfiguration(){ } +#pragma CODE_SECTION("ramfuncs"); void Periphery::processDigitalInput(){ Uint16 data = 0; _digitalIO.readDigitalIO(data); @@ -148,6 +149,7 @@ void Periphery::processDigitalInput(){ } +#pragma CODE_SECTION("ramfuncs"); void Periphery::processDigitalOutput(){ if(_cana.isNewMessage(can_space::DIGITAL_OUTPUT_MBOX)){ _cana.receiveMsg(can_space::DIGITAL_OUTPUT_MBOX, _message); @@ -157,6 +159,7 @@ void Periphery::processDigitalOutput(){ } +#pragma CODE_SECTION("ramfuncs"); void Periphery::sendModbusDataToCPU(){ _message.mdl.all = 0; // TODO delete maybe? _message.mdh.all = 0; @@ -184,6 +187,7 @@ void Periphery::sendModbusDataToCPU(){ } +#pragma CODE_SECTION("ramfuncs"); void Periphery::receiveCpuModbusData(){ if (_cana.isNewMessage(can_space::MODBUS_DATA_CPU_TO_COMM_MBOX)) { _cana.receiveMsg(can_space::MODBUS_DATA_CPU_TO_COMM_MBOX, _message); diff --git a/Protocol/CAN.cpp b/Protocol/CAN.cpp index 154671e..89923ff 100644 --- a/Protocol/CAN.cpp +++ b/Protocol/CAN.cpp @@ -2,6 +2,7 @@ namespace can_space { +#pragma CODE_SECTION("ramfuncs"); void CAN::transmitMsg(Uint16 boxNumber, const CANMessage& message, bool writeDataLength){ if (boxNumber > 31) return; @@ -34,6 +35,7 @@ void CAN::transmitMsg(Uint16 boxNumber, const CANMessage& message, bool writeDat } +#pragma CODE_SECTION("ramfuncs"); void CAN::transmitMsg(Uint16 boxNumber, const Uint64& message, const Uint16 dlc){ if (boxNumber > 31) return; @@ -66,6 +68,7 @@ void CAN::transmitMsg(Uint16 boxNumber, const Uint64& message, const Uint16 dlc) } +#pragma CODE_SECTION("ramfuncs"); void CAN::transmitMsg(Uint16 boxNumber, const Uint64& message){ if (boxNumber > 31) return; @@ -119,6 +122,7 @@ void CAN::updateTXMessage(Uint16 boxNumber, const CANMessage& message){ // TODO } +#pragma CODE_SECTION("ramfuncs"); void CAN::sendRemoteRequest(Uint16 boxNumber){ if (boxNumber > 31) return; @@ -147,6 +151,7 @@ void CAN::sendRemoteRequest(Uint16 boxNumber){ } +#pragma CODE_SECTION("ramfuncs"); int16 CAN::receiveMsg(Uint16 boxNumber, CANMessage& rxMessage){ if (boxNumber > 31) { return -1; } @@ -179,11 +184,13 @@ int16 CAN::receiveMsg(Uint16 boxNumber, CANMessage& rxMessage){ } +#pragma CODE_SECTION("ramfuncs"); bool CAN::isNewMessage(){ return static_cast(p_CanRegs_->CANRMP.all); } +#pragma CODE_SECTION("ramfuncs"); bool CAN::isNewMessage(Uint16 boxNumber){ if (boxNumber > 31) { return 0; } @@ -212,6 +219,7 @@ void CAN::setTimeOutValue(Uint16 boxNumber, Uint32 canBitsNumber){ } +#pragma CODE_SECTION("ramfuncs"); bool CAN::isTimeOut(Uint16 boxNumber){ bool mBOXTimeOut = false; mBOXTimeOut = p_CanRegs_->CANTOS.all & (1ul << boxNumber); diff --git a/cmd/F28335_nonBIOS_flash.cmd b/cmd/F28335_nonBIOS_flash.cmd new file mode 100644 index 0000000..dd22ec0 --- /dev/null +++ b/cmd/F28335_nonBIOS_flash.cmd @@ -0,0 +1,130 @@ +/********************************************************************** +* File: F28335_nonBIOS_flash.cmd -- Linker command file for DSP/BIOS +* code with DSP in jump-to-flash boot mode. +* +* History: +* 01/20/11 - Deleted unneeded Boot ROM memory definitions. (D. Alter) +* 09/18/07 - original (D. Alter) +**********************************************************************/ +#ifndef PROGRAMM_FLASH +#define PROGRAMM_FLASH +//#undef PROGRAMM_FLASH +#endif + +MEMORY +{ +PAGE 0: /* Program Memory */ + BEGIN_M0 : origin = 0x000000, length = 0x000002 /* Part of M0SARAM. Used for "Boot to M0" bootloader mode. */ + RAML0 : origin = 0x008000, length = 0x001000 /* L0 - L3 SARAM combined, CSM secure */ + L123SARAM : origin = 0x009000, length = 0x003000 /* L0 - L3 SARAM combined, CSM secure */ + FLASH_H (R) : origin = 0x300000, length = 0x008000 /* On-chip FLASH H*/ + FLASH_G (R) : origin = 0x308000, length = 0x008000 /* On-chip FLASH H*/ + FLASH_ABCDEF (R) : origin = 0x310000, length = 0x02FF80 /* On-chip FLASH */ + CSM_RSVD (R) : origin = 0x33FF80, length = 0x000076 /* Part of FLASH Sector A. Reserved when CSM is in use. */ + BEGIN_FLASH (R) : origin = 0x33FFF6, length = 0x000002 /* Part of FLASH Sector A. Used for "Jump to flash" bootloader mode. */ + PASSWORDS (R) : origin = 0x33FFF8, length = 0x000008 /* Part of FLASH Sector A. CSM password locations. */ + ADC_CAL : origin = 0x380080, length = 0x000009 + OTP (R) : origin = 0x380400, length = 0x000400 /* OTP */ + + IQTABLES (R) : origin = 0x3FE000, length = 0x000B50 /* Part of Boot ROM */ + IQTABLES2 (R) : origin = 0x3FEB50, length = 0x00008C /* Part of Boot ROM */ + FPUTABLES (R) : origin = 0x3FEBDC, length = 0x0006A0 /* Part of Boot ROM */ + +/* BOOT : origin = 0x3FF34C, length = 0x0006AF */ + BOOT : origin = 0x3FF27C, length = 0x000D44 +/* FLASH_API : origin = 0x3FFFB9, length = 0x000001 */ +/* VERSION : origin = 0x3FFFBA, length = 0x000002 */ +/* CHECKSUM : origin = 0x3FFFBC, length = 0x000004 */ + + RESET (R) : origin = 0x3FFFC0, length = 0x000002 /* part of Boot ROM */ + + PAGE 1 : /* Data Memory */ + M0SARAM : origin = 0x000002, length = 0x0003FE /* M0 SARAM */ + M1SARAM : origin = 0x000400, length = 0x000400 /* M1 SARAM */ + DRAML1 (RW) : origin = 0x009000, length = 0x001000 + L4SARAM : origin = 0x00C000, length = 0x002000 /* L4 SARAM, DMA accessible, 1 WS prog access */ + /*L5SARAM : origin = 0x00D000, length = 0x001000 /* L5 SARAM, DMA accessible, 1 WS prog access */ + L6SARAM : origin = 0x00E000, length = 0x001000 /* L6 SARAM, DMA accessible, 1 WS prog access */ + L7SARAM : origin = 0x00F000, length = 0x001000 /* L7 SARAM, DMA accessible, 1 WS prog access */ +} + + +SECTIONS +{ +/*** Compiler Required Sections ***/ + /* Program memory (PAGE 0) sections */ + .text : > FLASH_ABCDEF, PAGE = 0 + .cinit : > FLASH_ABCDEF, PAGE = 0 + .const : > FLASH_ABCDEF, PAGE = 0 + .econst : > FLASH_ABCDEF, PAGE = 0 + .pinit : > FLASH_ABCDEF, PAGE = 0 + .reset : > RESET, PAGE = 0, TYPE = DSECT /* We are not using the .reset section */ + .switch : > FLASH_ABCDEF, PAGE = 0 + + IQmath : load = FLASH_ABCDEF, PAGE = 0 + IQmathTables : load = IQTABLES, PAGE = 0, TYPE = NOLOAD + /* + IQmathTables2 > IQTABLES2, type = NOLOAD, PAGE = 1 + { + IQmath.lib (IQmathTablesRam) + } + */ + IQmathTablesRam : load = L4SARAM, PAGE = 1 + + FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD + +/* .InitBoot : load = BOOT, PAGE = 0 */ +/* .Flash : load = FLASH_API PAGE = 0 */ +/* .Isr : load = BOOT, PAGE = 0 */ + + /* Data Memory (PAGE 1) sections */ + .bss : > L4SARAM, PAGE = 1 + .ebss : > L4SARAM, PAGE = 1 + .cio : > L4SARAM, PAGE = 1 + .stack : > M1SARAM, PAGE = 1 + .sysmem : > L4SARAM, PAGE = 1 + .esysmem : > L4SARAM, PAGE = 1 + +/*** User Defined Sections ***/ + codestart : > BEGIN_FLASH, PAGE = 0 /* Used by file CodeStartBranch.asm */ + csm_rsvd : > CSM_RSVD, PAGE = 0 /* Used by file Passwords.asm */ + internalMemFuncs : > FLASH_ABCDEF, PAGE = 0 /* Used by file Xintf.c. Link to internal memory */ + passwords : > PASSWORDS, PAGE = 0 /* Used by file Passwords.asm */ + secureRamFuncs : LOAD = FLASH_H, PAGE = 0 /* Used by file Flash.c */ + RUN = RAML0, PAGE = 0 /* Load to flash, run from CSM secure RAM */ + LOAD_START(_secureRamFuncs_loadstart), + LOAD_SIZE(_secureRamFuncs_loadsize), + RUN_START(_secureRamFuncs_runstart) + + + +#ifdef __TI_COMPILER_VERSION__ + #if __TI_COMPILER_VERSION__ >= 15009000 + + .TI.ramfunc : {} LOAD = FLASH_ABCDEF, PAGE = 0 /* Used by file Flash.c */ + RUN = L123SARAM, PAGE = 0 /* Load to flash, run from CSM secure RAM */ + LOAD_START(_mainRamFuncs_loadstart), + LOAD_SIZE(_mainRamFuncs_loadsize), + RUN_START(_mainRamFuncs_runstart) + + #else + ramfuncs : LOAD = FLASH_ABCDEF, PAGE = 0 /* Used by file Flash.c */ + RUN = L123SARAM, PAGE = 0 /* Load to flash, run from CSM secure RAM */ + LOAD_START(_mainRamFuncs_loadstart), + LOAD_SIZE(_mainRamFuncs_loadsize), + RUN_START(_mainRamFuncs_runstart) + + #endif +#endif + + + + +/* SINTBL : > FLASH_G, PAGE = 0 */ + + /* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */ + .adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD + +} + +/******************* end of file ************************/ diff --git a/main.cpp b/main.cpp index ea49828..ee3ee69 100644 --- a/main.cpp +++ b/main.cpp @@ -65,6 +65,8 @@ void main() PieVectTable.ECAN1INTB = &canb_box_isr; EDIS; + MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart); + InitCpuTimers(); ConfigCpuTimer(&CpuTimer0, 150, 1000); // 1ms ConfigCpuTimer(&CpuTimer1, 150, 5000); // 5ms diff --git a/targetConfigs/MASTER_RED.ccxml b/targetConfigs/MASTER_RED.ccxml deleted file mode 100644 index c0d6486..0000000 --- a/targetConfigs/MASTER_RED.ccxml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/targetConfigs/SLAVE_BLACK.ccxml b/targetConfigs/SLAVE_BLACK.ccxml deleted file mode 100644 index 8dc6b6b..0000000 --- a/targetConfigs/SLAVE_BLACK.ccxml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -