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.

dsp2812 IO口翻转速率



  新上手dsp2812,需要用到IO口高速输出功能,测试了IO翻转速率,代码如下,

systemclock 150M , IO口PWM7-PB0作为普通IO口,未连接其他引脚,

实测方波9.375M,即翻转速率18.75M,150/18.75=6个指令周期, 

但是汇编指令只有3条 ,根据流水线 1周期/指令 ,应该是3周期 。。请懂得人解释下

InitSysCtrl();
DINT;
IER = 0x0000;
IFR = 0x0000;

InitPieCtrl();

InitPieVectTable();
EALLOW;

GpioMuxRegs.GPBMUX.bit.PWM7_GPIOB0 = 0; // 普通IO口
GpioMuxRegs.GPBDIR.bit.GPIOB0 = 1; // IO口输出
EDIS;

EINT;
ERTM;

while(1){
GpioDataRegs.GPBTOGGLE.bit.GPIOB0=1; // IO 翻转

// 对应汇编指令 3条

//761F01C3 MOVW DP,#0x01C3

//0x3F82F2: 1A270001 OR @39,#0x0001

//0x3F82F4: 6FFC SB C$L1,UNC


}