Studio Bluetooth Forum Discussions
Is BT 5.0 required for BT Sig Mesh or can a BT 4.2 device / module work?
Hi ,
My device has no need to open bluetooth at some time like from 00:00 - 8:00 everyday, but it should be awake for sensor to record the value. Can the bluetooth stack be closed alone to save the power? How to?
thanks.
Show LessAs a follow on to this thread: Programming SPI Flash in CB-343026-01 Module
I need to program the CYBT343026 flash via UART but I'm not sure I have understood right.
Reading WICED HCI UART Control Protocol I have understood that if there isn't the flash connected (it's not the case for CYBT 343026) or if the application inside flash is not valid, the module boot in Bluetooth HCI mode, otherwise execute the application.
In Bluetooth HCI mode or in Application mode (if this one implement the HCI coomands) it's possible to update firmware. If I hold RECOVERY button during the reset, the flash will erase and then the module enter in Bluetooth HCI mode.
That's all right?
1) If I want to update the firmware in Application mode (via UART) how can I perform this? It's not neccesary to create a Boot partition in the flash?
2) What are the HCI commands for update firmware? In WICED HCI UART Control Protocol is not clear what are and if are the same for Bluetooth HCI mode and for Application mode (if this one implement the HCI coomands).
3) what is it for minidriver?
Regards
Show LessHi,
The sample WICED-Studio-6.2-SDK\common\apps\demo\low_power_sensor, 10s timer will lead the board into SDS mode. I connect a Ammeter between PIN2 & PIN4 at jumper J8 and detect current = 0mA while SDS mode. When I press the button(SW3), or connect A5(WICED_P17) to 3.3V, the board will go a WARM BOOT.
Then, base on this sample, I modified the file low_power_mode.c (attachment file). The Ammeter display 0.04mA. and button or P17 will just output a string displaying the event happend, not a boot flow. It seems that the board did not go into SDS. What did I miss for the sleep configure or other things?
(What I modified are: delete all the codes about bluetooth, just left the 10S timer and sleep configuration.)
here are the output:
[2018-06-11_14:32:28]sleep_mode=0
[2018-06-11_14:32:28]Hello Sensor cold Start
[2018-06-11_14:32:28]hello_sensor_application_init
[2018-06-11_14:32:28]idle timer start successful
[2018-06-11_14:32:28]......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................hello sensor idle.
[2018-06-11_14:32:38].$.$.@.$.$.@.$.$.@
[2018-06-11_14:35:28].$.$.@hello_sensor_interrupt_handler
[2018-06-11_14:35:34].$.$.@
red line display a button press event.
Show LessHi,
I followed the example : 20719-B1_Bluetooth\apps\snip\hal\spi_master to create a SPI communication with a 3-axis g-sensor. But I found the SPI_CS will back to inactive too early that will cause an incorrect Writing operation. .
I also used PSOC6 to do the same thing, and PSOC6 did very well:
These r the codes:
void init_spi()
{
wiced_hal_pspi_init(SPI_MASTER, INPUT_PIN_PULL_DOWN, MASTER_P38_CLK_P28_MOSI_P01_MISO, DEFAULT_FREQUENCY, SPI_MSB_FIRST, SPI_SS_ACTIVE_LOW, SPI_MODE_3, SPI_CS);
}
void send_data(unsigned char register_address, unsigned char *value, unsigned char number_of_bytes)
{
unsigned char send_data[2];
unsigned char rec_data[8];
if( 1!= number_of_bytes )
{
WICED_BT_TRACE("mcube_read_regs bytes error =%d\r\n", number_of_bytes);
}
WICED_BT_TRACE("WR: reg = 0x%02x, value = 0x%02x\r\n", register_address, *value);
send_data[0] = register_address |0x40; // 1 bytes; write operation
send_data[1] = *value;
wiced_hal_pspi_exchange_data(sizeof(send_data), send_data, rec_data);
}
Another question is, Since the SPI_CS is controlled by SPI driver automatically, why the sample code write there red codes?
....
wiced_hal_gpio_configure_pin(CS, GPIO_OUTPUT_ENABLE, GPIO_PIN_OUTPUT_HIGH);
wiced_hal_pspi_init(SPI_MASTER, INPUT_PIN_PULL_UP, MASTER_P38_CLK_P28_MOSI_P01_MISO, DEFAULT_FREQUENCY, SPI_LSB_FIRST, SPI_SS_ACTIVE_LOW, SPI_MODE_0, CS);
....
wiced_hal_gpio_set_pin_output(CS, GPIO_PIN_OUTPUT_LOW);
wiced_hal_pspi_tx_data(sizeof(start_byte), &start_byte);
wiced_hal_gpio_set_pin_output(CS, GPIO_PIN_OUTPUT_HIGH);
.....
wiced_rtos_delay_milliseconds(20, 1);
wiced_hal_gpio_set_pin_output(CS, GPIO_PIN_OUTPUT_LOW);
wiced_hal_pspi_rx_data(sizeof(rec_byte), rec_byte);
wiced_hal_gpio_set_pin_output(CS, GPIO_PIN_OUTPUT_HIGH);
....
Show LessWe have the CYBT-343026-EVAL evaluation board and I am trying to program the SPI flash internal to the module using the UART interface from my custom software. The document "WICED-HCI-Control-Protocol.pdf" in section 2.5 has some information about how to download into the serial flash but does not have details about the minidriver. When I look at the download log generated by using the download feature of the Wiced Studio 6.0, ChipLoad first downloads a UART minidriver and then sends a WICED flash erase command before downloading the application *.HEX file.
Do I need to follow the method of ChipLoad to download the UART minidriver and erase the SPI flash before downloading a *.HEX file?
The source code for client_control is available but this example only downloads a direct *.HCD image. Is the source code available from ChipLoad showing how to load a *.HEX file to SPI flash?
Show LessTo avoid to influence other component while entering into reset state,
we need to know the initial state of every pin in reset state.
Where to find it?
Show LessHi Sir,
I have installed Winced studio 6.2 ,when I build hello_sensor, there are some errors ,eg.
Description | Resource | Path | Location | Type |
Symbol 'HANDLE_HSENS_BATTERY_SERVICE' could not be resolved | hello_sensor.c | /20706-A2_Bluetooth/apps/demo/hello_sensor | line 190 | Semantic Error |
How to correct it?
Thanks.
Show Less