SDAA111 October 2025 CC2340R5
Figure 2-1 is a simple code block diagram of the processes used inside the CC2340R5 code. The functionality is realized in the stepper_motor.c file.
Figure 4-1 Stepper Motor Code DiagramThe main function initializes all TI drivers and timers necessary for the stepper motor example to operate. Once entering the main while loop, this can pend further action on an event being set by hardware callbacks. After servicing the corresponding action through a subroutine, the events are reset and the process repeats itself.
All hardware callbacks, with a few exceptions, simply post an event for the main application to process. An exception is the ADCBuf callback which processes the status immediately and does not call for any further action from the main application loop unless a window comparator threshold has been exceeded.