Quantcast
Channel:
Viewing all articles
Browse latest Browse all 59170

Forum Post: RE: S7G2 GPT Hardware Count Start/Count Stop and Clear Operation

$
0
0
Karol, I now have start/stop operation of a GPT using GTETRGA working. The setting required are: Use Synergy Pin Configuration to set Peripheral GPT1: Set up a GPT timer. Use Synergy Pin Configuration to set Peripheral GPT0: GPT_Port_Output_Enable: Operation Mode: Enabled GTETRGA: P100 Add this code in or after hal_entry()    R_MSTP- MSTPCRD_b.MSTPD14   = 0;             /* disables module stop for Port Output Enable for GPT */    R_POEG- POEGGA_b.PIDE   = 1;                     /* Port Input Detection can now be enabled */    g_timer0.p_api- open(g_timer0.p_ctrl, g_timer0.p_cfg);          /* open the timer */    R_GPTA3- GTSSR_b.SSGTRGAR = 1;               /* enable timer start on  GTETRGA rising edge */    R_GPTA3- GTPSR_b.PSGTRGAF = 1;               /* enable timer stop on  GTETRGA falling edge */    note : R_GPTAn refers to GPT CH0-7: n=0-7, R_GPTBn refers to GPT CH8-13: n=0-5.    Naming convention rather error prone! With regards to the meaning of the asterisk in Synergy Pin Configuration: Ports, Mode: Peripheral Mode, Chip Input/output options I believe that in Ports it is only possible to configure a pin for GPIO input or output or change the pin characteristics relevant to it's peripheral mode. Any pin that requires a peripheral setting should be done in Synergy Pin Configuration. The Ports:pin peripheral mode is automatically applied by Synergy for all relevant pins.

Viewing all articles
Browse latest Browse all 59170

Trending Articles