communicate with BT832X (which is using nRF52832) through I2C using a PIC microcontroller

Hello,

I am trying to communicate with a BT832X module ( https://ro.mouser.com/datasheet/2/915/BlueNor_BT832X_datasheets-1518727.pdf ) using a PIC microcontroller ( http://ww1.microchip.com/downloads/en/DeviceDoc/39755B.pdf ), through I2C bus interface.

Problem is that I am not sure how to that. I mean there is no information regarding BT832X if it is set by default in Master mode, or Slave mode. As well if it is in Slave mode, which address shall I use to send commands? As well, which is the default communication speed (100 kHz or 400 kHz)

What I want to achieve is to send the configuration commands (AT ones) through I2C instead of UART.

Pllease can you tell me the default configuration of it,and of course if it is possible to configure ghe device through i2c?

Thank you in advance

  • Hi there,

    It looks like you expect the nRF52832 to have a default I2C mode or address which is not the case. The nRF52832 is a MCU not a typical I2C slave where the address and application has already been set. nRF52832 has both a TWIM (I2C master) and a TWIS (I2C slave) peripheral, which means that it can act as both. The I2C master supports a clock frequency of 100 kbps, 250 kbps, or 400 kbps. How the nRF52832 is configured depends on what application that you flash to it. See our nRF5SDK for TWIM and TWIS examples or the I2C example in Zephyr

    best regards

    Jared 

  • Hello Jared and thank you for your reply.

    That is exactly my question. I mean I saw the documentations and nRF52832 is pretty smart! With lots of functionalities.

    What am I asking is that we bought some BT832X. I was expecting that they are like black boxes, not to program the MCU myself. I was thinking that they already flashed a configuration, and we just need to communicate with the board through some buses (I2C, UART or so). Shall I configure myself the MCU to act properly???

    To understand what am I looking for, is that to achieve some data through my hardware, and then pass those to a paired device through Bluetooth. I bought the BT832X in the next scenario:

    1) I acquire some data through my hardware;

    2) I pass that data to BT832X

    3) it's doing its magic to deliver the data to paired Android device, and that's it (being a blackbox, I need maximum to configure BT832X board through some AT commands, simple stuff, set the Bluetooth Friendly Name, maybe see the MAC address and so on).

    The main problem is how can I communicate with the BT832X board, using its default settings. Or more exactly how the BT832X is configured. Or shall I configure myself, and flash my own application somehow to the nRF52832 planted on BT832X? I am very confused.

    I hope now my question is a bit more clear.

  • Hi there,

    Neacsu Cristian said:
    What am I asking is that we bought some BT832X. I was expecting that they are like black boxes, not to program the MCU myself. I was thinking that they already flashed a configuration, and we just need to communicate with the board through some buses (I2C, UART or so). Shall I configure myself the MCU to act properly???

    Yes,. The MCU doesn't get shipped with a specific fw, you can consider it empty with no particular configuration except for what is defined as default state of the different registers as explained in the Product spec. You therefore have to flash the MCU with an application, a good starting point is our examples in the nRF5SDK or the samples in nRF Connect SDK. The difference between the two is explained here. A good sample to start with for your application is the NUS sample which receives data through serial UART and sends it to the connect peer over BLE . 

    regards

    Jared

  • I understand.

    Thank you so much for your time and responses. I really appreciate your help!

    All the best!

    Cristian-Stefan

  • Hi,

    Anytime!

    I'll mark this case as resolved then!

    best regards

    Jared

Related