|
Wednesday, 01 October 2008 01:52 |
|
A new ECOM driver was released to support Listen Only mode support in the hardware (NXP SJA1000) CAN controller. The new feature was added to support auto-detection of baud-rates in CANCapture and can be used by those who wish to support auto-baud rates in their own software.
Detailed Description:
In order to implement auto-detection of baud rates in your software, simply connect at a desired baud rate with the Listen Only Mode enabled and wait for either a CAN packet or an error message. If you receive a CAN packet, then you are on the correct baud-rate, otherwise if you receive an error, switch bauds and try the next. Repeat for every baud-rate that you wish to detect until you are successful.
Typically when a CAN device connects to the bus at the wrong baud rate, it detects errors and therefore generates error frames to all other nodes on the bus. Since this is not desirable when sweeping baud rates, "listen only" forces the hardware into a mode where it will not generate error frames so that it won't affect the bus at all. Without "listen only" mode, auto-detection is possible, but it is not ideal to make other nodes think there are errors on the bus.
To enable listen only mode, simply OR the baud-rate setting with 0x80 in your call to CANOpen().
|