I configured my GPT timer with a custom waveform at the beginning like GTIOA initial output level HIGH and GTIOB initial output level LOW.
Since I am controlling start and stop base of my situation, so I would like to change this initial levels for different custom waveform.
Can you advise how can change this configuration through the code instead?
Such as how to set them both initial LOW, both initial HIGH, GTIOA as LOW and GTIOB as HIGH through the code during the runtime.
Thank you for reaching out to Renesas Engineering Community.
You can do this directly changing the GTIOR register (GTIOA and GTIOB bits):
Bit 4 of GTIOA and GTIOB (bit 4 and bit 20 of GTIOR…
Bit 4 of GTIOA and GTIOB (bit 4 and bit 20 of GTIOR) control the initial output level of those pins:
So for example:
R_GPT0->GTIOR_b.GTIOA = 0x00 ; //GTIOA initial low
R_GPT0->GTIOR_b.GTIOB = 0x10 ; //GTIOB initial high