- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chipset: PSOC 4 (CY8C4248LQI-BL583)
I base on "Setting Bluetooth Device Address - KBA211407" to program the company ID and company assigned part.
1. Use PSoC Creator to burn the hex image to the chip
2. use "PSoC4-BLE-SFLASH-Update.exe" to write the company ID and company and company assigned part in Row 0 via PSoc MiniProg3.
3. Code will be not run any more
4. Use PSoc Creator to re-burn the hex image to the chip
5. Use CyBle_GetDeviceAddress to get the company ID and company assigned part, but it is garbage.
Please let me know how to fix the issue. Thanks!
Regards,
CK
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If non-zero value is programmed into the row 0 of user SFLASH, the BLE component will take the first 6 bytes as BLE device address. This procedure happens after the event CYBLE_EVT_STACK_ON in CyBle_EventHandler function (BLE_eventHandler.c). So, please call CyBle_ProcessEvents() atleast once before CyBle_GetDeviceAddress(&local_bdAddr)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PSoC4-BLE-SFLASH-Update.exe will perform Erase All target flash. Please perform SFlash update first and program the project hex file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Based on your comment, I use PSoC4-BLE-SFLASH-Update.exe to write the row 0 as follow "02 00 00 B0 07 00 00".
2. And then use PSOC Creator re-program the hex file into the chip again.
3. And run the debugger with the following code:
static CYBLE_GAP_BD_ADDR_T local_bdAddr;
static CYBLE_API_RESULT_T ret;
BLE_Server_Start();
local_bdAddr.type = 0;
ret = CyBle_GetDeviceAddress(&local_bdAddr);
After step through CyBle_GetDeviceAddress, I get the return code and the structure as the followings:
ret <--- CYBLE_ERROR_OK
But the local_bdAddr <--- 0x80 0x95 0x19 0x29 0x49 0x80
(It ise garbage, I expect it should be "0x02 0x00 0x00 0xB0 0x07 0x00"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If non-zero value is programmed into the row 0 of user SFLASH, the BLE component will take the first 6 bytes as BLE device address. This procedure happens after the event CYBLE_EVT_STACK_ON in CyBle_EventHandler function (BLE_eventHandler.c). So, please call CyBle_ProcessEvents() atleast once before CyBle_GetDeviceAddress(&local_bdAddr)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is working great! Thanks for your support!