Hi Alex,
I thought the PTU and related glb_ldok signal you don't use causes the issue. But the PTU initiates and triggers PMF and ADC modules with that signal. See Figure 1-12. BDCM Control Loop Configuration in S12ZVM datasheet.
glb_ldok - device-internal PMF input signal is connected to the global load OK bit at integration level. For each of the three PWM generator time bases the use of the global load OK input can be enabled individually (GLDOKA,B,C).
I understand that global load OK (GLDOK) in PMF module can replace function of local LDOK, but not sure if that causes the problem.
if we suppose the PMF module is correctly configured as below, can you try with using the PTU module and global LDOK?
----------------------------------------------------------------------------------------------------------
PMFCFG2_REV0 = 1; // 01 PWM generator A generates reload event.
PMFCFG2_REV1 = 0;
PMFMODA = 2500; // 20 kHz
PMFDTMA = 25; // 0.25 us
PMFVAL0 = PMFMODA >> 1;
PMFVAL2 = PMFMODA >> 1;
PMFVAL4 = PMFMODA >> 1;
PMFENCA_LDOKA = 1; // apply PMF Modulo value
PMFENCA_PWMENA = 1;
PMFENCA_GLDOKA = 1; // 0 = Local LDOKA controls buffered registers / 1 = external Load OK controls buffered registers
PMFFQCA_HALFA = 1; // Half-cycle enabled
PMFFQCA_LDFQA = 3; // Reload every four PWM, fcore / 1
---------------------------------------------------------------------------------------------------
Regards,
iggi