This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF HCInRF52 ith HCI

Hello,

I want to interface a microcontroller with the nRF52832 chip in one of our designs. The microcontroller will be running on FreeRTOS.

 I would like to know a few technical things before finalizing our design.

1) Which type of interface with external MCU does nRF52832 support? i.e. UART or SPI

2) Does it support Standard HCI interface over UART?

3) If yes, is there any technical document available for the same?

4) If I use UART for communicating with external MCU, do I have to make any changes in Chip's FW?

I have gone through several forum threads and came to know that nRF does support HCI interface but not through nRF SDK. There are some third-party open source BLE stacks available. But from my understanding, they are for Linux, correct me if I am wrong. Is it possible to run it on FreeRTOS?

The matter in hand is bit urgent from my side so I am hoping to get a reply as soon as possible so that I can finalize the design.

  • Hi Keval

    1) The nRF52832 supports UART, SPI master and slave and TWI (I2C) master and slave.

    2) The nRF5 SDK does not have HCI support, but the Zephyr RTOS project includes sample projects for running HCI over UART on the nRF52832.

    If you don't want to do much code development on the Nordic side, and just want to control it over HCI from your host MCU, then this should be a good option. 

    3) The Zephyr project provides documentation. The page for the HCI over UART example can be found here

    4) I am a bit unsure what you are asking for here. When you say the chip FW, do you mean the nRF52832 or your host MCU?

    As mentioned above HCI support can be provided through the Zephyr project. This is technically a third party software collection, but Nordic is working closely with Zephyr and we are also contributing to the code base. 

    Zephyr has their own RTOS implementation, and FreeRTOS compatibility is not provided. 

    Best regards
    Torbjørn

  • Hi there,

    Sorry for the late reply.

    I was going through the online documentation of Nordic and found that it has a support called Serialization which allows the external controller to send BLE commands over UART. It might not be the standard HCI but it is proprietary of Nordic's.

    So, if I use this serialization, can I send commands to the nRF52832 chip for BLE operation like scan, connect, send data etc.?

    Where would be the BLE Host i.e. the GATT database etc in this case. Whether it would be on the nRF or the external MCU?

  • Hi Keval

    You can use the serialization API yes, if you don't need HCI support. 

    With this API we basically just serialized all the SoftDevice functions and events, so that you can access the SoftDevice over a serial interface like UART or SPI. 

    This means that the separation of work between the external MCU and the nRF would be similar to the separation of work between the application and the SoftDevice in a normal (non serialized) nRF5 example. 

    So the GATT database would be stored internally in the SoftDevice as usual, and you would access it indirectly over the serialized SoftDevice interface. 

    Best regards
    Torbjørn

Related