CCU4 on XMC1404 is not working

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User20918
Level 1
Level 1
First solution authored
Hi,

I'm developing an application using CCU4 on XMC1404 MCU ... I initialized the peripheral as following (as shown in the picture):
1) clear the gating of CCU40
2) remove CC40 from idle mode
3) set the run bit of the prescaler
4) configure the global CCU4 register GCTRL

5022.attach

but when I debug the program, all the CCU4 registers are zeros, and do not change by my code (for instance the period shadow register and the dead time register are all zeros).

5023.attach

Did I forget to enable a clock or something, because the CCU40 peripheral appears to be not active?
0 Likes
1 Solution
User20918
Level 1
Level 1
First solution authored
.

,The program worked fine after I disabled bit protection, as following:

SCU_GENERAL->PASSWD = 0x000000C0UL; //disable bit protection


As an advice to the XMC team @ Infineon, Please add examples with low level programming as the majority of professionals don't use the XMC libraries and prefer to meticulously optimize the device drivers based on their needs.

View solution in original post

0 Likes
3 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

Please refer our example project "CCU4_TIMER" available with XMC Lib package. It will help you to understand the usage of CCU4.
XMC Lib can be downloaded from following link: http://dave.infineon.com/Libraries/XMCLib/XMC_Peripheral_Library_v2.1.24.zip.
Example project is available in the folder "XMC_Peripheral_Library_v2.1.24\XMCLib\examples\XMC1400_series\CCU4".

Thanks and Regards,
Sudheesh
0 Likes
User20918
Level 1
Level 1
First solution authored
.

,The program worked fine after I disabled bit protection, as following:

SCU_GENERAL->PASSWD = 0x000000C0UL; //disable bit protection


As an advice to the XMC team @ Infineon, Please add examples with low level programming as the majority of professionals don't use the XMC libraries and prefer to meticulously optimize the device drivers based on their needs.
0 Likes
User11773
Level 4
Level 4
First like received First solution authored
Thank you for "circling back" with an answer.
0 Likes