Smart Bluetooth Forum Discussions
Hi,
I am tring to work on PUART by 20737TAG EVK. The RX can work but the TX over PUART can't. Here is the code.
1. Copy hello sensor to one new directory.
2. In INIT function:
APPLICATION_INIT()
{
bleapp_set_cfg((UINT8 *)hello_sensor_gatt_database,
sizeof(hello_sensor_gatt_database),
(void *)&hello_sensor_cfg,
NULL,
(void *)&hello_sensor_gpio_cfg,
hello_sensor_create);
//BLE_APP_ENABLE_TRACING_ON_PUART(); ////// Uncomment to disable all tracing
//BLE_APP_ENABLE_TRACING_ON_HCI_UART();
}
3. In hello_sensor_create
at the end of the function
init_my_uart();
4. Inside init_my_uart()
{
ble_trace0("Init uart port\r\n");
puart_selectUartPads(33,32,0,0);
puart_init();
puart_setBaudrate(0,0,115200);
puart_flowOff();
/* Clear INT */
P_UART_INT_CLEAR(P_UART_ISR_RX_AFF_MASK);
P_UART_WATER_MARK_RX_LEVEL(1);
P_UART_WATER_MARK_TX_LEVEL(0);
P_UART_INT_ENABLE |= P_UART_ISR_RX_AFF_MASK;
{
UINT8 readbyte;
// empty the FIFO
while(puart_rxFifoNotEmpty() && puart_read(&readbyte))
{
(void)(readbyte);
}
}
puart_rxCb = my_uart_rx_callback;
puart_enableTx();
puart_enableInterrupt();
}
5. Test send function in timer
void uart_send_test_char_kkk(void)
{
UINT8 a='c';
puart_write(a);
a='d';
puart_write(a);
a='e';
puart_write(a);
a='\r';
puart_write(a);
a='\n';
puart_write(a);
}
I have tried 115200/38400 and both can't work in the TX direction. But the RX works fine.
Show LessI have a custom board containing a BCM20736S module and trying to program it via my BCM20737 TAG board according to the documentation on this site. Two problems:
1. I am using a Tag-Connect.com six pin "bed of nails" to connect the custom board. Unfortunately it does not mate with the six pin pico header on the TAG board (JP1). It is problematic for me to build a proper cable with this small of a header and I fear signals are getting corrupted (data and clock on the uart_rx and uart_tx lines) when I run the cable through a breadboard.
Does anybody know where I can get a prebuilt cable for the JP1 pico-header on the TAG board? I found some parts at Molex but it is a pain to deal with this mundane cabling issue. Is it possible to use the J10 header instead? How about putting a more common connector on the TAG for the JP1 programming port?
2. I managed to cobble together some wires with pico-crimp and heat shrink insulation to connect to the JP1 programming header (UART_TX, GND, UART_RX, +VDDIO) .. I also have a reset button to pull reset low on my device, as well as a pull up on the RXD line (The factory programming example document is for the BCM20732S and I don't know if this pullup applies to the 736S as well...??).
Anyway, when I fire this up and try to download a program The SDK says it doesn't see a device. Two Red LEDs on the TAG board blink once very briefly and that's the end. I don't see any data going out on TX or RX...
I've tried RX pull UP and pull Down and swapping RX and TX and still nothing. Any suggestions? Are there other programming devices that would be easier than doing this with the TAG board?
Show LessFor my application, I have an external RTC interrupt that I used to generate my own timing interrupts when desired.
Since I am using this, I have tried to turn off the fine and coarse timers in my application.
I did this by simply not calling the functions to set them up:
bleprofile_regTimerCb(tm_fine_timer_cb, tm_coarse_timer_cb);
and
bleprofile_StartTimer();
the 'fine timer' value in the ble_profile_cfg structure is 1024.
Although I am not getting any callbacks (since I did not register them), when looking at the current over time I suspect that there is still a wakeup happening, that is separate from my own RTC interrupt and from other things like beacons being transmitted. The spikes only occur when the radio is active (i.e. when advertising or connected).
The following plots show the spikes. In this plot, the RTC interrupts are marked with red arrows. The tall blue spikes are advertisement beacons being sent (the device began advertising around 7 seconds in this plot). The green spikes are the extra spikes I would like to get rid of, that I think might be timer wake ups. (NOTE: the large DC offset after start of advertising can be ignored - it is caused by an LED running)
This plot is a zoom of the above showing the area near the second pair of arrows.
NOTE also in the first small spike above you can see the RTC interrupt line pull against the GPIO internal pull-up, where there is some slightly higher current draw before the clock turns on (the clock is the 400uA draw before the spike). There is no equivalent draw in the second spike - i don't think this event is triggered by an external interrupt:
Is there anything else I need to do to prevent the application timers from firing and waking up the system? This did not happen in the 20732 because the application timers in that version never woke up the system -- they would implicitly synchronize with the beacons or other activity. Or is there something else that is likely to be happening that wasn't in the 20732? When a connection is active I register for connection event notifications, but I don't think that should be causing this because it should be de-registered.
I don't know what is causing them, but I do know that the application is quite similar to the version on the 20732, but on the 20736 I get these extra spikes that don't happen on the 20732. This causes a 50% increase in power cost during advertisement.
Show LessI know that most of cortex-m3 core can provide reset reason for debugging, could bcm20732s can provide this function? If so, how can I get it?
Show LessThere is a app available from Nordic Semiconductor in Google Play and also on AppStore for iOS user for testing their BLE Chip. Please see the link below :
nRF Toolbox App - Nordic Semiconductor
Is Broadcom planning to release a similar app in future for their BCM20736S Chip ?
Thanks.
Show LessI'm looking at proximity_client application in SDK2.1.1.
In ancs_client_encryption_changed,
status gets the value of evt+1 and it seems to be the length of HCI_EVT_HDR.
but I can not understand clearly what the "status" means.
If status means length of evt, then why does 0 return mean successful pairing?
I tested several cases, and normally return value of status is 0.
When I redownload sensor image after successful pairing with central, I could see 6 or 8 in status variable when I try to reconnect with central.
Could you please explain what 6 or 8 means and this status does?
Thank you.
Show LessIs there an example and good tutorial about proximity detection.
My application is intend have BLE peripheral (device) and central (smartphone). When phone is within 2ft of the device, the device does X. Assuming the device is always scanning, or waken by user through some UI.
What is the best sample code to start with?
How do I measure distance using RSSI?
Can I change device Tx power? How?
Show LessIn video 4 in WICED Smart Video BLOG: Experts Interview - Sleep Deep_Sleep and Advertising, it talks about how to implement static library in the application code. By adding
APP_PATCHES_AND_LIBS += application_poll_notification.a in the makefile.mk
My question is:
Where can I get header files for list of static libraries in /WICED-Smart-SDK/Wiced-Smart/tier2/brcm/libraries/lib/20737/
Show Less