Smart Bluetooth Forum Discussions
I want to update the BCM20736 code in external flash with Bluetool, but I do not know how to configurate Bluetool to implement that.
Waiting for one reply sincerely
Show LessMy goal is to have timing consistency from the point I call bleprofile_StartTimer(); to the first time of fine timeout callback.
At the point I start timer
life=4; //to observe only the first few rounds of the callback
bleprofile_regTimerCb(print_time_and_kill, NULL);
startTimerTimestamp = bleapputils_currentNativeBtClk();
bleprofile_StartTimer();
// bleapputils_Sleep(50); //sleep for 5 ms
At the callback function
void print_time_and_kill()
{
ble_trace1(":%u",bleapputils_BtClksSince(startTimerTimestamp));
if(--life==0)
{
bleprofile_KillTimer();
}
}
the code do nothing after bleprofile_StartTimer();
fine_timer_interval = 12.5 ms
First case (without bleapputils_Sleep in line 5)
The time gap between the point I start timer and the first callback will vary so much in the range of 1 - 40 units (0.3125 - 12.5 ms)
but the time gap between two consecutive callbacks is very consistent at 40 units (12.5 ms)
I've notice that in the output Console, these 3 lines will be printed before the first callback is called. (important clue)
16:49:51 Fine Timer(12 ms, 80/sec)
16:49:51 Fine TImer tick 1
16:49:51 Normal Timer(0 s, 0 tick)
16:49:51 - :31
16:49:51 - :71
16:49:51 - :111
16:49:51 - :151
Second case (with bleapputils_Sleep in line 5)
In this case, those three lines are printed after the first callback like this.
17:29:29 - :18
17:29:29 Fine Timer(12 ms, 80/sec)
17:29:29 Fine TImer tick 1
17:29:29 Normal Timer(0 s, 0 tick)
17:29:29 - :42
17:29:29 - :82
17:29:29 - :122
In this case, the time gap between the point I start timer and the first callback is very consistent at 18 units.(5.625 ms)
But the gap between the first and the second callback becomes the inconsistent part instead.
Any gaps after the second callback are consistent at 40 units (12.5 ms)
=================================================================
My hypothesis is that the code that generate those 3 lines about Fine and Normal Timer are the source of inconsistency.
Where is it from?
and How can I skip them to make all time gaps more consistent?
or Anyone know a workaround for this issue?
Thanks,
Show LessHi together,
I'm using memcpy and get the warning from the title.
I already include string.h - what else can I do besides ignoring this error?
Best regards
Hannes Baumgart
Show LessHi
I want to know which pins in BCM20737S are interrupt pins. Can i use P24 as interrupt pin i did not get any information about it from datasheet. Do i need to place some resistor or transistor in order to drive it. Thanks
Rashid
Show LessTo mantain the BCM20732S certification (also with the BCM20736S and BCM20737S modules) what PCB thickness must we use (if necessary) for our products?
Show LessHi,
I just modify wiced_sense, add some trace information in function
UINT8 wiced_sense_poll_hpt_and_fill_notification_packet(UINT16* data_ptr, UINT8* size) {
ble_trace2("Humi*10=%6d, Temp*10=%6d", humidity, temperature);
.....
}
Now 20737 ofen crash while it send data to android phone(with wiced-sense app).
The crash log are:
18:48:28 - Noti length: 7
18:48:28 - 34 1e 01 29 04 02 01
18:48:28 - PC = x20B130FA
18:48:28 -
18:48:28 - SP = x002003B8
18:48:28 -
18:52:26 -
18:52:36 - Noti length: 19
18:52:36 - 0b 2b 00 d0 ff 31 00 d8 07 95 c7 32 19 0b 04 cc
18:52:36 - 01 40 f8
18:52:36 - PC = x20B130FA
18:52:36 -
18:52:36 - SP = x002003B8
18:52:36 -
But why? what happens?
BR
Edward
Show LessHi,
I'm running the Hello Client app on my BCM92073X_LE_KIT to connect two WICED Sense tags which run Hello Sensor. The kit connects to client application (LightBlue on Macbook) and 1st sense tag successfully but gets failed to connect the 2nd tag. I also find once I try to connect the 2nd tag, the connection between 1st tag and kit become unstable. Sometimes the notification is not sent from 1st tag to kit. From the trace I see the two connections keep up and down and the disconnection reason is 0x8. I'm unable to make my kit connect to more than two slaves. I follow the test steps and didn't change any code. Is there anything I missed to make it work?
Thanks
Show LessHi
Is the threshold of voltage the same in BCM20737S SoC and SiP?
Best Regards
I want to use BCM20732 with BlueZ stack on linux (I want to connect it directly by UART), but I am wondering if that chip allows me to have high throughput.
Does that chip allow to receive more than one packet per connection interval? My peripheral solution transmits 6packets(notifications) x 20bytes/connection.
If yes, how many packets are available? Or maybe it is limited by memory size?
best regards,
Wojtek
Show LessDear All,
I am using BCM920732 to develop a uart app.
Now I have encountered a problem, my puart always lost data even though I only want to receive 6 bytes.
I read the article as bleow. disable the sleep mod.
but it's not working for me.
Can someone advice me how to solve it?
Thanks.
my code are as below:
// fix for puart.h - found in ws_upgrade_uart.h - have no idea if that's right.
extern BLECM_FUNC_WITH_PARAM puart_bleRxCb;
//private:
INT32 application_puart_interrupt_callback(void* unused);
// holds the callback function when a packet is read.
FUNC_ON_UART_RECEIVE onReceiveCB;
// Callback called by the FW when ready to sleep/deep-sleep. Disable both by returning 0
// so the UART will always receive bytes.
UINT32 ws_upgrade_uart_device_lpm_queriable(LowPowerModePollType type, UINT32 context)
{
// Disable sleep.
return 0;
}
/***
* Inits the PUART with the given RX callback.
*/
void uart_init(FUNC_ON_UART_RECEIVE callback) {
extern puart_UartConfig puart_config;
// Do all other app initializations.
// Set the baud rate we want to use. Default is 115200.
puart_config.baudrate = PUART_BAUD_RATE;
//puart_config.pUartFunction
// Select the uart pins for RXD, TXD and optionally CTS and RTS.
// If hardware flow control is not required like here, set these
// pins to 0x00. See Table 1 and Table 2 for valid options.
puart_selectUartPads(PUART_RX_PIN, PUART_TX_PIN, 0x00, 0x00);
// Initialize the peripheral uart driver
puart_init();
// Since we are not configuring CTS and RTS here, turn off // hardware flow control. If HW flow control is used, then // puart_flowOff //should not be invoked.
puart_flowOff();
bleprofile_PUARTRxOn();
bleprofile_PUARTTxOn();
/* BEGIN - puart interrupt
The following lines enable interrupt when one (or more) bytes
are received over the peripheral uart interface. This is optional.
In the absence of this, the app is expected to poll the peripheral uart to pull out received bytes.
*/
#if ENABLE_PUART_INTERRUPT_CALLBACK
// clear interrupt
P_UART_INT_CLEAR(P_UART_ISR_RX_AFF_MASK);
// set watermark to 1 byte - will interrupt on every byte received.
P_UART_WATER_MARK_RX_LEVEL (1);
// enable UART interrupt in the Main Interrupt Controller and RX Almost Full in the UART // Interrupt Controller
P_UART_INT_ENABLE |= P_UART_ISR_RX_AFF_MASK;
// Set callback function to app callback function.
puart_bleRxCb = application_puart_interrupt_callback;
// also register a listener from the caller
onReceiveCB = callback;
// Enable the CPU level interrupt
puart_enableInterrupt();
/* END - puart interrupt */
#endif
// disable sleep mode: the PUART does not work if the device is asleep
devlpm_init();
// Since we are not using any flow control, disable sleep when download starts.
// If HW flow control is configured or app uses its own flow control mechanism,
// this is not required.
devlpm_registerForLowPowerQueries(ws_upgrade_uart_device_lpm_queriable, 0);
// print a string message assuming that the device connected
// to the peripheral uart can handle this string.
//ble_trace0("Application initialization complete!");
}
INT32 application_puart_interrupt_callback(void* unused) {
// There can be at most 16 bytes in the HW FIFO.
char readbytes[16];
UINT8 number_of_bytes_read = 0;
// empty the FIFO
while(puart_rxFifoNotEmpty() && puart_read(&readbytes[number_of_bytes_read])) {
if(readbytes[number_of_bytes_read]!= 0x61)
ble_trace2("\n No: %d puart read: %x \n",number_of_bytes_read,readbytes[number_of_bytes_read]);
number_of_bytes_read++;
}
ble_trace1("\n %d byte received \n",number_of_bytes_read);
// readbytes should have number_of_bytes_read bytes of data read from puart. Do something with this.
//ble_trace1("application_puart_interrupt_callback:number_of_bytes_read %d \n",number_of_bytes_read);
//application_send_bytes(readbytes,number_of_bytes_read);
// clear the interrupt
P_UART_INT_CLEAR(P_UART_ISR_RX_AFF_MASK);
// enable UART interrupt in the Main Interrupt Controller and RX Almost Full in the UART Interrupt Controller
P_UART_INT_ENABLE |= P_UART_ISR_RX_AFF_MASK;
return 0;
}