Part Number: TMDS243GPEVM
Hello,
I have managed to sync start EPWMs 0 to 3 by clearing and setting bits in register CTRLMMR_EPWM_TB_CLKEN.
First I tried to use registers CTRLMMR_EPWM_TB_CLKEN_SET and CTRLMMR_EPWM_TB_CLKEN_CLR which, according to TRM sections 5.1.1.5.46 and .47, should set and clear bits in CTRLMMR_EPWM_TB_CLKEN but this did not work. I had to write 0x0 directly to CTRLMMR_EPWM_TB_CLKEN to stop EPWMs 0 to 3 and write 0xf to start EPWMs 0 to 3. (Before accessing those registers I disabled write protection using CTRLMMR_LOCK1_KICK0 and CTRLMMR_LOCK1_KICK1.)
Now my questions:
What is the purpose of registers CTRLMMR_EPWM_TB_CLKEN_SET and CTRLMMR_EPWM_TB_CLKEN_CLR? What is the correct way of using them?
What is the preferred way of accessing memory mapped registers like CTRLMMR_EPWM_TB_CLKEN? I did the following:
*CTRLMMR_EPWM_TB_CLKEN_CLR = 0xf; // disable clocks to EPWM0,...,EPWM3 ... doesn't work
*CTRLMMR_EPWM_TB_CLKEN = 0; // disable clocks to EPWM0,...,EPWM3
// init EPWMs ...
*CTRLMMR_EPWM_TB_CLKEN_SET = 0xf; // enable clocks to EPWM0,...,EPWM3 ... doesn't work
*CTRLMMR_EPWM_TB_CLKEN = 0xf; // enable clocks to EPWM0,...,EPWM3
with the following #defines
#define CTRLMMR_EPWM_TB_CLKEN ((volatile uint32_t *) 0x43004130)
#define CTRLMMR_EPWM_TB_CLKEN_SET ((volatile uint32_t *) 0x43004134)
#define CTRLMMR_EPWM_TB_CLKEN_CLR ((volatile uint32_t *) 0x43004138)
I would have expected at least such #defines (or something similar) to be provided by TI but I could not find a file containing such definitions. Where should I look?
Best regards,
Johannes