Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I have a simple project were i count the number of PWM pulses with a Counter, when the period counter counts down to 0 it trigger an interrupt where i turn off the PWM and the Counter instances, here i start a Timer, after 'x' time the Timer interrupt is triggered, here i stop the timer and start both PWM and Counter instances again, and the process is repeated.
So i would like to know if i can make this project the 'PSoC way', i mean using just hardware connections, i haven't try nothing yet, nothing comes to my mind when i think how to solve it 😕 , so i come here asking for suggestions, for both Software (maybe my aproach can get better) and Hardware (if there is one), i'm not looking for you solve my problem, just a storm of ideas 😄
Without looking at the code: this looks like statemachine. For that, use a lookup-table. PWM, counter and timer have start/stop signals that can react to signal flanks (and if not, you can create a pulse from a signal easily).