I think there is a mistake inside CCS-Can-driver
"can-18xxx8.c". In the function to get the received ID
can_get_ID(...) a problem occurs if extended ID's were used.
The line
ret|=((int32)*ptr & 0xE0) << 18;
try to get the Bits 7..5 of RxBnSIDL and clears Bit4..0.
Up to this point all is OK.
Then these 3-Bits "should be" shifted to Bit 18..20 (16 extended-Bits
+ 2 extended-bits -> 0..17).
But they will be shifted to Bit 23..25 !!!
My suggestion:
ret|=((int32)*ptr & 0xE0) << 13;
Perhaps someone of CCS will take this.
By the way: Is there someone who has changed this driver
for PIC18F6680 (more filters...) ?
ptr--; //sidl
ret|=((int32)*ptr & 0x03) << 16;
ret|=((int32)*ptr & 0xE0) << 13;
// ret|=((int32)*ptr & 0xE0) << 18; CCS-Fehler, die 3-Bits werden zu weit geschoben. Ich vermute die haben gedacht sie w�rden rechtsb�ndig im Register stehen(Bit0..2), dann w�re es OK.
ptr--; //sidh
ret|=((int32)*ptr << 21);
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Tue Feb 17, 2004 9:53 pm
Quote:
My suggestion:
ret|=((int32)*ptr & 0xE0) << 13;
Perhaps someone of CCS will take this.
I found the same problem about 2 weeks ago
while testing a board. (Exact same solution, too).
CCS tech support doesn't directly watch this board.
You should send them an email to tell them about
this problem, and your solution. Email it to:
[email protected]
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum