Skip to main content
JMüll.1
Associate II
Oct 22, 2020 10:21 AM UTC
Solved

Find a simple solution to identify one of two boards I am using

I am a student who is currently doing his bachelor thesis. My job is to control two microcontrollers (Nucleo-STM32F411RE) via Bluetooth (X-Nucleo-BNRG2A1) in order to transfer parameter values for a system. The idea now is to use the same program on the two microcontrollers. For this purpose, there should be a possibility in the initialization phase to be able to differentiate between the two boards in a simple way in order to then be able to continue with the further initialization that is correct for the board. Is there an easy way how to make the boards distinguishable?

    This topic has been closed for replies.
    TDK
    TDKBest answer
    Oct 22, 2020 12:45 PM UTC

    In hardware, this can be done by grounding a pin on one board and not the other. Then, you can use a pullup on that pin and read its state to see which board is which. This can also be done with a jumper or DIP switch.

    You could also use the unique ID of the chip itself, but you'll need to hardcode those values within the code.

    "If you feel a post has answered your question, please click ""Accept as Solution""."

    3 replies

    TDK
    TDKBest answer
    Oct 22, 2020 12:45 PM UTC

    In hardware, this can be done by grounding a pin on one board and not the other. Then, you can use a pullup on that pin and read its state to see which board is which. This can also be done with a jumper or DIP switch.

    You could also use the unique ID of the chip itself, but you'll need to hardcode those values within the code.

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    Tesla DeLorean
    Guru
    Oct 22, 2020 12:49 PM UTC

    Each has a Unique ID​

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    JMüll.1
    JMüll.1Author
    Associate II
    Oct 22, 2020 2:32 PM UTC

    Thank you very much. This is what I needed.