This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/TMS320F28027:不处理 ISR

Guru**** 2239510 points
Other Parts Discussed in Thread: CONTROLSUITE
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/607192/ccs-tms320f28027-isr-not-serviced

器件型号:TMS320F28027
Thread 中讨论的其他器件:controlSUITE

工具/软件:Code Composer Studio

我尝试切换板载 LED。 当我构建项目时没有错误、当我进入调试模式并按下为中断(GPIO12)配置的开关时、会出现以下错误

错误:

无法在"C:/cs30_controlSUITE_submodules/cs30_F2802x_f2802x0/f2802xX_common/source/F2802xX_DefaultIsr.c"找到源文件

 

 


以下是我的代码

//########################################################################################################################

//$TI 发行版:F2802x 支持库 V200 $

//$Release Date:TUE JULE 2410:01:39 CDT 2012 $

//########################################################################################################################

#include "DSP28x_Project.h"//器件头文件和示例 include 文件

#include "F2802x_common/include/clk.h"

#include "F2802x_common/include/flash.h"

#include "F2802x_common/include/gpio.h"

#include "F2802x_common/include/PIE.h"

#include "F2802x_common/include/PLL.h"

#include "F2802x_common/include/pwr.h"

#include "F2802x_common/include/wdog.h"

//此文件中找到的函数的原型语句。

中断空 XINT1_ISR (空);

void LED();

空 InitGPIO();

空 Initint();

clk_handle myClk;

Flash_handle myFlash;

GPIO_Handle myGpio;

PIE_Handle myPie;

//此示例的全局变量

volatile uint32_t Xint1Count;

uint32_t LoopCount;

6个采样时的#define delay (CPU_RAM/1000*6*510)//Qual 周期

void main (void)

cpu_handle myCpu;

pll_handle myPll;

WDOG_Handle myWDog;


//初始化此应用程序所需的所有句柄

myClk = CLK_init ((void *) CLK_base_ADDR、sizeof (CLK_Obj));

myCpu = cpu_init ((void *) NULL、sizeof (cpu_Obj));

myFlash = flash_init ((void *) flash_base_ADDR、sizeof (flash_Obj));

myGpio = GPIO_init ((void *) GPIO_base_ADDR、sizeof (GPIO_Obj));

myPie = PI_init ((void *) PIE_BASE_ADDR、sizeof (PIE_Obj));

myPll = PLL_init ((void *) PLL_base_ADDR、sizeof (PLL_Obj));

myWdDog = WDOG_INIT ((void *) WDOG_BASE_ADDR、sizeof (WDOG_Obj));

//执行基本系统初始化

WDOG_DISABLE (myWDog);

CLK_enableAdcClock (myClk);

(*Device_cal)();

//选择内部振荡器1作为时钟源

CLK_setOscSrc (myClk、CLK_OscSrc_Internal);

//将 PLL 设置为 x10 /2、这将产生50MHz = 10MHz * 10/2

PLL_setup (myPll、PLL_Multiplier_10、PLL_DivideSelect_CLKIN_BY_2);

//禁用 PIE 和所有中断

PIE_DISABLE (myPie);

PI_DisableAllInts (myPie);

CPU_disableGlobalInts (myCpu);

CPU_clearIntFlags (myCpu);

//如果从闪存运行,则只将 RAM 复制到 RAM

#ifdef _flash

memcpy (&RamfuncsRunStart、&RamfuncsLoadStart、(size_t)&RamfuncsLoadSize);

#endif

InitGPIO();

Initint();

//设置调试矢量表并启用 PIE

PI_setDebugIntVectorTable (myPie);

PIE_ENABLE (myPie);

CPU_enableInt (myCpu、CPU_IntNumber_1);

cpu_enableGlobalInts (myCpu);


for (;;){

asm (" NOP");

中断空 XINT1_ISR (空){

LED);
//确认此中断以从组1获取更多内容

PI_clearInt (myPie、PI_GroupNumber_1);

空 Initint()


//在 PIE 矢量表中注册中断处理程序

PI_registerPieIntHandler (myPie、PI_GroupNumber_1、PI_SubGroupNumber_4、(intVec_t)&XINT1_ISR);

//清除计数器

Xint1Count = 0;//计数 XINT1中断

LOOPCount = 0;//通过空闲循环的计数时间

//启用 XINT1组1中断4


PI_enableInt (myPie、PI_GroupNumber_1、PI_InterruptSource_XINT_1);


//启用全局中断

// GPIO12为输入

GPIO_setMode (myGpio、GPIO_Number_12、GPIO_12_Mode_generalpurpose);

GPIO_setDirection (myGpio、GPIO_Number_12、GPIO_Direction_Input);

GPIO_setQualification (myGpio、GPIO_Number_12、GPIO_Qual_异 步);

GPIO_setPullUp (myGpio、GPIO_Number_12、GPIO_PULLUP_Disable);

// GPIO0是 XINT1

GPIO_setExtInt (myGpio、GPIO_Number_12、CPU_ExtIntNumber_1);


//配置 XINT1

PI_setExtIntPolarity (myPie、CPU_ExtIntNumber_1、PI_ExtIntPolarity_RisingAndFallingEdge);

//启用 XINT1

PI_enableExtInt (myPie、CPU_ExtIntNumber_1);

空 InitGPIO()


//将 GPIO 0、1、2、3配置为输出

GPIO_setMode (myGpio、GPIO_Number_0、GPIO_0_Mode_generalpurpose);

GPIO_setMode (myGpio、GPIO_Number_1、GPIO_1_Mode_generalpurpose);

GPIO_setMode (myGpio、GPIO_Number_2、GPIO_2_Mode_generalpurpose);

GPIO_setMode (myGpio、GPIO_Number_3、GPIO_3_Mode_generalpurpose);

GPIO_setDirection (myGpio、GPIO_Number_0、GPIO_Direction_Output);

GPIO_setDirection (myGpio、GPIO_Number_1、GPIO_Direction_Output);

GPIO_setDirection (myGpio、GPIO_Number_2、GPIO_Direction_Output);

GPIO_setDirection (myGpio、GPIO_Number_3、GPIO_Direction_Output);

GPIO_setLow (myGpio、GPIO_Number_0);

GPIO_setLow (myGpio、GPIO_Number_1);

GPIO_setLow (myGpio、GPIO_Number_2);

GPIO_setLow (myGpio、GPIO_Number_3);

空 LED()


GPIO_TOGGLE (myGpio、GPIO_Number_0);

GPIO_TOGGLE (myGpio、GPIO_Number_1);

GPIO_TOGGLE (myGpio、GPIO_Number_2);

GPIO_TOGGLE (myGpio、GPIO_Number_3);

//============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

//不再需要。

//============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    如果是、这是示例代码吗-您从哪里导入?

    此致、
    Gautam
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    是的、这是我从 controlSUITE 中导入的示例代码外部中断的修改。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    你好

    如果调试时无法找到库源文件、则应能够将其指向已安装位置中的源文件。

    此致
    Chris