Problems implementing CAN on MC9S12XEP100 DEMO Board

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problems implementing CAN on MC9S12XEP100 DEMO Board

1,602 次查看
ace386
Contributor I

Hi,

we tried to implement MSCAN on mentioned Board and encountered following problem:

The example code from the archive found under "rdhcs12caniomodsw" won't compile complaining about incompatible memory models "small" and "banked". Changing from "banekd" to "small" in the project settings in CodeWarrior won't solve the problem but lead to even more errors of the same type.
Manually changing the header files leads to a compilable project - as long as no CAN-specific function is called during the program!

Also, using code from AN2726 won't compile because of multiple definitions in some header files (we inluded the project's headers plus the chip-specific header for MC9S12XEP100), that can't be resolved by commenting the affected lines.

Is there any known working (MS)CAN example for MC9S12XEP100? Or are there any hints for us on how to get a simple CAN communication working between two of the mentioned DEMO Boards?

Thank you very much,
ace386

标签 (1)
0 项奖励
回复
1 回复

656 次查看
jsmcortina
Contributor III

I have CAN running on the DEMO board, but found that C406 and C407 need to be removed to allow transmission at 0.5Mbps

 

I didn't use the supplied sample code. My application is "Megasquirt" aftermarket engine management and I have adapted the existing MC9S12C64 code.  The only changes required were the frequency dividers.

 

The source code for this is publicly available but only use it "for inspiration" as it is copyright.

 

James

0 项奖励
回复