Due to the U.S. Thanksgiving holiday, please expect delayed responses during the week of 11/22.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR50431: Implementing millis() function

Part Number: MSP430FR50431

Hi guys,

I am trying to implement millis() function from Arduino. What it does, it counts number of milliseconds since the program started and returns it. 

What I have so far is a Timer A3, sourced from SMCLK in UP mode: Gist. (for some reason, I was unable to insert code directly here).

The problem is, that for some reason, after 5-6 uart messages, the program halts and no other millis() update is sent to the uart. 

I don't know, if that is UART problem, or it has something to do with the millis implementation. But I spent two last days looking into it, following tutorials online and nothing helped. Clearly, I need second pair of eyes.

Would you please be so kind to look at the code and point to some parts, which could be wrong? Thank you in advance.