No announcement yet.

How to configure TX_ENABLE on CP1 for RS485 communications (XPort Pro)

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to configure TX_ENABLE on CP1 for RS485 communications (XPort Pro)

    Dear Sirs,

    we use your XPort-Pro to add Ethernet communications to one of our
    products. Internally, the XPort-Pro communicates
    with our device by means of a (2-wire) RS485 bus.

    Our SDK Version: (the latest version).

    As you know (and also point out in your documentation), an RS485 bus
    requires a TX_ENABLE signal to activate the output driver whenever
    bits need to be transmitted on the bus.

    Your "900-548e_Linux_SDK_UG.pdf" mentions a number of areas that need to
    be configured, but we cannot get this to work as desired. Your s2e sample
    application also does not seem to give a straightforward answer to
    this question. The best we have managed so far is shown in the attached
    diagram. (Sorry - not attached - forum gives "no permissions to upload attachments"

    The cyan line is TX, the yellow line is CP1 (should be TX_ENABLE).

    You can observe that
    1. CP1's polarity is inverted (should be high during transmission, not low)
    2. CP1 goes low before the transmission, followed by a brief high
    interval, before it goes low again.

    Could you please suggest a solution as to how to get RS485-functionality working "properly",
    i.e. with correct polarity and without extra low/high periods? In particular,
    which settings are necessary for the following:

    1. Kernel configuration:
    what are the correct settings for
    - DMA? This is mentioned in one forum thread, but not sure what
    needs to be configured, and how.
    ...any other config options that we need to take care of?

    2. Application layer / API
    Which initialisation and/or runtime configuration functions need
    to be called, and when? In particular, which calls to the
    CP manager are necessary?

    You might even have an application note that specifically deals with RS485

    Looking forward to receiving support from you in this matter.

    Best regards

  • #2
    Since I don't seem to be able to upload attachments, I've uploaded the diagram I refer to in my post to the following URL:


    • #3
      Sorry for the delay. You are correct - that signal is inverted. There is another pin that controls an internal inversion gate before the CP output. I am attempting to track how to control that additional pin. Standby


      • #4
        The signal (Coldfire pin IRQ7, D6) should be set(high) in order to get the polarity right on RTS/TX Enable for RS485 mode. - reseaching


        • #5
          Cool - thank you - standing by.


          • #6
            While we are investigating - see .../linux/linux-2.6.x/drivers/serial/mcf_rs485.c line 181
            I suspect, you want to include that 'blob' when building for the XPort Pro also.
            As a test, change the #define to
            #if defined(CONFIG_MATCHPORT_AR) || defined(CONFIG_XPORT_PRO)
            report back please.