Hi Robin,
PE is not allowing me to change initially period timer TU1 while is linked with PWM six channels. It is even Counter restart is in "On-match" mode. Can I make own method to change period for all channels in timer TU1?
#include "TPM_PDD.h"
LDD_TError TU1_SetPeriodTicks(LDD_TDeviceData *DeviceDataPtr, uint16_t Ticks)
{
(void)DeviceDataPtr; /* Parameter is not used, suppress unused argument warning */
/* Parameter test - this test can be disabled by setting the "Ignore range checking"
property to the "yes" value in the "Configuration inspector" */
if ((Ticks > 65535U) || (Ticks == 1U)) { /* Is the given value out of range? */
return ERR_PARAM_TICKS; /* If yes then error */
}
TPM_PDD_WriteModuloReg(TPM0_BASE_PTR, (uint16_t)(--Ticks));
return ERR_OK; /* OK */
}
Regards,
Marceli