[Ovmsdev] i-Miev/C-Zero/iOn

Michael Jochum mikeljo at mac.com
Sun Sep 22 01:53:29 HKT 2013


You can only set the Mask and Filter in a Configuraton Mode.

From Datasheet:

The CAN module has to be initialized before the activation. This is only possible if the module is in the Configuration mode. The Configuration mode is requested by setting the REQOP2 bit. Only when the status bit, OPMODE2, has a high level can the initial- ization be performed. Afterwards, the Configuration registers, the Acceptance Mask registers and the Acceptance Filter registers can be written. The module is activated by setting the REQOP control bits to zero.

The module will protect the user from accidentally violating the CAN protocol through programming errors. All registers which control the configuration of the module can not be modified while the module is on- line. The CAN module will not be allowed to enter the Configuration mode while a transmission or reception is taking place. The Configuration mode serves as a lock to protect the following registers:

• ConfigurationRegisters
• FunctionalModeSelectionRegisters • BitTimingRegisters
• IdentifierAcceptanceFilterRegisters • IdentifierAcceptanceMaskRegisters • FilterandMaskControlRegisters
• MaskSelectionRegisters

In the Configuration mode, the module will not transmit or receive. The error counters are cleared and the interrupt flags remain unchanged. The programmer will have access to Configuration registers that are access restricted in other modes.


 I don't believe that it will work without bad sideeffects.


Am 21.09.2013 um 11:32 schrieb Matt Beard OVMS <smvo at mxf.org.uk>:

> I may also try modifying the RX0 mask during the 1-second poll so that it cycles through filtering a single SID each time, meaning that it will take 4 seconds for a full update. I don't think this will be an issue as none of this data is fast changing.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20130921/a94dcbd6/attachment.htm>

More information about the OvmsDev mailing list