View previous topic :: View next topic |
Author |
Message |
Douglas Richard
Joined: 08 Sep 2003 Posts: 49 Location: Concord NH
|
CAN Filter and Mask problem |
Posted: Mon Apr 28, 2003 11:31 am |
|
|
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
|
Re: CAN Filter and Mask problem |
Posted: Thu May 01, 2003 1:33 pm |
|
|
:=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 |
Posted: Fri May 09, 2003 2:54 pm |
|
|
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 |
|
|
|