This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

CC2640R2F: How to implement RS485 on CC2640R2

Genius 13875 points

Replies: 5

Views: 1496

Part Number: CC2640R2F

Dear Experts

Do you have any example code to implement RS485 on CC2640R2?

Thanks for your comment.

  • Guru 106355 points
    Hi Jefferey,

    RS485 is just the physical interface, so you need some kind of RS485 driver IC to drive the actual communication lines. The data transfer is application specific, but you can for example use UART. You can for example take a look at the SPP examples here: github.com/.../cc2650lp . These are made for the CC2640, so they will have to be ported to the CC2640R2F SDK. There are instructions for that in the Software Developer´s Guide which is included in the SDK installation.

    Cheers,
    Fredrik
  • In reply to Fredrik K:

    Dear Fredrik

    Most of RS232 & RS485 firmware are the same except RS485 need to handle half-duplex.
    If there is any existing RS485 firmware, it will be easier for my customer.
    Otherwise, they may need to spend time to modify it.
    So do you have an example with half-duplex for RS485 exactly?
    Thanks for your support.

  • Guru 106355 points

    In reply to Jefferey:

    Hi Jefferey,

    We have UART example available here:
    dev.ti.com/.../

    Beyond that, we do not have anything specifically for running half-duplex communication over a RS-485 physical interface.

    Regards,
    Fredrik
  • In reply to Fredrik K:

    Dear Fredrik

    The link you propose is UartEcho.
    My customer tried this driver program successfully some weeks ago.
    It only receives a byte from UART RXD input, CC2640R2 LaunchPad then echos this byte to UART TXD pin.
    And it has no relationship with BLE and could not relay the byte got from RXD to a mobile phone APP.
    Nor it could receive a byte from mobile phone via BLE of 2640R2 and send to UART TXD pin.

    That is, it only does the following:
    CC2640R2 LaunchPad <-- UART RXD <-- MCU
    CC2640R2 LaunchPad --> UART RXD --> MCU

    Hope to have a firmware that can do the following communications:

    Mobile Phone APP <-- BLE <-- CC2640R2 LaunchPad <-- UART RXD <-- MCU
    Mobile Phone APP --> BLE --> CC2640R2 LaunchPad --> UART RXD --> MCU

    Do you have any comment on this?
    Thanks for your support.

  • In reply to Jefferey:

    I suggest you to use spp_ble_client/spp_ble_server example for LAUNCHXL-CC2650 but you have to porting the examples to LAUNCHXL-CC2640R2.

    If my post answers your question, please click on "This Resolved my issue" button to benefit others who have the same issue.

    YK Chen

    CC13xx TRX WOR project.

    How to change CC26xx/CC13xx UART baudrate dynamically in your application.

    How to create a periodic event to toggle BLE Advertising in CC26xx simple_peripheral example

    How to use indication in simple_peripheral example and use Btool to enable indication

    How to check APS ack in TI Z-Stack

    How to detect button hold in CC26x2, CC13x0, CC13x2 SDK.

    660 Zigbee devices in the same Zigbee network!

    How to setup Mosquitto on Raspberry Pi and make Contiki/Contiki-NG cc26xx-web-demo do mqtt publish to it.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.