Problem Delay CYBT-343026

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JeRi_3276026
Level 1
Level 1
First like given

Please need information with delay or wait process time in module cybt-343026

In another module cy20719 sleep run in delay in  1000ms.

My module cybt-343026 not sleep mode.

Please help me.

Thanks

0 Likes
1 Solution

Hi JeRi_3276026​,

Not sure if your query is already resolved. Below are my comments for your query.

Q1) I need help to implementation delay or sleep in cybt-343026.

A) To implement delay, there is no direct API. You have to make use of timers . Please refer to wiced_timer.h file in WICED SDK ( /20706-A2_Bluetooth/include/wiced_timer.h )

For enabling sleep , you may refer to the following blog : CYW20706 – BLE Low Power Beacon

Q2) I have a problem with incompatible types assigning to type "double" our "float" from type "uint8_t". In short, I want to use  variable with decimals.

A) Floating point is not supported in our SDK for CYW20706 . You may have to use a custom function to evaluate the floating values by dividing/multiplying with 10's power.

Regards,

Anjana

View solution in original post

0 Likes
4 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi,

I couldn't able to understand your query properly. Can you please clarify?

Do you mean your CYBT-343026 module is not going to sleep mode? or you want help to implement delay ?

Regards,
Anjana

0 Likes

I need help to implementate delay or sleep in cybt-343026.

0 Likes

Question 1º:

I need help to implementation delay or sleep in cybt-343026.

Question 2º:

Another question,

I have a problem with incompatible types assigning to type "double" our "float" from type "uint8_t". In short, I want to use  variable with decimals.

I send the code I2c:

#include "sparcommon.h"

#include "wiced_bt_trace.h"

#include "wiced_hal_platform.h"

#include "wiced_hal_puart.h"

#include "wiced_hal_i2c.h"

#include "wiced_timer.h"

#include "stdio.h"

#include "stdlib.h"

//Definimos los registros I2C de los elementos Esclavos

#define SI7021_SLAVE 0x40

static void iniciar_lectura( void );

void iniciar_lectura( void ){

wiced_hal_i2c_init(WICED_I2C_SDA_I2S_DOUT_PCM_OUT_SCL_I2S_DIN_PCM_IN);

//Generamos los datos para los registros que se quieren leer

uint8_t Tx_Si7021_data[1]= {0xF3};

uint8_t Rx_Si7021_data[16];

wiced_hal_i2c_set_speed(I2CM_SPEED_400KHZ);

wiced_hal_i2c_get_speed ();

WICED_BT_TRACE  ( "****************LECTURA SIMPLIFICADA COMBOREAD********************\n\r");

wiced_hal_i2c_combo_read(Rx_Si7021_data,sizeof(Rx_Si7021_data),Tx_Si7021_data,sizeof(Tx_Si7021_data),SI7021_SLAVE);

     ERROR  ** double tempCode = (Rx_Si7021_data[0] << 😎 + Rx_Si7021_data[1];

     ERROR  **  float cTemp1 = ((tempCode * 175.72)/65536.0) - 46.85;

WICED_BT_TRACE  ( "Temperatura calculada: %d\n\r", cTemp1 );

APPLICATION_START( )

{

wiced_set_debug_uart( WICED_ROUTE_DEBUG_TO_PUART );

WICED_BT_TRACE

    (

            "\n\r--------------------------------------------------------------- \r\n\n"

                         "                 I2C Master Lecturas I2C \n\r\n\r"

                         "---------------------------------------------------------------\n\r"

                         "      Esta Aplicacion lee y registro 2 componentes I2C slave \r\n"

                         "      La lectura es continua y no se repite hasta el reset. Button\r\n"

                         "      La velocidad I2C esta establecida en 400 KHZ\n\r"

                         "---------------------------------------------------------------\n\n\r"

     );

    iniciar_lectura();

}

ERROR TERMINAL CODE

Multiple markers at this line

- undefined reference to

`__aeabi_ui2d'

- undefined reference to

`__aeabi_dmul'

- undefined reference to

`__aeabi_dsub'

- undefined reference to

`__aeabi_d2uiz'

0 Likes

Hi JeRi_3276026​,

Not sure if your query is already resolved. Below are my comments for your query.

Q1) I need help to implementation delay or sleep in cybt-343026.

A) To implement delay, there is no direct API. You have to make use of timers . Please refer to wiced_timer.h file in WICED SDK ( /20706-A2_Bluetooth/include/wiced_timer.h )

For enabling sleep , you may refer to the following blog : CYW20706 – BLE Low Power Beacon

Q2) I have a problem with incompatible types assigning to type "double" our "float" from type "uint8_t". In short, I want to use  variable with decimals.

A) Floating point is not supported in our SDK for CYW20706 . You may have to use a custom function to evaluate the floating values by dividing/multiplying with 10's power.

Regards,

Anjana

0 Likes