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.

MSP430FR5969: UART one master with multiple slave communication issue

Part Number: MSP430FR5969


Hi team,

Here's an issue from the customer may need your help:

UART communication between a raspberry pie and multiple MSP430FR5969 monolithic machines, where raspberry pie is the host and multiple FR5969 are slave.

Functional requirements: The host broadcasts information to multiple FR5969 slaves via uart, which determines whether or not to accept the message based on the message ID in the broadcast message; all slaves accept the message and then send the message back to the host while one slave can listen to other slave messages.

Question:

1. How to coordinate multiple slaves sending messages to the host in turn?

2. How to implement a slave to listen to other slave messages to the host?

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    A better communication interface would be I2C for this case, if they can switch to using I2C I would try that. Otherwise the solution would be in the messages sent and how the controllers respond to it. 

    For the messages sent you can add an identifier to the messages sent, example is simply tagging a number to identify which device sent what message. You would then have to read the message sent, look for the identifier number to know which device the message came from, and perform the appropriate function called.

    1. For taking turns the message sent by the main controller can call to what device needs to respond, or you could set delays (not preferred)

    2. You can just connect the Tx line to the Rx line of the device you want to listen to the other peripherals.

    You could connect all the devices to the same RX and TX lines of the UART so they would all use the same line.

    This is essentially I2C with extra steps.

    Regards,

    Luke

  • This is not a MSP430 hardware problem but a software protocol problem. For which many solutions have been published over the years.

    The simplest way to deal with it is that targets only respond immediately after receiving a message. If targets can send messages whenever they want then you have to implement collision detection and avoidance. (Channel capacity will drop in this case.)

**Attention** This is a public forum