Tool/software:
I am migrating a product from MSP430 to MSPM0.
I failed even the initial step of setting the timers to start counting.
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.
Tool/software:
I am migrating a product from MSP430 to MSPM0.
I failed even the initial step of setting the timers to start counting.
Hi Ofek,
What do you mean without OS? We do have some examples of capture and compare, such as our SDK or Resource Explorer. Some projects are:
Best Regards,
Diego Abad
With the MSP430 I had the timer running continuously.
Using one C/C register at capture mode I got the timer's count at an edge event.
Using another C/C register at compare mode I could time an interrupt to a specific timer's count.
Is there an equivalent mechanism in the MSPM0?
I didn't find it in those examples.
timx_timer_mode_capture_edge_capture captures (only) the rising edge, but it only uses a single channel, so you can use the other channel for something else. This would be useful for e.g. a frequency meter.
timx_timer_mode_capture_duty_and_period implements (approximately) Use Case "Combined Pulse Width and Period Time" [Ref TRM (SLAU846A) Sec 25.2.3.1.2.4]. It uses two channels (one for rising edge and the other for falling). It looks like the G1507 has only one timer (TIMA0) which has >2 channels. This would be useful for measuring PWM duty cycle.
See also:
Use of DL_TimerA_setCaptureCompareValue() is illustrated in Example timx_timer_mode_pwm_edge_sleep_shadow:
https://dev.ti.com/tirex/explore/node?node=A__AI9ppSRP40NM-fN6fU0I4Q__MSPM0-SDK__a3PaaoK__LATEST
The "_shadow" refers to the shadow-update for the CCRs (similar to CLLD).
This is not what I am looking for.
I need the counter to count without stopping, and to set interrupt at a specific count, without stopping or reloading the counter.
In MSP430 this is how I worked with the timer, and this is what I need to do with the MSPM0 as well.
Hi Ofek,
You should be able to accomplish that by using the timer as PWM. An interrupt should be activated during a capture or compare event, AKA when the specific compare value is reached.
Best Regards,
Diego Abad
Hi Ofek,
There are no examples for that implementation.
Best Regards,
Diego Abad