Starting Point System : Forum

You are not logged in.

#1 2011-05-17 16:44:02

SPS Support Team
Moderator

timer capture pulse/ spi prescaler

Hi,

You are probably confusing the SPI prescaler with the PWM/Timer presecaler. These two are completely unrelated, so changing the SPI prescaler will not affect your timer/pwm measurements, and this is most certainly the reason you are getting erroneous interval measurements. Changing your "spi pre 32" with "pwm 9 pre 32" will do the job. Also please note the timer/pwm channels prescaler max ratio is 128.

Let's remind this precaler setting to maximum interval in timer capture function:

prescaler   resolution   wraparound    
   
1                  41,7 ns           2,73 ms
2                  83,3 ns           5,46 ms
4                 166,7 ns        10,92 ms
8                 333,3 ns        21,85 ms
16               666,7 ns        43,69 ms
32              1333,3 ns       87,38 ms
64              2666,7 ns      174,76 ms
128            5333,3 ns      349,53 ms

Best regards,

Offline

 

Board footer

Powered by FluxBB

Home