CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

CAN Filter and Mask problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Douglas Richard



Joined: 08 Sep 2003
Posts: 49
Location: Concord NH

View user's profile Send private message Send e-mail Visit poster's website

CAN Filter and Mask problem
PostPosted: Mon Apr 28, 2003 11:31 am     Reply with quote

I’m converting from the PIC 18F452 + MCP2510 to the 18F458 (CAN on board the processor). I’m doing my debugging on the ICE 2000, MPLAB 6.2, and PCM18XD1 processor module. I’m also using the CCS CAN-18XXX8.h and CAN-18XXX8.c files.

Upon power up I place the processor into configuration mode in order to initialize the CAN baud rate and update the filter and mask bits. The problem is this: When I switch from configuration mode to Normal mode my mask and filter bit setting all get cleared (zero values across the board). And when I stop and reset the processor my mask and filter bits go back to how I set them.

Has anyone else seen this problem? What am I doing wrong?
___________________________
This message was ported from CCS's old forum
Original Post ID: 14029
Douglas Richard



Joined: 08 Sep 2003
Posts: 49
Location: Concord NH

View user's profile Send private message Send e-mail Visit poster's website

Re: CAN Filter and Mask problem
PostPosted: Thu May 01, 2003 1:33 pm     Reply with quote

:=I’m converting from the PIC 18F452 + MCP2510 to the 18F458 (CAN on board the processor). I’m doing my debugging on the ICE 2000, MPLAB 6.2, and PCM18XD1 processor module. I’m also using the CCS CAN-18XXX8.h and CAN-18XXX8.c files.
:=
:=Upon power up I place the processor into configuration mode in order to initialize the CAN baud rate and update the filter and mask bits. The problem is this: When I switch from configuration mode to Normal mode my mask and filter bit setting all get cleared (zero values across the board). And when I stop and reset the processor my mask and filter bits go back to how I set them.
:=
:=Has anyone else seen this problem? What am I doing wrong?

Here is my theory as to what is going on.

When you are in Normal mode not only do you not have write access to the filter and mask bits you also don’t have read access as well. Hence all the registers are clear.

When the processor gets reset you are back into configuration mode and now can read and write to the filter and mask bits (that’s why everything is back to normal on a reset).

My program seems to be working. I am able to filter out messages I don’t want and also receive messages.
___________________________
This message was ported from CCS's old forum
Original Post ID: 14125
Max Peelman
Guest







Re: CAN Filter and Mask problem
PostPosted: Fri May 09, 2003 2:54 pm     Reply with quote

Your theory is correct. Page 232 of the PIC18FXX8 Data Sheet (DS41159C) states: "When outside of Configuration mode, all mask and filter registers will be read as '0'".

:=:=I’m converting from the PIC 18F452 + MCP2510 to the 18F458 (CAN on board the processor). I’m doing my debugging on the ICE 2000, MPLAB 6.2, and PCM18XD1 processor module. I’m also using the CCS CAN-18XXX8.h and CAN-18XXX8.c files.
:=:=
:=:=Upon power up I place the processor into configuration mode in order to initialize the CAN baud rate and update the filter and mask bits. The problem is this: When I switch from configuration mode to Normal mode my mask and filter bit setting all get cleared (zero values across the board). And when I stop and reset the processor my mask and filter bits go back to how I set them.
:=:=
:=:=Has anyone else seen this problem? What am I doing wrong?
:=
:=Here is my theory as to what is going on.
:=
:=When you are in Normal mode not only do you not have write access to the filter and mask bits you also don’t have read access as well. Hence all the registers are clear.
:=
:=When the processor gets reset you are back into configuration mode and now can read and write to the filter and mask bits (that’s why everything is back to normal on a reset).
:=
:=My program seems to be working. I am able to filter out messages I don’t want and also receive messages.
___________________________
This message was ported from CCS's old forum
Original Post ID: 14316
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group