Why is ClrValue() not working?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why is ClrValue() not working?

475 Views
cmcc
Contributor I

I am having trouble with the PPG1_ClrValue().  First I use PPG1_Disable().  That works fine.  However, when I use PPG1_ClrValue(), nothings happens.  It is the same with PPG1_SetValue().  Why are these not working?

Labels (1)
0 Kudos
2 Replies

421 Views
adriancano
NXP Employee
NXP Employee

Hi,

This PPG component works with the FTM module as the counter module or another timer and the methods SetValue and ClearValue are only valid when the module is disabled, the necessary sequence to use them is:

Disable();

ClearValue();
Enable();

Or

Disable();

SetValue();
Enable();

These methods do not write to the duty register, this means that the value of the counter for each channel remains the same after calling these methods. The methods only write to the register that changes the initial value of the channel.

I hope this information can help you.

Regards,

Adrian

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. It would be nice!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

421 Views
cmcc
Contributor I

Adrian,

I am aware of this.  However, my PPG signal is high even when I try to clear it.  I cannot make it low.

Sincerely,

Chris

0 Kudos