TI 28335 DSP ECAN配置问题

2025-01-02 05:20:46
推荐回答(1个)
回答1:

认真看程序!
void InitECana(void)中
/* Configure eCAN RX and TX pins for CAN operation using eCAN regs*/
ECanaShadow.CANTIOC.all = ECanaRegs.CANTIOC.all;
ECanaShadow.CANTIOC.bit.TXFUNC = 1;
ECanaRegs.CANTIOC.all = ECanaShadow.CANTIOC.all;
void InitECanb(void)中
/* Configure eCAN RX and TX pins for CAN operation using eCAN regs*/
ECanbShadow.CANTIOC.all = ECanbRegs.CANTIOC.all;
ECanbShadow.CANTIOC.bit.TXFUNC = 1;
ECanbRegs.CANTIOC.all = ECanbShadow.CANTIOC.all;

明显ECanaRegs与ECanbRegs不同,这对这两个寄存器赋值,才是对dsp硬件寄存器进行配置。