Skip to main content
Associate
September 2, 2024
Solved

implement pedometer on ISM330IS

  • September 2, 2024
  • 2 replies
  • 1222 views

Hi all,

we have a customer hardware with ISM330IS sensor on .

We want to implement a pedometer on it like in the ISM330DHCX. Is it possible ?

I followed the repo ism330is-pid/ism330is_reg.c at 413acfb51fd6f81a7449980a1caf286e37c909fe · STMicroelectronics/ism330is-pid (github.com) but it seems to not include it !

Instead I see it for ISM330DHCX (STMicroelectronics/ism330dhcx-pid: ism303dhcx platform independent driver based on Standard C language and compliant with MISRA standard (github.com)

 

Can I use that code too ?

 

Best answer by Federica Bossi

Hi @apache ,

 

Yes, you are on the right direction.

You can follow the official driver example here where the loading of the configuration is also done:

 /* Load ISPU configuration */
 for ( i = 0; i < (sizeof(ispu_conf) / sizeof(ucf_line_ext_t) ); i++ ) {
 switch(ispu_conf[i].op) {
 case MEMS_UCF_OP_DELAY:
 platform_delay(ispu_conf[i].data);
 break;
 case MEMS_UCF_OP_WRITE:
 lsm6dso16is_write_reg(&dev_ctx, ispu_conf[i].address, (uint8_t *)&ispu_conf[i].data, 1);
 break;
 }
 }

No problem using MCUs not from ST.

2 replies

Federica Bossi
Technical Moderator
September 3, 2024

Hi @apache ,

Unlike ISM330DHCX, the ISM330IS doesn't implement in the hardware the embedded function of  pedometer (step detector and step counter).

If you want to implement a pedometer you need to do it in the core.

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
apacheAuthor
Associate
September 3, 2024

Hi,

thanks a lot.

What you mean in the core ? I think the HW is more or less like ISM330DHCX and even more powerful.

How to implemement in the core ? have you same example ?

Thks

 

apacheAuthor
Associate
September 3, 2024

Hi ,

I saw this link here which seems to implement ISM330IS pedometer in the core (ispu-examples/ism330is_lsm6dso16is at master · STMicroelectronics/ispu-examples (github.com)) .

I have a custom MCU in my board, so do I have to downlad the pedometer.h file on the chip via I2C ?

I see the static const ucf_line_ext_t ispu_conf[] structure containg all the operation to do, Do I have to do so ? 

Of course Im going to  buy the dev kit but  I dont use ST MCU to drive the MEMS. 4

Anyway I need to validate the "production process" before I can go for production.

Can you help?

Thanks.

 

 

Federica Bossi
Federica BossiBest answer
Technical Moderator
September 4, 2024

Hi @apache ,

 

Yes, you are on the right direction.

You can follow the official driver example here where the loading of the configuration is also done:

 /* Load ISPU configuration */
 for ( i = 0; i < (sizeof(ispu_conf) / sizeof(ucf_line_ext_t) ); i++ ) {
 switch(ispu_conf[i].op) {
 case MEMS_UCF_OP_DELAY:
 platform_delay(ispu_conf[i].data);
 break;
 case MEMS_UCF_OP_WRITE:
 lsm6dso16is_write_reg(&dev_ctx, ispu_conf[i].address, (uint8_t *)&ispu_conf[i].data, 1);
 break;
 }
 }

No problem using MCUs not from ST.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.