Smart Bluetooth Forum Discussions
Can the LED-port be defined (for 20737) when using bleprofile_LEDBlink() ?
Our board has the LED connected to P27.
The same question arrises for the button port.
Show LessI'm developing a BLE peripheral that has to go in deep sleep and keep connecting to a central device using CY8C4247FNI-BL483 and I'm switching from a "developing" board to a miniaturized board for production. Loading the same firmware on both boards I see that on the developing board everything works fine. On the production board I find that the peripheral device connects to the central, it negotiates successfully for a longer connection interval (500 ms with a 5s supervision TO and slave latency to 0) with the central, tries to go on deep sleep and, after supervision TO period has passed, the central device receive a "Connection Terminated Notification" event and the connection goes down. As a central device, for testing purpose, I'm using "CY5670: CySmart USB Dongle" and CySmart. I've noticed that if the BLESS doesn't go in deep sleep it maintains the connection up without any trouble.
The main differences between the two board versions are:
1-Different antenna routing network.
2-Different microcontroller package (from QFN to WLCSP)
3-Different layout and component dimensions for the WCO and ECO crystals involved.
I think the difference at point number 1 is not the the probable cause of the issue otherwise I will see connection problems even if the device doesn't go in deep sleep. Reading some Cypress application notes (AN92584 and AN95089 in particular) seems that all the clues lead to a WCO inaccuracy that may cause an improper connection timing between the devices. In fact even if the WCO crystal capacitors have the same values between the two board versions, these capacitors have different aspect ratio (they're smaller on the production board and the crystal is smaller also) and the layout of the connection between the crystal and the microcontroller is significantly different for the two boards. In production board the microcontroller and the crystal are put in different layers (top and bottom) of a 4 layers PCB and connected through VIAs. The inner layers are for VDD and GND. Could this be the problem? Should I have to "tune" the WCO crystal capacitors because the layout adds too much parasitic capacitance and this drifts significantly the WCO from the nominal value? Since the capacitor tuning operation is quite difficult for us to accomplish I would like to be pretty sure for this to be the possible issue cause before trying to operate in that way. In fact, if possible, a firmware workaround is preferable. By the way, is there a possibility to track this eventual issue somehow on the firmware by some BLE stack calling or system calling? CyBle_Start() returns "CYBLE_ERROR_OK".
Thank you,
Simone
Show LessIn order to examine sleep-mode of the Anaren A20737 I have the timer interrupt running at 1 sec, disabled scan & adv, and putting it into sleep.
One module sends a trace msg every second as expected.
I then programmed the same hex file into modules form a different batch.
These also go to sleep and but no more 1-second messages are sent. Seems the timer went also to sleep.
How can this happen?
Aren't all modules identical?
Show LessI use the 20737 in central mode and see during the scan period that it draws a hefty 30mA, way too high for battery operation. Oddly during a connection with data exchange the current is much lower. Why?
The receiver should also be enabled during that period, and thus operates comparable to scanning.
Is there anything that I could do to reduce the current during the scanning period?
Currently I use 150ms window every 3 seconds. To be clear: 30mA flows during 150 ms.
I never expected that scanning would require more battery power than advertsing, so something must be very wrong. But what?
Show LessAn input port of a 20737 is defined as pull-up and interrupt (for a button).
Reading the input always returns the same value no matter whether the pin is connected to ground or not.
When not registering the interrupt the source, then the proper value is returned.
Any ideas how to solve this?
Hello All
I wanted to bring to your attention something I came across and was wondering if this indeed is an innate error and if not what sort of issues could I expect from this.
In the glucose meter profile there is a GPIO pin/flag array named “BLE_PROFILE_GPIO_CFG glucose_monitor_gpio_config”
I noticed that this array is dimensioned as GPIO_NUM_MAX, which is “16”. But in the initialization of the struct in the code
Depending on the pre-processor directive chosen it only initializes “15” out of the “16” pin/flag combination. This to me means that if one were to assign GPIO pin 0 with a flag that it might be overwritten by the un-initialized last member of the array to “0”. I don’t know what GPIO pin “0” is used for but it could be getting squashed somehow.
Shouldn’t there be “16” array elements initialized and not “15”? It seems to be an issue below for the #ifdef cases of BLE_P1 and BLE_P2 …
The default #ifdef case seems OK … please let me know
typedef PACKED struct
{
INT8 gpio_pin[GPIO_NUM_MAX]; //pin number of gpio
UINT16 gpio_flag[GPIO_NUM_MAX]; //flag of gpio
} BLE_PROFILE_GPIO_CFG;
#ifdef BLE_P1
BLE_PROFILE_GPIO_CFG glucose_monitor_gpio_config =
{
/*.gpio_pin =*/
{
1, 14, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
},
/*.gpio_flag =*/
{
GPIO_OUTPUT | GPIO_INIT_LOW | GPIO_WP,
GPIO_INPUT | GPIO_INIT_LOW | GPIO_BUTTON1 | GPIO_INT,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON2 | GPIO_INT,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON3 | GPIO_INT,
GPIO_OUTPUT | GPIO_INIT_LOW,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
},
};
#elif defined(BLE_P2)
BLE_PROFILE_GPIO_CFG glucose_monitor_gpio_config =
{
/*.gpio_pin =*/
{
1, 0, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
},
/*.gpio_flag =*/
{
GPIO_OUTPUT | GPIO_INIT_LOW | GPIO_WP,
GPIO_INPUT | GPIO_INIT_LOW | GPIO_BUTTON1 | GPIO_INT,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON2 | GPIO_INT,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON3 | GPIO_INT,
GPIO_OUTPUT | GPIO_INIT_LOW,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
},
};
#else
BLE_PROFILE_GPIO_CFG glucose_monitor_gpio_config =
{
/*.gpio_pin =*/
{
31, 1, 2, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
},
/*.gpio_flag =*/
{
GPIO_OUTPUT | GPIO_INIT_LOW | GPIO_WP,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON1 | GPIO_INT,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON2 | GPIO_INT,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON3 | GPIO_INT,
GPIO_OUTPUT | GPIO_INIT_LOW,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
},
};
#endif
Show LessHi,
I have download my software on a personnal BCM20736 board. And today I want to re-download a new vesion of this software but this message apper:
****Download failed - Press the reset button on the device and retry ****
With the VERSBOSE=1:
@
"Tools/common/Win32/echo.exe" Converting CGS to HEX...
Converting CGS to HEX...
Tools\CGS\Win32\cgs.exe -D Platforms/BCM920736TAG_Q32 -O DLConfigBD_ADDRBase:123456789018 -A 0xFF000000 -B Platforms/BCM920736TAG_Q32/20736_EEPROM.btp -I build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release.hex --cgs-files build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/A_20736A1-hello_sensor2-rom-ram-spar.cgs > build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/cgs2hex.log 2>&1 && "Tools/common/Win32/echo.exe" Conversion complete || "Tools/common/Win32/echo.exe" "**** Conversion failed ****"
Conversion complete
"Tools/common/Win32/echo.exe"
"Tools/common/Win32/echo.exe" Creating OTA images...
Creating OTA images...
Tools\CGS\Win32\cgs.exe -D Platforms/BCM920736TAG_Q32 -O DLConfigFixedHeader:0 -B Platforms/BCM920736TAG_Q32/20736_EEPROM.btp -I build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release.ota.hex --cgs-files build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/A_20736A1-hello_sensor2-rom-ram-spar.cgs > build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/cgs2hex.log 2>&1 && "Tools/common/Win32/echo.exe" Conversion complete || "Tools/common/Win32/echo.exe" "**** Conversion failed ****"
Conversion complete
Tools\IntelHexToBin\Win32\ihex2bin.exe build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release.ota.hex build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release.ota.bin
"Tools\common\Win32\perl.exe" -e '$s=-s "build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release.ota.bin";printf "OTA image footprint in NV is %d bytes",$s;'
OTA image footprint in NV is 7264 bytes"Tools/common/Win32/echo.exe"
"Tools/common/Win32/echo.exe"
"Tools/common/Win32/echo.exe" Downloading application... && Tools\ChipLoad\Win32\ChipLoad.exe -BLUETOOLMODE -PORT COM16 -BAUDRATE 115200 -MINIDRIVER Platforms/BCM920736TAG_Q32/uart_DISABLE_EEPROM_WP_PIN1.hex -BTP Platforms/BCM920736TAG_Q32/20736_EEPROM.btp -CONFIG build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release.hex -CHECKCRC -NOVERIFY -DLMINIDRIVERCHUNKSIZE 251 > build/hello_sensor2-BCM920736TAG_Q32-rom-ram-Wiced-release/download.log 2>&1 && "Tools/common/Win32/echo.exe" Download complete && "Tools/common/Win32/echo.exe" && "Tools/common/Win32/echo.exe" "Application running" || "Tools/common/Win32/echo.exe" "****Download failed - Press the reset button on the device and retry ****"
Downloading application...
I have try with the SDA to gnd, without. Or with the HCI UART Rx to gnd at the power up or after...
Always the same error...
The recover command failed and I have the same problem with other custom board
Do you have an idea to solve my problem?
Thanks
Show LessI want to read GPIO status through HCI commands. Firstly, I tried to use BlueTool(v1.9.6.2) to do this on BCM920737TAG-03. But I found two issues.
1. GPIO pin number's range of "GPIO_Read" command is 0~31, but "GPIO_Config_and_Write" pin number range is 0~7.
2. GPIO_Read(pin_number = 1) always return "Low" even I connected J7[1](p1) to J10[1](VDDIO 1.8v).
How can I read GPIO status through HCI UART?
Show Less