我写了个2812程序,编译有错误。 程序出错行: EvaRegs.COMCONA.bit.SVENABLE=1; //使能空间矢量PWM模式 EvaRegs.COMCONA.bit.FCOMPOE=1; //使能PWM输出引脚 错误提示: "aci3_1.c", line 121: error: expected a field name "aci3_1.c", line 122: error: expected a field name 请高手指教,谢谢! |
我看了下,结构体定义没问题:
struct COMCONA_BITS {
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Jay:
你好,
方便的话,请把aci3_1.c文件传上来,谢谢!
从你贴出来的来看,没有问题。
Jay
我写了个2812程序,编译有错误。 程序出错行: EvaRegs.COMCONA.bit.SVENABLE=1; //使能空间矢量PWM模式 EvaRegs.COMCONA.bit.FCOMPOE=1; //使能PWM输出引脚 错误提示: "aci3_1.c", line 121: error: expected a field name "aci3_1.c", line 122: error: expected a field name 请高手指教,谢谢! |
我看了下,结构体定义没问题:
struct COMCONA_BITS {
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
ccb bcc:
回复 Jay:
好的。
我写了个2812程序,编译有错误。 程序出错行: EvaRegs.COMCONA.bit.SVENABLE=1; //使能空间矢量PWM模式 EvaRegs.COMCONA.bit.FCOMPOE=1; //使能PWM输出引脚 错误提示: "aci3_1.c", line 121: error: expected a field name "aci3_1.c", line 122: error: expected a field name 请高手指教,谢谢! |
我看了下,结构体定义没问题:
struct COMCONA_BITS {
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
ccb bcc:
回复 ccb bcc:
高手支招啊!
我写了个2812程序,编译有错误。 程序出错行: EvaRegs.COMCONA.bit.SVENABLE=1; //使能空间矢量PWM模式 EvaRegs.COMCONA.bit.FCOMPOE=1; //使能PWM输出引脚 错误提示: "aci3_1.c", line 121: error: expected a field name "aci3_1.c", line 122: error: expected a field name 请高手指教,谢谢! |
我看了下,结构体定义没问题:
struct COMCONA_BITS {
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
ccb bcc:
回复 ccb bcc:
没人知道吗?
我写了个2812程序,编译有错误。 程序出错行: EvaRegs.COMCONA.bit.SVENABLE=1; //使能空间矢量PWM模式 EvaRegs.COMCONA.bit.FCOMPOE=1; //使能PWM输出引脚 错误提示: "aci3_1.c", line 121: error: expected a field name "aci3_1.c", line 122: error: expected a field name 请高手指教,谢谢! |
我看了下,结构体定义没问题:
struct COMCONA_BITS {
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Chen Jones:
是不是少了某个.h文件?
我写了个2812程序,编译有错误。 程序出错行: EvaRegs.COMCONA.bit.SVENABLE=1; //使能空间矢量PWM模式 EvaRegs.COMCONA.bit.FCOMPOE=1; //使能PWM输出引脚 错误提示: "aci3_1.c", line 121: error: expected a field name "aci3_1.c", line 122: error: expected a field name 请高手指教,谢谢! |
我看了下,结构体定义没问题:
struct COMCONA_BITS {
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Zhoujt:
问题解决啦吗?我也遇到同样的问题。能分享一下吗?
我写了个2812程序,编译有错误。 程序出错行: EvaRegs.COMCONA.bit.SVENABLE=1; //使能空间矢量PWM模式 EvaRegs.COMCONA.bit.FCOMPOE=1; //使能PWM输出引脚 错误提示: "aci3_1.c", line 121: error: expected a field name "aci3_1.c", line 122: error: expected a field name 请高手指教,谢谢! |
我看了下,结构体定义没问题:
struct COMCONA_BITS {
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Uint16 C1TRIPE:1; // 0 C1TRIP enable
Uint16 C2TRIPE:1; // 1 C2TRIP enable
Uint16 C3TRIPE:1; // 2 C3TRIP eanble
Uint16 rsvd:2; // 4:3 reserved
Uint16 FCMP1OE:1; // 5 Full compare 1 output enable
Uint16 FCMP2OE:1; // 6 Full compare 2 output enable
Uint16 FCMP3OE:1; // 7 Full compare 3 output enable
Uint16 PDPINTASTATUS:1;// 8 Current status of the PDPINTA pin
Uint16 FCOMPOE:1; // 9 Compare output enable
Uint16 ACTRLD:2; // 11:10 Action control register reload
Uint16 SVENABLE:1; // 12 Space vector PWM Mode enable
Uint16 CLD:2; // 14:13 Compare register reload condition
Uint16 CENABLE:1; // 15 Compare enable
};
Zhoujt:
回复 Jay:
问题解决啦,谢谢