I use K40 with processor expert, PWM_LDD bean. it seems no place to set it as center aligned. how to do this ?
Hello, I have got info from developers that this component does not provide such feature and in case you need this feature please use corresponding initialization component + PDD macros.
Anyway, it would very helpful for us if you could provide more details about your project.
Processor Expert Support Team
i never used PDD before. is there any sample on how to use PDD macro?
I would recommend to download CW V10.4 and follow the steps within this thread: How to use PDD macros in CW V10.4 step by step
You can program the registers directly.
1st. Configure the Processor Expert PWM.
2on. After Processor Expert Initialitzation "PE_low_level_init();", set this code:
FTM0_MODE |= 1<<2; // Write Protection Disable (1)
FTM0_SC |= 1<<5; // Center Aligned PWM CPWMS=1
FTM0_MODE &= 1<<2; // Write Protection Enable (0)
This code works for me on K22.
Change FTMx to used Timer.
Retrieving data ...