RTC-Event (every second) Clears + Starts Timer from CCU4 Module

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

cross mob
Not applicable
hello,

i would do as follows:

An RTC-Event (every second) Clears + Starts a Timer from CCU4 Module. I have added follow Apps:

- RTC (--> + NVIC_SCU001)
- PWMSP001 (--> + CCU4GLOBAL + RESET)
- CLK001

My App + Signal Configuration in affix !!

My Example doesn't Work !!

Please help me!!

If i look in the generated Code (i would check all enabled Events, etc) i found this:

void NVIC_SCU001_Init()
{
DBG002_FUNCTION_ENTRY(APP_GID,NVIC_SCU001_FUNC_ENTRY);
NVIC_SetPriority((IRQn_Type)83, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),63,0));
/* Enable Interrupt */
NVIC_EnableIRQ((IRQn_Type)83);

DBG002_FUNCTION_EXIT(APP_GID,NVIC_SCU001_FUNC_EXIT);
}


IRQn_Type)83 ----> this ist "CAN0_7_IRQn"

Why CAN??
0 Likes
8 Replies
Not applicable
Hello,

one more Question:

Which PIN can/must i use for external Clock Source for a CCU4 Modul?

In Section 22.5.1 i find CCU4x.CLK[C...A] for external Clock. But which PINs are available?
0 Likes
Not applicable
Hi,

With reference to your previous post, a change request was submitted in the eTicketing tool (eTicket ID: 59579276). You will be notified once fixed. Thank you very much.

Best regards,
Sophia
0 Likes
pcosta
Employee
Employee
Hi Marco@fs,

regarding you post about controlling the CCU4 clock...

Let’s try to clarify one thing first:
A - Do you want really a clock that can “modulate” the timer clock of the complete CCU4 module?
B - Or do you want to count a specific signal

If B is the answer, then he just needs to enable a Counting signal on the specific timer slice (section X.2.7.4 – X is the CCU4 section inside the complete RM)

If the answer is A, then it is a little bit more complex.
We don’t have a direct connection to a device pin, therefore you need to do the following:

1 – Select a pin connected to the ERU1 Slice 0, like P2.1
2 – Configure ERU1 Slice 0 to generate a signal on a rising edge on the IOUT0.
3 – Configure the CCU40 Module to use the IOUT0 as the master clock:
CCU40->GCTRL != 0x010;
CCU40_CC40->PSC != 0x1;

BR,
Pedro
0 Likes
Not applicable
Hello,

thanks for the answers. I prefer A:

I don't have any ideas to solve my Problem. Every seconds "Event" starts a Timer from CCU4 Module.

I have connect as shown in the pictures:

SCU 0 Interupt Node --> PWMSP001 --> Input external Start !

But this ins't the solution !!!

In: void DAVE_MUX_Init(void)
WR_REG(CCU42_CC40->INS, CCU4_CC4_INS_EV0IS_Msk, CCU4_CC4_INS_EV0IS_Pos, CCU4xINyG);

Must i also use the ERU_Unit ? Because "CCU4xINyG"! Table 23-19 says it is connect to "ERU1.IOUT3".

How can i say, that Every-Second-Event from RTC is connect with CCU4xINy[P...A] ??

nice Greetings
0 Likes
Not applicable
Correction:

"CCU4xINyG"! Table 22-24 says it is connect to "CCU80.SR3".

What does it mean ??

I use:
.CC4yRegsPtr= (CCU4_CC4_TypeDef*)CCU42_CC40,
0 Likes
Not applicable
Hi Marco@fs,

I think you are unable to use available Apps to build the signal connections you required. Maybe you can try to code by yourself in main.c (just use one PWMSP001 app) as per the following example:
1) Select a pin (eg. P1.5) connected to ERU1 Slice 0:
ERU1_EXISEL.EXS0A = 00B /*Select ERU1_0A0 as event source input*/
2) Configure ERU1 Slice 0 to generate a edge trigger signal on the IOUT0:
ERU1_EXICON0.PE = 1; /*Enable output trigger pulse generation at TR00*/
3) Configure the CCU40 Module to use the IOUT0 as the master clock:
CCU40_GCTRL.PCIS = 01B; /*Select CCU40.ECLKA as prescaler input clock*/
CCU40PSC.PSIV = 0x2; /*Prescaler initial value*/

I have not try it. But i think it should work. Good luck...

Best regards,
Zain
0 Likes
Not applicable
hello,

ok. I think i have mixed 2 Proplems in this Post.

(A) to generate a external Clock for CCU4: This works fine, Thanks!

(B) to Clear + Start the CCU4-Timer every RTC-Event (every second):

This doesn't work.

See my Posts:

- (entry 1) May 24th, 2013 01:45 PM
- (entry 5) Jun 17th, 2013 02:25 PM
- (entry 6) Jun 17th, 2013 02:35 PM

I'm very thankful to help me one more time. thx
0 Likes
elegantk
Employee
Employee
For (B) to clear + Start the CCU4 timer.

It might be easier to use one CCU4 slice (as 1 second timer) to trigger the rest of the other CCU4-timer.
0 Likes