Hello there
I am generating 3-phase PWM outputs using the PWM peripherals. A timeout event from the PWM timer generates an interrupt and in the corresponding ISR the duty cycle is varied.
Now I want to send and receive information to and from the microcontroller using the stdio.h library functions. So after all relevant initialisation, I have a printf statement in an empty while(1) loop that the program is confined to while waiting for the next timer interrupt. This is the only printf statement I have put in. So, according to my understanding this shouldn't have any effect on the PWM outputs as it should be interrupted and temporarily suspended while the ISR runs, then allowed to resume once the ISR has finished.
However, when i view them on my oscilloscope, the PWM outputs are disrupted and when I close the debug session in CCS, thereby removing the connection between the microcontroller and the CCS console which it prints (successfully) to, the PWM outputs go back to behaving as expected.
So why is this happening? Are there higher priority interrupt routines at work within the printf function that cannot be interrupted by my PWM timers? How can I fix this so that it will print strings to the console without disrupting the PWM?
Thanks for taking the time to read.
Regards
Josh