cancel
Showing results for 
Search instead for 
Did you mean: 

Bug report :Max speed with Hall sensors

ANICO.1
Associate III

Dear MCSDK team,

We met a difficulty using Hall sensors as our primary speed and position sensor.

When setting a mechanical speed higher than UINT16_MAX / nb_pair_poles / 2 the value of

hMaxReliableElSpeedUnit is overflowing in the Hall_Init function. It is a u16 and its value is set to max mechanical speed * nb _pair_pole * 2. This was creating a tricky bug on our application : our speed value was "saturating" at a value around 1600RPM because the hall mininmal period (MinPeriod variable) is set according to hMaxReliableElSpeedUnit. We will fix this on our side but it would be nice if you could integrate a fix in future releases.

Best regards,

Antoine

2 REPLIES 2
cedric H
ST Employee

Hello @ANICO.1​ ,

Thanks for reporting your issue.

Could you tell us what is the SPEED_UNIT and the number of your motor pair poles in use in your application ?

Regards

Cedric

ANICO.1
Associate III

Hello @cedric H​ ,

SPEED_UNIT is RPM

We have multiple applications with pair pole numbers varying from 7 to 20.

Regards

Antoine