What is the problem with the following code. __interrupt double compute_area(double radius) { { double area = PI * radius * radius; printf(“\nArea = %f”, area); return area; }
Sigiloso
printf is a blocking routine. It **must** not be used in an ISR. Consider the case then an interrupt arrived and this ISR is invoked and stdout is blocked by some other task. This code will give you nightmare bugs which are almost impossible to debug