Reply
Posts: 2
Registered: ‎10-28-2016

An error (-3) occurs in sihrm_Process()

I am working on EFM32WG with Si1144-AAGX-GMR
When I read heart rate, I got an error and ask for help


(1) Only HRM Sensor module is used as I2C device
     (I.e., no other I2C device is present)

    It works normally.
    The heart rate also fluctuates between 75 and 85 and converges to a constant value.

(2) As an I2C device, when using HRM Sensor module and 6 axis sensor module together,
     That is, when reading the acceleration sensor value while reading the heart rate value
     An error (-3) occurs in sihrm_Process () or the heart rate value continues to increase

 

    sihrmUser_ProcessIrq ()
    {
       sihrmUser_SampleQueue_Put (...)

       measure_gyro_accel();
       measure_humidity_temperature();
    }

   When an error occurs, the values of the state variables are as follows
   u32Rst = sihrm_Process();
       /* u32Rst = -3 */

        state = 1
        hrmStatus = 0
        skinDetect = 1
        idle_count = 0
        bufferOverrunError = 0;

 

 

thanks

 

sjkim

Posts: 9
Registered: ‎05-29-2014

Re: An error (-3) occurs in sihrm_Process()

@sjkim ~ This case has been transferred to our customer support portal and will be answered there.

 

Other readers ~ The details of the si1144 Heart Rate Monitor Algorithm (sihrm) including application notes, reference documentation and example source code are available only with special permission from Silicon Labs.  Therefore, this case has been moved to our customer support portal.  If you would like more information about this product, please contact your local sales representative or enter a customer support case through the technical support page at Silabs.com.  

Posts: 2
Registered: ‎10-28-2016

Re: An error (-3) occurs in sihrm_Process()

I briefly compared your STK3800_biometric sample source with the code I changed.
Can someone please tell me what is the problem here?

-----------------------------------------
#ifdef ORIGINAL_CODE
-----------------------------------------
int main()
{
   accelI2C.i2cAddress = 0x1D;
   accelI2C.i2cBusSelect = 1;
   accelI2C.irqPin = SI114X_INT_PIN; /* PD5 */
   accelI2C.irqPort = SI114X_INT_PORT;/* gpioPortD */

   --------------- detectHRMDevice() --------
   hrmI2C.i2cAddress = SI114X_NON_UV; /* 0x5A */
   hrmI2C.i2cBusSelect = 1;
   hrmI2C.irqPin = SI114X_INT_PIN; /* PD5 */
   hrmI2C.irqPort = SI114X_INT_PORT; /* gpioPortD */

   if (sihrmUser_Initialize(&hrmI2C,0,0) >= 0)
   {
      //Initialize Accelerometer for GGG and GRI
      Accelerometer_Init(&accelI2C);

      hrmConfig = FITNESS_EVB_GGG;
   }

   ------ main() after detectHRMDevice()--------
   sihrmUser_Initialize(&hrmI2C,0,0);

   while(1) {
      HeartRateMonitor_Loop();
      ..............
   }
 }

void GPIO_ODD_IRQHandler(void)
{
   if (flags & (1 << SI114X_INT_PIN))
   {
      /* Si114x IRQ line */
      HeartRateMonitor_Interrupt();
   }
   GPIO_IntClear(flags);
}

 

int32_t sihrmUser_ProcessIrq(...)
{
   sihrmUser_i2c_smbus_read_i2c_block_data(0x21, 13, data)
   sihrmUser_i2c_smbus_write_byte_data((0x21, data)

   Accel_ReadAccelDataFromDevice()

   sihrmUser_SampleQueue_Put()
}

-----------------------------------------
#else // The source I changed
-----------------------------------------

int main()
{
   accelI2C.i2cAddress = 0xD4;
   accelI2C.i2cBusSelect = 0;
   accelI2C.irqPin = ST_LSM6DSL_PIN1; /* PC13 */
   accelI2C.irqPort = ST_LSM6DSL_PORT; /* gpioPortC */
   accelI2C.irqPin2 = ST_LSM6DSL_PIN2; /* PC12 */
   accelI2C.irqPort2 = ST_LSM6DSL_PORT;/* gpioPortC */

   hrmConfig = BIOMETRIC_EXP;

   if (sihrmUser_Initialize(&hrmI2C,0,0) >=0)
   {
      InitBsp_GyroAccel(&accelI2C, &g_accelHandle);
   }

   while(1) {
      HeartRateMonitor_Loop();
      ..............
   }
}


void GPIO_ODD_IRQHandler(void)
{
   flags = GPIO_IntGet();

   if (flags & (1 << SI114X_INT_PIN)) { /* for PC15 */
      /* Si114x IRQ line */
      HeartRateMonitor_Interrupt();
   }

   if (flags & (1 << ST_LSM6DSL_PIN1)) { /* for PC13 */
      BSP_GYRO_Get_Axes(LSM6DSL_G_0_handle, &g_angular_velocity);s
   }

   GPIO_IntClear(flags);
}

 

void GPIO_EVEN_IRQHandler(void)
{
   flags = GPIO_IntGet();
   if (flags & (1 << ST_LSM6DSL_PIN2)) { /* for PC12 */
      /* Accelerometer */
      BSP_ACCELERO_Get_Axes(LSM6DSL_G_0_handle, &sensorAxex);
   }
   GPIO_IntClear(flags);
}

 

int32_t sihrmUser_ProcessIrq(...)
{
   sihrmUser_i2c_smbus_read_i2c_block_data(0x21, 13, data)
   sihrmUser_i2c_smbus_write_byte_data((0x21, data)

   sihrmUser_SampleQueue_Put() /* I don't use accel data of sample */

   measure_gyro_accel(); /* I2C 6-axis sensor (LSM6DSLTR)*/
}

#endif

 

Posts: 324
Registered: ‎09-22-2009

Re: An error (-3) occurs in sihrm_Process()

Make sure to follow up with Silabs through Salesforce instead of this forum. We don't publicly discuss the details of HRM due to the proprietary nature of it.

Posts: 3,021
Registered: ‎02-07-2002

Re: An error (-3) occurs in sihrm_Process()


Alan_S wrote:

We don't publicly discuss the details of HRM due to the proprietary nature of it.


Funny moment: I read HRM as Human Resource Management Man Embarassed instead of Heart Rate Monitor.