How: Serial communication between the BLE module on a nRF52 board and a off-board MCU

Hi there.
I have a project, where we are considering to use a non-Nordic mcu (I call it off-board MCU) and Nordic BLE module.


As the first step, I have run some BLE samples to relize the connection between the Nordic evluation board with an APP on a phone via BLE. in Other words, it is

Nordic MCU on board <---serial---> BLE <---bluetooth---> APP

the next step is to replace the 'MCU on eval board' with the the off-board MCU we are using. My question is how to connect the off-board MCU with the BLE module on the eval board.

The expected connection looks like:

Off-board MCU <---serial---> BLE <---bluetooth---> APP

There is a UART port on the off-board MCU, which has 3 pins. do I only need to find out the 3 (or 2?) pins on the eval. board to connect?

the uart is at top right

In the "User Guide" P8, it reads that user should disable "Dynamic Hardware Flow Control (HWFC) handling" in order to use the P0.05 and P0.07, by sending DTR signals, but i didn't find much information about DTR and don't know how to send out it to the interface MCU on the eval. board.

There is a simlar topic:
About hardware flow control - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

but the answer is not available.

I also found another related thread , but I am not sure that is exactly the same problem.

Connecting UART Data to development board PCA10040 - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

thanks!

Parents Reply Children
  • Hi Abhijith, thanks for your response.
    No, I am trying to connect a off-board MCU with the BLE module (the module around nrf52832 on the eval board) on the eveluation board.

    Normally on the evtl board 52832, the on-board MCU (interface MCU) communicates with the BLE module, but now I am trying to connect the BLE module with a seperate MCU via UART.

  • what I am looking for is a way to "cut" the uart connection between the BLE module and the interface MCU, then let the BLE modle communicate with the off-board MCU with two (?) jumper cables.

    in the user guide there is Dynamic hardware flow control handing, but I am not sure whether it is used to "re-route" the uart.

    I also have a silly easy question: isnt it enough only to use RTX and CTX for UART communication? I don't understand why there are also CTS and RTS invloved.

    very appreciate for any hints.

  • Hello,

    Really sorry, still a bit confused about the query. Let's make this clear:

    ulyssis said:
    No, I am trying to connect a off-board MCU with the BLE module (the module around nrf52832 on the eval board) on the eveluation board
    • You mentioned evaluation board 52832. So are you having a nRF52dk or do you have a custom board with nRF52832? 
    • By interface MCU, you mean the MCU used to programme and debug the application inisde the Soc (nRF52832). See the picture below; the interface MCU is marked there. I guess you are also talking about the same MCU; please confirm.

     

    • You have mentioned a BLE module here; are you pointing to the same nRF52832 as the BLE module here, or is there any other BLE module? If there are any, please clarify.

     

    • If I understand correctly, you are trying to remove the debugger chip. Is it necessary that you remove this debugger chip? If you only want to connect another MCU via UART to the DK (nRF52832 development kit), then you don't want to remove the interface MCU. Kindly confirm these things.

    ulyssis said:
    I also have a silly easy question: isnt it enough only to use RTX and CTX for UART communication? I don't understand why there are also CTS and RTS invloved.

    It is possible to use UART with hardware flow control then you need CTS and RTS lines. RTS (request to send) and CTS (clear to send) lines will be cross coupled just like RX and TX lines.

    If hardware flow control is enabled, each end will use its RTS to indicate that it is ready to send new data and read its CTS to see if it is allowed to send data to the other end.

    Kind Regards,

    Abhijith

  • Thanks! I appology for the confusions.


    "You mentioned evaluation board 52832. So are you having a nRF52dk or do you have a custom board with nRF52832? "

    I am using a development board nRF52d

    "By interface MCU, you mean the MCU used to programme and debug the application inisde the Soc (nRF52832). See the picture below; the interface MCU is marked there. I guess you are also talking about the same MCU; please confirm."

    Yes, "interface MCU" in my question is the one you marked out. it is the counterpart of the "off-board MCU" in my question.

    "You have mentioned a BLE module here; are you pointing to the same nRF52832 as the BLE module here, or is there any other BLE module? If there are any, please clarify."

    BLE module in my question indicates the chip nRF52832 on the nRF52d board, along with its peripherals.

    "If I understand correctly, you are trying to remove the debugger chip. Is it necessary that you remove this debugger chip? If you only want to connect another MCU via UART to the DK (nRF52832 development kit), then you don't want to remove the interface MCU. Kindly confirm these things."

    I have a question here, is the debugger chip the same as the interface MCU?

    Yes, I want to connect 'another' MCU to the nRF52832, but without involving the interface MCU. The motivation of my project is to use a seperate BLE model based on nRF52832 as the communication module for 'another' MCU.

    "It is possible to use UART with hardware flow control then you need CTS and RTS lines. RTS (request to send) and CTS (clear to send) lines will be cross coupled just like RX and TX lines.

    If hardware flow control is enabled, each end will use its RTS to indicate that it is ready to send new data and read its CTS to see if it is allowed to send data to the other end."

    does it mean, two jumper cables are enough for UART, when the flow control is enabled?

  • "There is a UART port on the off-board MCU, which has 3 pins. do I only need to find out the 3 (or 2?) pins on the eval. board to connect?"

    Keep it simple, don't change any hardware on the development board, don't use flow control. Simply choose 2 spare port pins on the development board and use those as Rx input to BLE module and Tx output from BLE module by changing the software RX and TX pin definition. 3 pins are required to the off-board MCU: Rx, Tx and a common GND. Tx on the development board connects to Rx on the off-board MCU, Rx dev to Tx off-board MCU.

    Change:
    #define RX_PIN_NUMBER  8
    #define TX_PIN_NUMBER  6
    #define CTS_PIN_NUMBER 7
    #define RTS_PIN_NUMBER 5
    to:
    #define RX_PIN_NUMBER  3 // P0.03 assuming unused
    #define TX_PIN_NUMBER  4 // P0.04 assuming unused
    #define CTS_PIN_NUMBER NRF_UART_PSEL_DISCONNECTED
    #define RTS_PIN_NUMBER NRF_UART_PSEL_DISCONNECTED
    

Related