Real clock and ble problem

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

cross mob
ArTc_3305816
Level 2
Level 2
5 likes given First like given

Hi

I have a problem with my code where it gives me this event BTM_BLE_CONNECTION_PARAM_UPDATE and this is when I use the rtcClock1.reg32map.rtc32[2];

can anyone give me a hint as to why and what should I do?

this is part of my code:

    int i          = 4000;

    int f          = 1;

    int dt         = 500;

    volatile uint16_t voltage_val_adc_in_mv[2*(i+1)];

    volatile uint16_t Time[2*(i+1)];                                                  //initializing the time here

    volatile uint16_t vddio_mv = 0;

    volatile uint16_t temperature;

    vddio_mv = wiced_hal_adc_read_voltage(ADC_INPUT_VDDIO); /* Input channel to measure Reference voltage for Voltage divider calculation for Thermistor */

    WICED_BT_TRACE("\r\nVDDIO_mV\t%d \r\n", vddio_mv);

    // Initialize Time

    tRTC_REAL_TIME_CLOCK rtcClock1;

    rtcConfig.oscillatorFrequencykHz = 32;

    rtc_init();

    void wiced_hal_gpio_disable_all_inputs();

    wiced_hal_adc_set_input_range(ADC_RANGE_0_3P6V);

       for (int j=0 ; j <= i ; j++)

       {

           voltage_val_adc_in_mv = wiced_hal_adc_read_voltage(CHANNEL_TO_MEASURE_DC_VOLT);

         rtc_getRTCRawClock(&rtcClock1);

         Time        = rtcClock1.reg32map.rtc32[2];

       }

0 Likes
1 Solution

Hello,

Please note  RTC of our chip doesn't have microseconds accuracy. Also please use the current time function , not rtcClock1.reg32map.rtc32[2] .

We are not sure how you are implementing the application .

1. Which chip are you using?

2. Could you please share the project and steps to reproduce the issue? So that we can suggest accordingly.

3. Without RTC BLE is working properly?

Thanks,

Anjana

View solution in original post

6 Replies