I have two MCP2515 stand-alone CAN controllers with an SPI interface, two TJA1042 CAN transceivers, and two Arduino Uno boards. As you may know, TJA1042 has two operational modes:

  1. sleep mode
  2. normal mode.

If I want to change the mode of operation of one transceiver from sleep mode to normal mode (wake it up), I should send a wake up pattern waves from the other transceiver over the CAN bus which is in normal mode. For example, one of the wake up patterns is: 5.5 microseconds low, 5.5 microseconds high and again 5.5 microseconds low. Now I don't know how to send these patterns with an Arduino, because MCP2515 has an SPI interface.

I use library: Seeed-Studio/CAN_BUS_Shield

How can I do this?

  • \$\begingroup\$ Re "send a wake up pattern waves from the other transceiver": You mean over the CAN bus? Or by separate wires? Or something else? Can you describe how the two transceivers are supposed to interact in this fashion (by editing your question, not here in comments)? \$\endgroup\$ Oct 7 '18 at 22:20
  • \$\begingroup\$ Isn't pin STB (pin 8) also involved (presumably controlled from the microcontroller side)? \$\endgroup\$ Oct 7 '18 at 22:27

Reading datasheets is apparently dying skill...

There is no special "wake-up pattern" that you can send. The standby mode is initiated by setting STB pin high and the transceiver will remain in it until you set it low. In this mode it cannot produce normal RX output, so you cannot "decode" any pattern.

All it does is output low level on RXD pin when it detects dominant state on a bus for longer than "T(fltr)bus", which is about 1.5 µs. This is about the length of 1 bit at 660 bps data rate.

In effect, any activity on a bus will eventually trigger RXD, allowing you to wake up the transceiver using STB pin and start receiving data.


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.