LP-MSPM0L2228: Question about combined timer capture: inverted input levels

Part Number: LP-MSPM0L2228
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello,

I'm trying to configure the Timer Capture feature for evaluation for un upcoming project.

The input signal is an external digital signal which stays High when idle, then can trigger commands sendings timed low levels, for example it can stay low for 5 ms, then high 5 ms, and repeat for 5 to 10 times before going back to idle state (high level).

I tried to use pulse-width capture, I can catch the the H->L transition, but I miss the following L->H transition.

I'm trying to configure combined capture, pulse width and period with inverted inputs, but the first low level pulse is not recognized.

Attached you can find syscfg file.

Regards,

Daniele

  • lpmspm0l2228.zip

    syscfg file wasn't attahced to my message

  • Hello Daniele,

    Our M0 timer capture function just can capture the high level pulse (the pulse with high level) and can't capture the low level pulse. But I think that if you capture the period and high pulse width, you can calculated the low pulse width. And in our SDK, you can find the example code of "timx_timer_mode_capture_duty_and_period" to use.

    Best Regards,

    Janz Bai 

  • The problem with this solution is that I lose the first transition H->L

  • Hello Daniele,

    I have understood what you mean and what's your issue. And my precious response has a little limitation.

    Since Sysconfig can't meet the peripheral configuration requirements for all application scenarios, you can choose to perform register level operations. The first transition H->L may can be captured by using the pulse-width capture mode when you set the timer be triggered to start to count at falling edge and set to capture events when rising edge occurs by operating CCOND, ZCOND, LCOND, CZC, CLC. The specific information of these register region can be found in the M0 L series user guide which can be downloaded from ti.com. And the specific operation method of timer capture mode can also be found in the M0 L series user guide too.

    Best Regards,

    Janz Bai