在CPU1中定义和初始化ePWM1,2,3,在CPU2中进行ePWM1中断配置,CPU2无法进入ePWM中断
Green Deng:
参考一下:C:\ti\controlSUITE\device_support\F2837xD\v210\F2837xD_examples_Dual\cpu01_to_cpu02_ipcdrivers
初始化IPC后,在置位IPC后,你先查看一下CPU1上的IPC标志位有没置1.
user6301134:
回复 Green Deng:
您好,我通过CPU1对PWM1进行初始化和配置,产生PWM信号,在CPU2配置PWM1中断,需要IPC标志位等双核通信的配置吗?
手册上是这么写的:
Some interrupts come from shared peripherals that can be owned by either CPU, such as the ADCs and
SPIs. These interrupts are sent to both PIEs regardless of the peripheral's ownership. Thus, a peripheral
owned by one CPU can cause an interrupt on the other CPU if that interrupt is enabled in the other CPU's
PIE.
意思是我直接在CPU2中直接进行PIE配置就行?-但是这样进不了PWM1中断,还是手册的意思是只有ADC,SPI才能直接配置另一个CPU的中断,并不包括PWM外设。
CPU2主函数代码如下:void main(void){ InitSysCtrl();
DINT;
InitPieCtrl();
IER = 0x0000; IFR = 0x0000;
InitPieVectTable(); EALLOW;
PieVectTable.EPWM1_INT= &speed; EDIS;
IER |= M_INT3; PieCtrlRegs.PIEIER3.bit.INTx1 = 1; EINT; ERTM; IPCLtoRFlagSet(IPC_FLAG17);同步CPU1; while(1);}
Green Deng:
回复 user6301134:
不好意思漏贴了,看到你在E2E已经有发帖咨询,并且有工程师回复你了,还请以E2E的回复为准:
e2e.ti.com/…/3318381