I'm thinking about this part of this board :


As you can see, there is a resistor in the red rectangle (R26). my question is what is the usage of this resistor?

Well being a resistor for D14(CANRX) is acceptable (because the supply of the MCP2551 is +5V but the STM32F103RBT6 is 3.3V (logic level)) but for D24(CANTX) it doesn't make sense to me.

Note that I have used this circuit for my CAN bus without R26 and R27 resistors and it works very fine.


Both those resistors are pull-up resistors. They exist so that the inputs to the CAN interface are at a known level ("idle high") for the period before the MCU (or other device) that is driving the CAN interface has initialized the ports it uses to communicate.

This is to stop any rogue noise getting onto the CAN bus while the MCU boots up and sets up its ports.

However, they are labelled "NA", and looking at an actual photograph of the board, you can see that R26 and R27 aren't populated. My guess is that these exist as an option for using other chips with the same pinout as the MCP2551 which has an internal pullup resistor for the TX line, and really the RX line doesn't need one as such since it's an output.

enter image description here

  • \$\begingroup\$ Thus aren't these both resistors for seting logic levels? (5V to 3.3) right? \$\endgroup\$ – Roh Nov 11 '14 at 11:09
  • 1
    \$\begingroup\$ They set a logic level only while the MCU is HiZ. It should pull up to the same logic level the MCU works at. \$\endgroup\$ – Majenko Nov 11 '14 at 11:15
  • \$\begingroup\$ See the datasheet! TXD has an internal pull-up, and RXD is an output and doesn't need a pull-up. \$\endgroup\$ – Leon Heller Nov 11 '14 at 11:53
  • \$\begingroup\$ Tell that to whoever designed the circuit :P It may be that they have designed it to use other chips with the same pinout as that one which don't have the internal pullup. \$\endgroup\$ – Majenko Nov 11 '14 at 11:55
  • \$\begingroup\$ Also I notice they are "NA(...)" - so does that mean they're not actually populated on the board? \$\endgroup\$ – Majenko Nov 11 '14 at 11:56

See the datasheet! TXD has an internal pull-up, and RXD is an output and doesn't need a pull-up. Neither of the resistors are needed.

  • \$\begingroup\$ +1 Oh, Man! Are you really Leon? hahaha! LoL! thanks man for good point. \$\endgroup\$ – Roh Nov 11 '14 at 12:04

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.