Tool/software: Code Composer Studio
Hello Sir:
I have met a question related to TBPRD setting;
Refer to manual :
frequence = 1/ ( (TBPRD + 1) x TBCLK))
frequence means the frequence that I want to set (150KHz) ; and TBCLK fixed to 100MHz
so :
TBPRD = TBCLK/frequence - 1;
TBPRD = 100000000/150000 - 1;
TBPRD = 666.6666;(Can't be divided exactly byTBCLK )
because TBPRD is integer,so TBPRD set to 666;
The question is : if I set TBPRD to 666; and run 1second , it will send 150150 pluses , but in theroy , I want to send 150000 pluses ;
So is there any method to slove this problem?
Thanks!