Part Number: MSP430FR5739
Other Parts Discussed in Thread: MSP430FR4133
I need to create pulses of varying width from a GPIO. The pulses are not frequencies per se, but rather arbitrary timings of repeated high-low conditions, which then cycle back on themselves to form a period structure. For example, I am attempting to use Timer A to form the following 2 pulse trains ( not concurrently )
The problem is, I cannot figure out exactly what to do and in what order to make all this work. I **think** I have to run Timer A in Continuous mode, and update TACCR0 in the ISR. The example that comes with this MSP430 Launchpad is woefully inadequate as it only shows a single frequency at 50% duty cycle. This I can do easily. I have not been able to tie in all the information about "Timer_A" and "Timer0_A3" along with interrupt vector information for various CCRx registers, it is too complicated to unravel without some kind of code example.
(1) As an expert in MSP430 timer modules, how would you approach this problem? How would the code be structured?
(2) I am worried about ISR latency. These pulses must always occur at the same exact time, every repeating cycle. There cannot be an extra clock cycle or two added to the strict timing due to CCR0 updating within the ISR. Perhaps I am mistaken on how this is supposed to be done. In "Use of Continuous Mode" of the Timer_A datasheet section it is stated " IN this usage, the time interval is controlled by hardware, not software, without impact from interrupt latency." I do not understand this at all, because modifying/adding to TACCR0 in the ISR is indeed "control by software" What is the explanation behind this? Are the other modes, Up, Continuous, etc. different and suffer from software controlled latency? If so how and why are they different?


