Hello,
The Enable/Disable methods of the PWM component cause enable/disable of the whole TPM device (timer). Therefore you cannot use these methods for shared timer of the TPM device. You must use methods that control the TPM channels (PWM channels) only. For example you can set duty to 0% or 100% to set the required level output level of the pin or you can disconnect the channel pin by clearing MSB, MSA, ELSB and ELSA bits of the TPMx_CnSC register. In this case you can use for example PDD macros:
TPM_PDD_SelectChannelMode(TPM0_BASE_PTR, 0, TPM_PDD_OUTPUT_NONE);
TPM_PDD_SelectChannelEdgeLevel(TPM0_BASE_PTR, 0, TPM_PDD_EDGE_NONE);
Best Regards,
Marek Neuzil