Hello, I am having trouble with PWM @ AW16 CPU. Device is selfcloked, 20MHz BUS. I am having following code:
TPM2SC =0b00001000;
TPM2MOD=256;
TPM2C0SC=0b00010100;
TPM2C0VL=10;
So, edge aligned high pulse PWM.
This doens't produce and output at TPM2CH0 pin. Pin is log0 for all the time. TPM2 is running properly (TPM2CNT cycles 0-255).
If I change channel mode to TPM2C0SC=0b00010110; which is low pulses, pin is logic zero and after first cycles goes to high and keeps high.
When I change mode to TPM2C0SC=0b00010100; which is toggle output on compare, pin in CPU starts doing PWM as expected.
What I am doing wrong ? Why PWN doesn't work and toggle on compare works ?
Thank you
P.