Smart Bluetooth Forum Discussions
Hi,
We've been following the recovery steps provided by mwf_mmfae in this thread:
How to recover BCM20736S on custom board?
but we still observe certain failures in our firmware that make us doubt of our understanding of the boot/recovery process. Let me start with the facts:
1. We have a development firmware image that compiles, downloads and runs fine EXCEPT that after loading that image, the device cannot be re-programmed normally. Let's call this the "faulty" firmware.
2. We are able to recover by asserting reset while holding SDA high (VDD). After doing that, we can download the "faulty" firmware again, with the same behaviour described in 1.
3. We can "correct" our firmware image by simply reducing the program size. By #ifdef'ing out a 1 kbyte constant array in the code, we obtain a firmware image that can now be re-programmed normally over and over.
4. The "faulty" firmware is this size:
Patches start at | 0x00204568 (RAM address) |
Patches end at | 0x00205280 (RAM address) |
Application starts at | 0x00204F9C (RAM address) |
Application ends at | 0x00208D1C (RAM address) |
Patch size (including reused RAM) | 3352 bytes |
Patch size | 2612 bytes |
Application size | 15744 bytes |
------ | |
Total RAM footprint | 18356 bytes (17.9kiB) |
5. The "corrected" firmware is this size:
Patches start at | 0x00204568 (RAM address) |
Patches end at | 0x00205280 (RAM address) |
Application starts at | 0x00204F9C (RAM address) |
Application ends at | 0x0020890C (RAM address) |
Patch size (including reused RAM) | 3352 bytes |
Patch size | 2612 bytes |
Application size | 14704 bytes |
------ | |
Total RAM footprint | 17316 bytes (16.9kiB) |
Now some questions...
1. Our theory is that the "normal" download requires some firmware that is stored on EEPROM, let's call that a "download helper". And that our "faulty" firmware overwrites the area where the "download helper" is stored. Is that correct?
2. If 1 is correct, how can we find the exact address where the "download helper" is stored? We would then include a check in the build scripts to raise a warning if a firmware build exceeds that memory address and avoid a painful recovery. Makes sense?
3. What is the purpose of the "download helper"? Could we *always* program the device using the recovery sequence? Are there any problems with that? Seems to be more robust, and it also seems like this would allow us to use more of the EEPROM memory.
Thanks!
Show LessJust wanted to check, if you want to use ota upgrades to program the 20737, can you do that the first time you get the 20737 chip? Or do you have to program the 20737 using the HCI UART the first ever time you get your boards from the factory?
Show LessI currently have a voltage regulator to supply voltage to 20736S from a coin cell operating at 3V. Going over the blebat.c,
blebat_batmon_cfg =
{
/*.adcInputConnectedToBattery =*/ ADC_INPUT_VDDIO, // P15. ADC input to be used for measurement. Note that this may not be a GPIO.
/*.measurementInterval =*/ 60000, // msec. Interval between battery measurements
/*.numberOfMeasurementsToAverage =*/ 8, // Number of measurements averaged for a report, max 16
/*.fullVoltage =*/ 3200, // millivolts. The nominal full battery voltage
/*.emptyVoltage =*/ 1800, // millivolts. The voltage at which the batteries are considered drained
/*.shutdownVoltage =*/ 1700, // millivolts. System should shutdown if it detects battery
// voltage at or below this value. 0 disables shutdown.
/*.maxLevel =*/ 100, // Sets the range of the reported number of steps
// Set it to 100 to report battery in %, 0-100.
/*.reportID =*/ 3, // ID of the battery report
/*.reportLength =*/ 8, // Length of the battery report
/*.reportOnConnect =*/ TRUE, // if TRUE report should be sent when connection is established
}
Shows that the full battery is measured at 3.2V. Can I then power the chip with the regulated voltage and have direct input from the battery at P15(3V input) and the internal ADV will monitor the battery level?
Show LessBoard overview and PCB assembly
The Broadcom WICED Smart Tag based on BCM2073X chip is an evaluation board that is for
evaluation and troubleshooting.
Figure 1, 2 and Figure 3, 4 show the pictures of PCB boards’ real looking. In the next pages we
will explain the details for the HW working configurations based on power supply.
Figure 1: 20732 WICED Smart Tag Top View
Figure 2: 20732 WICED Smart Tag Bottom View
Figure 3: 20736//20737 WICED Smart Tag Top View
Figure 4: 20736 20737 WICED Smart Tag Bottom View
Power configurations
The WICED Smart Tag can be powered either by coil cell battery or 5V USB. Let’s have a look at the related schematic first:
20732 schematic drawing
20736// 20737 schematic drawing
Coin Cell battery powered
In the schematic drawing, two switchers are used--SW2 and SW3. When we choose VBAT directly for main power supply source:
- Pin 1 ,2
of SW2 need be connected, that’s to say physically disconnected U13 from the circuit to make Coin Cell battery directly power the system. - At the same time pin 2 ,3 of SW3( for 20732 TAG board) or pin 1,2 of SW3( for 20736//20737 TAG board) need be connected together too.
On this case, VDDIO voltage value is exactly VBAT’s voltage value.
Further looking at different positions on the real PCB boards
Pull down SW3, pull up SW2 for 20732 TAG board
Pull up SW3, pull up SW2 for 20736//20737 TAG board
We also can have LDO U13 included to get an expected voltage value for VDDIO. If this is the case, pin 2 ,3 of SW2 and pin 1 ,2 of SW3(for 20732 TAG board) or pin 2,3 of SW3( for 20736//20737 TAG board) need be connected, by setting the different value of RFB1 and RFB2. We can get the different VDDIO value, the formula is:
VDDIO=0.8X (RFB1+RFB2)/RFB2
For example,
VDDIO =3.3V; when RFB1= 470Kohm, RFB2=150Kohm
Physically PCB board switches indication
Pull up SW3, pull down SW2 for 20732 TAG board
Pull down SW3, pull down SW2 for 20736//20737 TAG board
5V_USB powered
If 5V_USB is selected for the main power supply source, pin 1,2 of SW2 and SW3 need be connected for 20732 TAG board; pin 2,3 of SW3, pin 1,2 of SW2 need be connected for 20736//20737 TAG board . In this way LDO U13 is necessary to be included into the power system for voltage converting, by setting the different value of RFB1 and RFB2. We can get the different VDDIO
value by the following formula:
VDDIO=0.8X(RFB1+RFB2)/RFB2
For example, VDDIO =3.3V; when RFB1= 470Kohm, RFB2=150Kohm
20732 TAG board schematic indication and switches position
Pull up the switches like the picture showing
20736//20737 TAG board schematic indication and switches position
For switches, pull up SW2 and pull down SW3 in 20736//20737 TAG board
Hi Community,
I am developing an Android App for the ongoing hackathon. I want to access only Gyroscope and i required the UUID's of the sensor and the methodology to read Charaacteristics for each sensor. Can someone please help me or provide me a data sheet which can be helpful?
Thanks a lot, in advance
Show LessWiced-Smart-SDK: 2.1.1
I add some code in hello_sensor_timeout for testing cfa_mm_MemFreeBytes and cfa_mm_Alloc, but I found the return value of cfa_mm_MemFreeBytes can't change after calling cfa_mm_Alloc.
void hello_sensor_timeout(UINT32 arg)
{
UINT8* tmp;
ble_trace1("hello_sensor_timeout:%d\n", hello_sensor_timer_count);
tmp = cfa_mm_Alloc(32);
ble_trace3("E: Free bytes = 0x%08X, 0x%08X, 0x%08X\n", cfa_mm_MemFreeBytes(), &tmp, tmp);
switch(arg)
{
case BLEPROFILE_GENERIC_APP_TIMER:
{
hello_sensor_timer_count++;
}
break;
}
}
BLE_high_un_adv:timer(1)
Hi Community:
I am suffering a case like that: we have 10pcs boards totally, about 5pcs have issues of shut down suddently afte starting up and sending advertising, the boards download SW well, there are logs below, anybody can help to do some analysis?
Thanks.
SW version: SDK 1.1 HW chip:20732s , we download hello_sensor target, below are the log information:
_WP:OFF=0
hello_sensor_create()
- 1.00
bcm280_Read..fail
bcm280_Init..Error
id:0
bme222e_Init..Error
GattDB:20cc80, 20cdc1
hdl:perm:len:maxlen:uuid
0001:02:02:02:2800
01 18
0014:02:02:02:2800
00 18
0015:02:05:05:2803
02 16 00 00 2a
0016:02:10:10:2a00
48 65 6c 6c 6f 00 00 00 00 00 00 00 00 00 00 00
0017:02:05:05:2803
02 18 00 01 2a
0018:02:02:02:2a01
00 02
0028:02:10:10:2800
23 20 56 7c 05 cf 6e b4 c3 41 77 28 51 82 7e 1b
0029:02:13:13:2803
32 2a 00 26 f6 69 91 68 ee c2 be 44 4d b9 5c 3f
2d c3 8a
002a:82:07:07:00
48 65 6c 6c 6f 20 30
002b:0a:02:02:2902
00 00
002c:02:13:13:2803
02 2d 00 1a 89 07 4a 2f 3b 7e a6 81 44 3f f9 a8
f2 9b 5e
002d:82:10:10:00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
004d:02:02:02:2800
0a 18
004e:02:05:05:2803
02 4f 00 29 2a
004f:02:08:08:2a29
42 72 6f 61 64 63 6f 6d
0050:02:05:05:2803
02 51 00 24 2a
0051:02:08:08:2a24
31 32 33 34 00 00 00 00
0052:02:05:05:2803
02 53 00 23 2a
0053:02:08:08:2a23
93 b8 63 80 5f 9f 91 71
0061:02:02:02:2800
0f 18
0062:02:05:05:2803
02 63 00 19 2a
0063:02:01:01:2a19
64
GattDB complete
02 01 06 06 09 48 65 6c 6c 6f 04 0d 00 00 00 03
03 00 00
02 0a 04
bd_addr: 20732a093e41
GPIO1(11)
GPIO_WP:OFF=0
GPIO_BUTTON1:OFF=0, INT:1
GPIO_LED:OFF=1
GPIO_BAT
GPIO_BUZ:OFF=0
Fine Timer(256 ms, 3/sec, 26 tick)
Normal Timer(1 s, 80 tick)
23 20 56 7c 05 cf 6e b4 c3 41 77 28 51 82 7e 1b
02 01 05 11 07 23 20 56 7c 05 cf 6e b4 c3 41 77
28 51 82 7e 1b 06 09 48 65 6c 6c 6f
BLE_high_un_adv:timer(1)
system stopped here, no any reponse more.
Show LessHi,
In the SDK2.1.1, there is an app 'Hello_Sensor', the peer app on windows platform need 'BTW LE version' , looking for ' BluetoothApis.dll ', ' BTWLeApi.Dll' , 'btrez.dll', However the latest version of BTW ( BTW_6_1_0_1506_SDK ) , does not really contain all these dll, Could you check where to get those DLL ?
Thanks!
See the code from the SDK:
else if (IsOSWin7())
{
dlg.m_bWin8 = FALSE;
TCHAR BtDevFullPath[MAX_PATH+1] = { '\0' };
CBTFullLibPath LibPath;
LibPath.GetFullInstallPathOf(L"BTWLeApi.Dll", BtDevFullPath, MAX_PATH);
if ((hLib = LoadLibrary(BtDevFullPath)) == NULL)
{
MessageBox(NULL, L"Broadcom Blueototh profile pack for Windows (BTW) has to be installed", L"Error", MB_OK);
return FALSE;
}
BtwGuidFromGuid(&guidSvcHello, &UUID_HELLO_SERVICE);
BtwGuidFromGuid(&guidCharHelloConfig, &UUID_HELLO_CHARACTERISTIC_CONFIG);
BtwGuidFromGuid(&guidCharHelloNotify, &UUID_HELLO_CHARACTERISTIC_NOTIFY);
}
Show Less