0
\$\begingroup\$

In a project, I am using a CAN bus with several devices on it. The CAN bus is terminated with 120 Ohms at both ends. When all devices are booted up, the CAN waveform looks like I would expect:

  • When idle, both CAN wires are at about 2.5V (recessive)
  • When a device is sending, I see the typical square waves in opposite directions: CANL goes low and CANH goes high (dominant) and then both go back to 2.5V again.

However, when one of the microcontrollers is in JTAG mode (i.e., the device is waiting to be programmed), then a pullup on the STANDBY pin of the CAN transceiver (MCP2542) makes sure that the transceiver goes into standby mode. In that mode, both CAN wires are pulled to ground. The good old CAN square waves are no more. It looks like the other devices are trying to drive CANH high, but CANL doesn't really move.

What does it mean for the other devices, if one (or multiple) devices are (and stay) in standby mode? Are the other devices on the bus still able to communicate?

One of my concerns is, that the microcontroller is in JTAG mode. So the CAN controller is not initialized, no program is running, and thus the device cannot wakeup from standby - if that would be required.

Another concern is that the amperage used to drive both CAN wires low during standby is about twice as much as for the normal recessive level.

Is there a requirement that devices must wakeup from standby? Or can a device stay in standby for an indefinite amount of time while all other devices happily use the CAN bus?

As soon as the microcontroller is programmed, we drive the standby pin of the transceiver low and thus the transceiver exits standby mode. Then the bus starts showing normal voltage levels.

\$\endgroup\$
0
\$\begingroup\$

From the data sheet, standby mode has Rxd pin as high. So your device must be doing something different.

It sounds like you are running into a Unpowered Mode.

Check the conditions listed in the POR mode for your device. Make sure to check how your pins are configured as it is very important on what mode the device will end up in.

According to the data sheet, if the device is in POR mode then the entire bus would be essentially "locked". Also, if the current consumption is high during the mode that you are in, it is not standby mode as the data sheet states it is low power mode. Standby mode does not effect the rest of the bus either. So again, it must be a different mode.

Check your voltages on the pins under POR mode and see that before Normal mode "During POR, when the microcontroller powers up, the Txd pin could be unitentionally pulled down by the microcontroller powering up."

If the problem is that you are in POR mode, then you would be able to pull the standby pin could be pulled high with a pull up so that it is in standby during programming and then you program can turn it back to Normal mode when powered up.

There is also a state diagram in the data sheet that would help on understanding the necessary items that need to happen to get from mode to mode.

Mode Control

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Take a look at Figure 2-2 in the Datasheet. Both CAN wires go low in Standby mode. Also, in section 1.6.4 it says that "The CAN bus is biased to ground." when the transceiver is in standby mode. \$\endgroup\$ – Sven Nov 16 '18 at 16:04
0
\$\begingroup\$

"Standby mode" is a specific active mode for the device, it assumes that the device will wakeup on any intended activity. If the device is not ready to wakeup it should be in "unpowered mode" (i.e., high impedance).

If the problem is that the micro controller is pulling the STANDBY pin up when it is not programmed, then add a pull-down to that pin on the MCP2542 to make sure that the CAN bus is either idle or in power-down mode.

\$\endgroup\$
  • \$\begingroup\$ The schematics of the device in question show that there is a pullup on the standby pin. And in addition, the transceiver itself actually has an internal pullup on the standby pin according to the datasheet. Also, you haven't my answered my question. What happens to the CAN bus. Can other devices still use it? Or is their communication somehow impacted? I could not find much about this standby mode and how it impacts the other devices on the bus. Hence I am asking. Pulling the STANDBY pin up might not even be a problem. \$\endgroup\$ – Sven Nov 16 '18 at 17:28
  • \$\begingroup\$ Yes, the communications are impacted. By how much depends on the impedance/current that the CAN lines are being pulled-down with. If these are pulled-down to the point that the recessive state is not valid anymore, then the devices will not be able to communicate at all. The way you phrased your question suggested that this is the case (even though the data sheet specifications suggests otherwise). \$\endgroup\$ – Edgar Brown Nov 16 '18 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.