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.
你好!!
我一直在尝试通过 k2e ARM 0内核实现裸机中断、但没有成功。 我正在尝试在以下代码中配置120事件 ID、即 GPIO
CSL_GpioHandle hGpio; CSL_ArmGicIntraams_t gRtcIntraams; printn CSL_ArmGicDistf Intrf; extern CSL_ArmGicCpuIntif gCpuNum Intraf; volatile int a = 0; void intIsr () { a = 1; while (inuint8 );void intnuintn_intt intrint int int int return = 0;void intnum = 0;void intnuintnuintnuintnum = 0;void intnuintn_intnuintn_intt int int intrint gCpuIntrf.gicDispedist =&Intruserf; gCpuIntif.cpuIntfBasePtr =(void *) SOC_INTC_MPU_PHY_CPU_IF_BASE; InterdistBasePtr =(void *) SOC_INTC_MPU_Distributor_BASE; gCpuIntrf.initStatus =(uint32) false; gCpuIntrf.gicDis->initStatus =(uint32) false; gCpuIntrf.pDefaultInterHandlers =空; gCpuIntrf.pDefaultUserParameter =空; cSL_armGicInit (&gCpuIntif); gRtcIntraParams.triggerType = cSL_ARM_GIC_TRIG_TYPE_HIGH_LEVEL; gRtcIntraParams.priority = 0x20U; gRtcIntraParams.pFnIntraHandler =&intIsr; gRtcIntraParams.pUserParam =空; CSL_armGicConfigIntr (&gCpuIntif、120U、&gRtcIntraParams); CSL_armGicEnableIntr (&gCpuIntif、120U); A = 0; pinNum = 0; bankNum = 0; hGpio = CSL_GPIO_open (0); CSL_GPIO_setPinDirOutput (hGpio、pinNum); CSL_GPIO_setRisingEdgeDetect (hGpio、pinNum); CSL_GPIO_bankInterruptEnable (hGpio、bankNum); CSL_GPIO_clearOutputData (hGpio、pinNum); CSL_GPIO_getOutputData (hGpio、pinNum、&outData); CSL_GPIO_setOutputData (hGpio、pinNum); CSL_GPIO_getOutputData (hGpio、pinNum、&outData); if (CSL_GPIO_getInterruptStatus (hGpio、pinNum)=0) { //未发生中断 printf ("不需要"); } 其他 { CSL_GPIO_clearInterruptStatus (hGpio、pinNum); } CSL_armGicTriggerSWIntr (&gCpuIntif、120U); while (a!=1){ dummy=dummy+1; } printf (出现"GPIO 中断\n"); 返回0; }
我已经尝试过多个其他组合、但从未调用中断。 如果对错误有任何帮助、我们将不胜感激