Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Setting Bluetooth Device Address – KBA211407

Setting Bluetooth Device Address – KBA211407

Not applicable

Setting Bluetooth Device Address – KBA211407

Author: GeonaM_26         Version: *C

Translation - Japanese: Bluetoothデバイスアドレスの設定– KBA211407 - Community Translated (JA)

Question: How do I set the address of a device based on silicon-generated/SFlash?


The public device address (48 bits) of a Bluetooth device includes two parts:



  • Company-ID part:

It is a 24-bit Organization Unique Identifier (OUI) address assigned by IEEE. For testing purposes, you can use the Cypress OUI (0x00A050[BJ1] ). For production purposes, you should to get the OUI for your company. You can get your Company ID from the Bluetooth SIG (refer https://www.bluetooth.org/en-us/specification/assigned-numbers/company-identifiers ) after you get an adopter or associate membership, or can use an OUI assigned by the IEEE (refer https://standards.ieee.org/develop/regauth/oui/)

  • Company Assigned part:

The 24 least significant bits constitute the Company Assigned part.

For this part, either you can use silicon-generated company-assigned value or you can directly write a value into flash.

To set this part based on silicon-generated value, open the BLE Component configuration in PSoC® Creator™ TopDesign. Check the Silicon generated “Company Assigned” part of the device address check box (as shown in Figure 1).

Figure 1: BLE Component Configuration Setting for Public Device Address


When you enable this option, the “Company assigned” part of the device address is generated using the Wafer ID and X-Y die location on the wafer .PSoC creator then populates the company-assigned part of the device address using the 6 bits of the Die X register, 6 bits of the Die Y register, 5 bits of the Die wafer, and 7 bits of the Die Lot registers. Thus, you get 2^24 different device addresses.

The address configured here is static and is designed to be used for development purposes only. This address is programmed into the device via the SWD interface. Normally, this address must be programmed only once during mass production, and then never changed in field. However, user flash can be reprogrammed in-field many times.

During prototyping (firmware design), this address can be programmed using MiniProg3. To do so, use the Sflash Update Tool available in PSoC Programmer installation directory. There are separate versions for PSoC 6 BLE and PSoC 4 BLE devices.

1. PSoC6-BLE2-SFLASH-Update.exe is available in the C:\Program Files (x86)\Cypress\Programmer\Examples\Misc\PSoC6-BLE2-SFLASH-Update\Executable folder. Enter the device address structure of type cy_stc_ble_gap_bd_addr_t in Row 0 line to store it in the Sflash. See Figure 2.

Figure 2: PSoC 6 BLE Sflash Update Tool


2 .PSoC4-BLE-SFLASH-Update.exe is available in the C:\Program Files (x86)\Cypress\Programmer\Examples\Misc\PSoC4-BLE-SFLASH-Update\Executable folder. See Figure 3. On this tool, enter the device address structure of type CYBLE_GAP_BD_ADDR_T [BJ3] in the Row 0 line to store it in the Sflash.

                                                                             Figure 3: PSoC 4 BLE Sflash Update Tool


Row 0 address is 0x0FFF F200 for a device with 128KB flash; it is 0x0FFF F400 for a device with 256KB flash.

Row 1, Row 2, and Row 3 are not used by the Component and available for user information storage. Note that row addresses and length (128, 256, or 512 bytes) depend on the flash memory size of the selected device. This application is provided in source code, and can be used as a reference example for implementation in production programmers.