Hi my friends, I'm starting work on new chip XC167CI and now I need work with a TwinCAN peripheral. I haven't find on network nothing... I have some question: 1)Does exist an official version of CAN.H for XC167CI with twhincam?? 2)Does exist a general example for TwinCAN?? Thanks!!
There is a small TwinCAN Example Program for the Keil MCB-XC167 board. In general this should run on any XC167 hardware, as it is configured for the on-chip Flash. http://www.keil.com/appnotes/docs/apnt_181.asp
There is not deticated header for the CAN peripheral itself, since the CAN peripheral is part of the CPU specific header file (i.e. XC167.H).
Really, there is not a dedicated header, concerning the registers. Here I mean a modification of the DAvE-created header. Sorry for misdescription. (At the time I wrote I also found no example, so I used this one). I am sure that the KEIL example will also help you with your first steps. Dear Sylvain I sent you the project. Stefan - thanks to KEIL support team for this hint and the correction
http://www.keil.com/appnotes/docs/apnt_181.asp When I debug this project,there is an error:"Device cannot enter bypass mode .Connection to target missing or incorrectly." I use the Ulink to connect target board.MY target is MCBXC167,the dip dump setting is " off on on on on on off on off off",and the target setting is clock 20MHZ, Use on chip ROM and XRAM,The external RAM is start 0x400000, Size 0x1000. I didnt debug it ,where is my wrong?thanks
You should also check the power supply of the MCBXC167 board. Maybe there is a problem with the 5V on the board. So please mesure it.