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.
如何使用寄存器配置CAN通信,是否有demo程序,需要查詢發送,中斷接收,使用掩码。原因是以前的项目使用的是寄存器配置,现在需要加入CAN通讯功能,使用库去配置CAN可以正常工作,但是使能CAN中断之后,其他中断就无法中断了。
感谢您的回复,不过还是没有得到解决。下面是我的代码,帮忙查看查看哪里错误
void main(void)
{
Device_init();
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
Interrupt_initModule();
//
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
//
Interrupt_initVectorTable();
Device_initGPIO();
CanAInit(500000);
Interrupt_register(INT_CANA0,&canaISR);
Interrupt_register(INT_ADCA1, &adcA1ISR);
initEPWMGPIO();
configureADC(ADCA_BASE);
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
EPWM_configureSignal(EPWM1_BASE, &pwmSignal1);
EPWM_configureSignal(EPWM2_BASE, &pwmSignal2);
EPWM_configureSignal(EPWM3_BASE, &pwmSignal3);
configureOSHTripSignal(EPWM1_BASE);
//
// Configure ADCEVTx as cycle-by-cycle trip signal for ePWM2
//
configureCBCTripSignal(EPWM2_BASE);
//
// Configure ADCEVTx as direct trip signal for ePWM3
//
configureDirectTripSignal(EPWM3_BASE);
configureADCSOC(ADCA_BASE, 2U);
configureLimitDetectionPPB(0U, 3600U, 0U);
// Interrupt_enable(INT_ADCA1);
Interrupt_enable(INT_CANA0|INT_ADCA1);
CAN_enableInterrupt(CANA_BASE, CAN_INT_IE0 | CAN_INT_ERROR);
CAN_enableGlobalInterrupt(CANA_BASE, CAN_GLOBAL_INT_CANINT0);
CAN_clearGlobalInterruptStatus(CANA_BASE, CAN_GLOBAL_INT_CANINT0);
EINT;
ERTM;
ADC_forceSOC(ADCA_BASE, ADC_SOC_NUMBER0);
CAN_startModule(CANA_BASE);