Not applicable
Aug 01, 2017
04:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 01, 2017
04:23 AM
Hi all,
I am currently configuring Slice 0 and Slice 1 of CCU4 unit for capturing in timer concatenation mode.
As far as I understand, the process is the following:
-Configure Slice 0 as capture, trigger the events for capturing the signals. Timer concatenation bit 0.
-Configure Slice 1 as capture, Timer concatenation bit 1.
However, I am not able to increase Slice 1 timer counter.
According to the RM, once you set the timer concatenation bit to 1 in Slice 1 it should be configured as Slice 0.
Have I misses any step?
In XMCLib this is the process:
/*
* CCU40 - Slice 0 configuration - Capture Conf
*/
/* Initialize the Slice */
XMC_CCU4_SLICE_CaptureInit(SLICE0_PTR, &capture_config);
XMC_CCU4_EnableShadowTransfer(MODULE_PTR, \
(uint32_t)(XMC_CCU4_SHADOW_TRANSFER_SLICE_0| \
XMC_CCU4_SHADOW_TRANSFER_PRESCALER_SLICE_0));
XMC_CCU4_SLICE_Capture0Config(SLICE0_PTR, XMC_CCU4_SLICE_EVENT_0);
XMC_CCU4_SLICE_ConfigureEvent(SLICE0_PTR, XMC_CCU4_SLICE_EVENT_0, &capture_event0_config);
XMC_CCU4_SLICE_Capture1Config(SLICE0_PTR, XMC_CCU4_SLICE_EVENT_1);
XMC_CCU4_SLICE_ConfigureEvent(SLICE0_PTR, XMC_CCU4_SLICE_EVENT_1, &capture_event1_config);
/* Get the CCU4 slice out of idle mode */
XMC_CCU4_EnableClock(MODULE_PTR, SLICE0_NUMBER);
/* Start the CCU4 Timer */
XMC_CCU4_SLICE_StartTimer(SLICE0_PTR);
/*
* CCU40 - Slice 1 configuration - Timer concatenation
*/
XMC_CCU4_SLICE_CaptureInit(SLICE1_PTR, &capture_timer_concatenation_config);
XMC_CCU4_EnableShadowTransfer(MODULE_PTR, \
(uint32_t)(XMC_CCU4_SHADOW_TRANSFER_SLICE_1| \
XMC_CCU4_SHADOW_TRANSFER_PRESCALER_SLICE_1));
/* Get the CCU4 slice out of idle mode */
XMC_CCU4_EnableClock(MODULE_PTR, SLICE1_NUMBER);
/* Start the CCU4 Timer */
XMC_CCU4_SLICE_StartTimer(SLICE1_PTR)
Also, is there any XMCLib example on this?
Thx
I am currently configuring Slice 0 and Slice 1 of CCU4 unit for capturing in timer concatenation mode.
As far as I understand, the process is the following:
-Configure Slice 0 as capture, trigger the events for capturing the signals. Timer concatenation bit 0.
-Configure Slice 1 as capture, Timer concatenation bit 1.
However, I am not able to increase Slice 1 timer counter.
According to the RM, once you set the timer concatenation bit to 1 in Slice 1 it should be configured as Slice 0.
Have I misses any step?
In XMCLib this is the process:
/*
* CCU40 - Slice 0 configuration - Capture Conf
*/
/* Initialize the Slice */
XMC_CCU4_SLICE_CaptureInit(SLICE0_PTR, &capture_config);
XMC_CCU4_EnableShadowTransfer(MODULE_PTR, \
(uint32_t)(XMC_CCU4_SHADOW_TRANSFER_SLICE_0| \
XMC_CCU4_SHADOW_TRANSFER_PRESCALER_SLICE_0));
XMC_CCU4_SLICE_Capture0Config(SLICE0_PTR, XMC_CCU4_SLICE_EVENT_0);
XMC_CCU4_SLICE_ConfigureEvent(SLICE0_PTR, XMC_CCU4_SLICE_EVENT_0, &capture_event0_config);
XMC_CCU4_SLICE_Capture1Config(SLICE0_PTR, XMC_CCU4_SLICE_EVENT_1);
XMC_CCU4_SLICE_ConfigureEvent(SLICE0_PTR, XMC_CCU4_SLICE_EVENT_1, &capture_event1_config);
/* Get the CCU4 slice out of idle mode */
XMC_CCU4_EnableClock(MODULE_PTR, SLICE0_NUMBER);
/* Start the CCU4 Timer */
XMC_CCU4_SLICE_StartTimer(SLICE0_PTR);
/*
* CCU40 - Slice 1 configuration - Timer concatenation
*/
XMC_CCU4_SLICE_CaptureInit(SLICE1_PTR, &capture_timer_concatenation_config);
XMC_CCU4_EnableShadowTransfer(MODULE_PTR, \
(uint32_t)(XMC_CCU4_SHADOW_TRANSFER_SLICE_1| \
XMC_CCU4_SHADOW_TRANSFER_PRESCALER_SLICE_1));
/* Get the CCU4 slice out of idle mode */
XMC_CCU4_EnableClock(MODULE_PTR, SLICE1_NUMBER);
/* Start the CCU4 Timer */
XMC_CCU4_SLICE_StartTimer(SLICE1_PTR)
Also, is there any XMCLib example on this?
Thx
- Tags:
- IFX
1 Reply
Not applicable
Aug 01, 2017
04:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 01, 2017
04:33 AM
Besides I am using Slice 3 for counting configuration on POSIFx.OUT2.
According to the Errata Sheet, the timer concatenation in CCU8 does not work when specifying an external count resource. But I am using CCU4,
is this the reason it does not work for me?
According to the Errata Sheet, the timer concatenation in CCU8 does not work when specifying an external count resource. But I am using CCU4,
is this the reason it does not work for me?