cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure BlueNRG-2 for SPI communication

JTorr.1
Associate II

The BlueNRG-2 has multiple communication protocols available (UART, SPI, I2C). I am planning to use it in a custom PCB and would like to configure it for SPI, which I can only find mentioned in Section 3.8.2.2 "Procedure for enabling SPI" in the BlueNRG-2 Datasheet. How are you supposed to interact with it at this level (to program IO_MODE to route SPI port signals on those GPIOs)? What would the hardware setup look like? For this method, do you use the UART bootloader to program the on-board memory?

I may be wrong, but from what I have read, there are only two ways of configuring it. One way is to use UART and open a COM port, and the other way is by using an ST Link/V2 programmer and connecting it to the SWD pins. Then by using the BlueNRG-2 Flashing Utility to load the DTM_SPI.hex file onto the chip. Is this accurate?

I was wondering if anyone could explain any other options for configuring this chip for use with SPI, or provide any helpful information or resources pertaining to what it seems like I am currently trying to do.

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Currently OTA reset manager and service manager support projects including Beacon, Chat, and SensorDemo.

These are ready to work. To program DTM through OTA, it is required to modify the project a little bit.

If you would like to program BlueNRG-2 as a network processor, the available(ready) methods are to program DTM_SPI/DTM_UART image through either UART bootloader or SWD.

After DTM_SPI is programmed, BlueNRG-2 will work in a similar way (HCI over SPI) to BlueNRG-MS.

View solution in original post

5 REPLIES 5
Winfred LU
ST Employee

Please start with the SPI sample project in DK:

BlueNRG-1_2 DK 3.1.0\Project\BlueNRG1_Periph_Examples\SPI\Master_Polling

To program the flash, there are only 2 options: thru UART bootloader or thru SWD (ST-Link).

Thank you! Is it possible to use the OTA functionality to program the BlueNRG-2 as a co-processor? I'm just trying to figure out all possible options. The UART connection will likely be fine for our purposes. And I apologize as I am still new to this stuff. I was preparing to use the BlueNRG-MS previously which was configured as a co-processor. I found the DTM_SPI.hex and DTM_UART.hex images that will allow us to use the module as a co-processor, similar to the BlueNRG-MS. I was unaware that that is what I was looking for.

Yes, you can use the BlueNRG-2 as a coprocessor in almost the same way as you would use a BlueNRG-MS. The product I am working on started out with a BlueNRG-MS and we upgraded to the BlueNRG-2 to get the higher data throughput. Commands are mostly the same with a few changes for the additional BT 5.0 data and security features.

Currently OTA reset manager and service manager support projects including Beacon, Chat, and SensorDemo.

These are ready to work. To program DTM through OTA, it is required to modify the project a little bit.

If you would like to program BlueNRG-2 as a network processor, the available(ready) methods are to program DTM_SPI/DTM_UART image through either UART bootloader or SWD.

After DTM_SPI is programmed, BlueNRG-2 will work in a similar way (HCI over SPI) to BlueNRG-MS.

Sweet! Thank you, I'll be sure to look into that. My boss will be very interested!