CCU8 - Example code showing error in XMC1300 documentation

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

cross mob
lock attach
Attachments are accessible only for community members.
Not applicable
Hi All,

First off attached is code that works, there are two modes. Mode 0 shows how well the CCU8 works with the documentation. Mode 1 shows that there must be a mistake in the XMC1300 reference manual.

Setup : XMC1300 boot kit, DAVE 4

Within the code
#define TEST_SETUP 1 // 0 -WORKING , 1 -NON-WORKING

you can change the value to 0. This allows you to have the code work with SLICE 0 of the CCU8 and a value 1 with slice 2. The code is exactly the same, except that another SLICE is being used. Care has been taken to check that the ooutput and inputs correspond to the correct pins, from the datasheet.

To test - Attach scope to P0.0 and P0.8. Supply digital signal to P0.12. Run the code in mode 0 (TEST_SETUP=0) and mode 1 and see how the documentation must be wrong regarding the output and inputs for the CCU8 slices.

I would appreciate if a Infineon employee could comment on this mistake and just at least share the correct setting needed to correct this.

Regards
Enigma
0 Likes
2 Replies
User7282
Level 4
Level 4
I think that the error is yours, not in the documentation.

If you check the function definition, then
__STATIC_INLINE void XMC_CCU8_EnableClock(XMC_CCU8_MODULE_t *const module, const uint8_t slice_number)


The second argument of the function should be an uint8_t, not the pointer to the slice. This should also give you a warning in the compiler. So if you call
XMC_CCU8_EnableClock(CCU8_module, 2);


your code should work.
0 Likes
Not applicable
Hi Apereira,

You are right, the mistake was mine. thank you for pointing that out.

regards
Enigma
0 Likes