Hi José Baretta,
The dutyCyclePercent in the API TPM_UpdatePwmDutycycle(TPM_Type *base, tpm_chnl_t chnlNumber, tpm_pwm_mode_t currentPwmMode, uint8_t dutyCyclePercent) just used to change the dutyCyclePercent.
The value is from 0-100. If you want the duty cycle is 1-2ms, then you can use 5% to 10%.
If you don't want to use the percent change, you also can calculate the according duty data, then input it in the TPM_CnV register.
More details, you can refer to the KL43 reference manual.
BTW, the KL43 is 3.3V chip, if you want to output 5V, you need external transform circuit.
Wish it helps you!
If you still have question about it, please kindly let me know.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------