MSP430FR5969: Print Speed Calculation

Part Number: MSP430FR5969

Hi Experts, 

Wanted some quick clarification on how the print speed based on 'counter' incrementation is calculated using the MSP430 Timer in the following code snippets: 

In the main.c file:

image.png

In the sys_init.c file:

image.png

Please let me know if you would like the full project folder as well. 

Thanks,

Anagha

  • Hi Anagha,
    I'm not sure I follow what is being asked. Are you asking the time it could take to print characters in a computer from the MSPM0 to a console? 

    Best Regards,

    Diego Abad

  • Hi Diego, 

    Looks like the timer being used in this file is the MSPM0's TIMER0_A1. I have noticed that if I reduce the value of TA0CCR0, the log being printed using the main.c file prints at a faster speed. I want to understand how to calculate the exact speed of the printed log based on the value of TA0CCR0 and how often the counter increments and resets back to 0 (the if (++counter == __) statement). 

    Hope this provides a little more clarity on my question. This project file can be downloaded here: SLVC771 Code example or demo | TI.com

    Thanks,

    Anagha

  • Hi Anagha,
    You can use the formula to calculate the time for everytime the ISR triggers. In this case:

    Timer Period = (TA0CCR0 + 1) / Clock_Hz

    Assuming Clock_Hz = 1MHz, and TA0CCR0 is set to 50000, the result for the timer period will be around 50ms (not sure why the comment there says 10ms, the original example code is 50ms).

    Best Regards,

    Diego Abad