How to setup the driver & test program to test driver for MCU(i.mx6) and nrf52840 with UART connection.

Hi Nordic Support Team,

First sorry for basic questions.

I'm learning the basic hardware setup & Linux driver configuration things to setup & configure the MCU(i.mx6) and nrf52840 with UART connection,

we have one project circuit board (In this board controller MCU(i.mx6) is connected with  nrf52840 using UART).

we are using yocto to setup the Linux things in MCU.

Here is the connection diagram.

I read some couple of threads regarding this setup, got confused with serialization & soft device and HCI.

Please give me some details on this  serialization & soft device and HCI.

How i can add driver to MCU with UART connection  to setup the nrf52840 and test the driver from MCU side.

any defconfig i need to change or any other configuration required from make menuconfig?

Please provide me the steps to do that. Also do i need to do any changes on nrf52840 to communicate with MCU?

Please help Here.

Thanks 

Parents Reply Children
  • Application DevelopmentHi,

    LinuxandEmbeddedLearner said:

    On linux host side iI will setup the bluez5 as bluetooth host.

    On nRF52840 to use as Bluetooth controller, I need to use  HCI UART program by by Zephyr with NRF connect SDK right?

    Yes, that is correct.

    LinuxandEmbeddedLearner said:
    Is there any steps, what steps I need to follow to setup  Zephyr project compilation & porting/flash into nrf52840.

    If you start with a default example and a DK, then it is just a matter or building and flashing the HCI sample in the same way as you build any sample. The exact method depend a bit on which approach you choose. I suggest you refer to Working with nRF52 Series.

    LinuxandEmbeddedLearner said:
    what else i need hex files need to flash on nrf52840 softdevice (s140) hex also?

    When you build the example everything is built into a single binary, including the SoftDevice controller (this is different from in the nRF5 SDK where the SoftDevice was not linked together with the application).

    LinuxandEmbeddedLearner said:
    where I need to set the Rx & Tx pins information?

    You can either make a new board file for your HW or start of with a DK and create a device tree overlay to specify your pins. I suggest you refer to Application Development.

  • Thank You Einar.

    UART pins in nrf52840 are rx-8 tx- 6, no HW flow control.

    what changes I need to for above UART configuration in nrf connect sdk zephyr side?

    HW flow control pins are not connected (between MCU & nrf52840 chip).

    But here I see HW flow control is required


    Give me some steps , how I can proceed here?

  • Hi,

    Are you testing with your custom WH or a DK? Assuming a DK, you can see that there are overlay files for the various DKs under zephyr\samples\bluetooth\hci_uart\boards\. If you are using the nRF52840 DK the nrf52840dk_nrf52840.overlay is what is relevant for you. There you can see a line with hw-flow-control. To disable flow control, remove this line. 

    Note that if using a custom WH you should consider (at least at some point) making a separate board configuration for it where you specify everything instead of using an overlay to specify the differences of your board vs a DK.

    Lastly, in general using UART whiteout flow control in case where you cannot easily handle loss of data using flow control is almost required. So for instance for logs skipping flow control is OK. In this case, I would suggest you consider if it is really wise to skip flow control.

Related