Part Number: LAUNCHXL-CC26X2R1
Hi all,
I am creating a timer which toggles a GPIO output every 11 ms. In fact, it toggles 2 GPIO, which are always opposite (when one is 1, the other is 0, and the other way around).
To do this, I used the Util_constructClock functions from SimpleBLEPeripheral. It sort of works, but I can often find pulses which are, for example 11.4 ms. The timer callback function only contains the two GPIO toggle instructions.
Thus, my question is twofold:
Question 1
Why Is this function failing to provide such timing? A 22 milliseconds period is NOT demanding at all, so I am surprised it performs that poorly. Maybe I should try to do it with low-level clockP calls like in this link (task 3) ? Is it gonna be more precise?
Question 2
How do I toggle 2 GPIO at the same time and not need 2 sequential calls one after the other? In MSP430, we used to be able to toggle with masks, so all pins switched together (p.e. P1OUT != 0x88). How can I do this in CC26X2R?
These are my software versions.
SDK v8.x
CCS v20
Launchpad CC26X2R1
Hope you had a nice holiday, have a nice day.
Will try to add a screenshot soon, although it won't add much.