PWM / Low Time Measurement Problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
KaAs_973901
Level 2
Level 2

Hello, I have attached a project where I am interfacing with an SI 7023 https://www.silabs.com/documents/public/data-sheets/Si7023-A20.pdf humidity/temperature sensor and capturing the PWM signal.

The output is for debugging purposes only.

The issue I am facing is that although I am able to accurately capture the pulse width, I am not able to capture the low time properly with my project. Instead, it seems that the low time is coming back as the period.

I have attached a PWM to the timer in order to simulate the problem. Normally, there is an external device connected to a pin.

I reset the timer after each capture, but am uncertain why I see the period rather than the low time captured.

Thank you in advance for any assistance.

Karl

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hi Karl,

     As said in the earlier post there is an issue with the reset. I have attached the modified project file wherein I have manually reset the timer in software (or loaded the timer's period into timer's counter register) using Timer_WriteCounter(65535) API and the low time is detected correctly.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
6 Replies