2024-06-28 04:31 AM - edited 2024-07-03 05:54 AM
APPLICATION OBJECTIVE:
Platform:
APPROACH:
The current approach is to configure the MCU HW peripherals as follows:
EXPECTED RESULTS:
When using a signal generator with a stable and known frequency signal as TIMER1 ETR input, the expected pulse counts over the measurement window should look stable and repeatable.
For example, with a input signal of 4MHz connected on TIMER1 ETR being measured every 10 microseconds window, each measurement should result in 40 pulses counted per window.
CURRENT RESULTS / PROBLEM:
Overall the approach seems to work.
I.e., considering the above example "signal of 4MHz and being measured every 10 microseconds window" the 40 pulse counts are observed most of the time
However, sporadically, we observe a stream of 10 microseconds window measurement readings set to 0 or 1 followed by results stabilization and resuming the expected 40 pulses counted.
(See attached RealTerm_Ccapture.txt file... expected results stabilize at line 254)
PROBLEM OCCURENCE FREQUENCY:
Issue is observed randomly but typically always on the initial windows. So far no issues have been observed in the "middle" of a measurement stream after correct results are observed.
INVESTIGATION OBJECTIVE:
Considering the issue occurs sporadically, fiddling with register settings in a trial and error debug approach is not really suitable since we never know if the issue might still occur.
The objective of this ticket is to:
Any suggestion or input would be extremely welcome?
Kind regards.
2024-06-28 04:36 AM - edited 2024-07-03 05:52 AM
SOME RANDOM THOUGHTS (even if true not sure how to debug them):
SMCR :: Bit 7 MSM: Master/slave mode
0: No action
1: The effect of an event on the trigger input (TRGI) is delayed to allow a perfect
synchronization between the current timer and its slaves (through
SMCR::MSM is Currently set to 1.