I use K40 with processor expert, PWM_LDD bean. it seems no place to set it as center aligned. how to do this ?
hotas
Hello.
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.
Regards.
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.
best regards
Vojtech Filip
Processor Expert Support Team
Hi Filip,
i never used PDD before. is there any sample on how to use PDD macro?
Hello,
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
Best Regard
Vojtech Filip
Processor Expert Support Team