cancel
Showing results for 
Search instead for 
Did you mean: 

Rpm measurement

Chris J
Associate
Posted on February 05, 2018 at 15:31

Hi!

I'm looking for an example, or if anyone could guide me how to setup a SPC560P50 for rpm/pulse measurement.

We are talking about 4 shaft sensors which will pulse 36 pulses/rev. Shaft speed is 0 - 8000rpm.

I want to be able to measure the rpm of these shaft in the 'smartest' way (with other words using the mcu's built in capabilities).

I know I could go by just setting up regular ext. interrupts and calculate in software, but am I right to think that using the quadrature encoding Timers is the best way to do this?

Also if the solution would be applicable to a SPC560P40 it would be great!

Thanks!

/Chris

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
3 REPLIES 3
Erwan YVIN
ST Employee
Posted on February 06, 2018 at 14:15

Hello Chris ,

i recommend you to use eTimer (Cf Screenshot)

0690X00000609WcQAI.png0690X00000609d6QAA.png

There is some examples how to initialize this IP (eTimer)

SPC560Pxx_RLA PWM-ICU Test Application for Discovery

 Best regards

             Erwan

Posted on February 07, 2018 at 08:32

Thank you Erwan!

I have read about the eTimers in 'RM0022' and also tried to figure out and understand how the

SPC560Pxx_RLA PWM-ICU Test Application for Discovery 

example works.

But where can I access to set all the eTimerst parameters and registers described in 'RM0022'?

The only eTimer parameters I seem to find in SPCStudio is 'Capture mode, HI/LO', 'clock f' and 'call back function names'?

/ Chris

Erwan YVIN
ST Employee
Posted on February 09, 2018 at 10:06

Hello Chris ,

SPC560Pxx_RLA PWM-ICU Test Application for Discovery is just  an example.

For Quadrature-Count mode, you need to redevelop :

  • you need to set correctly the PIN

  • Enable the PCTL associated for eTime

  • set the registers to configure your Capture unit

You can access to the registers by this file cf RM022

0690X00000609esQAA.png

   Best Regards

                Erwan