Jump to content

Leaderboard


Popular Content

Showing most liked content on 08/11/2017 in all areas

  1. 1 point
    agaelema

    Timeout Library for MSP43x

    I am developing a timeout / soft timer library for the MSP43x and would like to share it with you. It's still in the initial version, but all the functions are working. I'm developing and testing on MSP430F6736, but it worked fine on launchpad EXP430F5529LP. The library uses a timer to periodically generate ticks. In the base version developed by Felipe Lavratti, the timer-tick occur every 1us through a 32-bit timer (ARM Cotex). To avoid overloading the CPU I modified the code to accept longer time intervals and also functions to automatically calculate the Capture / Compare value of the timer. I also tried to isolate the timer configuration in a separate file, so in the future it would allow to select from more than one timer source or different devices, perhaps with compatibility with the old Value Line uCs. How the objective is not to give a perfect time base in us, I'm using ticks of 100us (10kHz) and works very well. The library has delay, getTime, and Timeout functions, the latter two of which are interesting for managing tasks without holding down processing like a normal delay. The example using the EXP430F5529LP use delay_Ms function to toggle 4 times both leds, geTime_ms() to toggle LED1 every 234ms and timeoutCheck_ms() to toggle LED2 every 1s. Feel free to leave your opinions and contribute to the project - Github of project Thank you.
×