AnsweredAssumed Answered

"printf" stops working when GPIO is used in ADC application

Question asked by Michael Predko on Aug 13, 2010
Latest reply on Sep 1, 2010 by Michael Predko



This is a bit of a strange one, but it seems like "printf" statements stop working in an ADC application.  In the attached application, I have put in a cut down MQX "ADC" example which has optionally included GPIO statements. 


It seems that when the :


fopen("gpio:write", ...


executes, the "printf" statement no longer sends out data on UART0. 


To test it, define "mdebug" to show how the application works normally (with the Pot voltage value output on the console) and then change "mdebug" to something else and the GPIO statements will be inserted (along with the evb's four LEDs being turned on/off by the operation of the pot/adc) but printfs stop working.  You'll notice that I have repeated the first printf statement to show that printf stops working after the fopen APIs. 


I used an M52223EVB to test this out with CW10 and MQX 3.6 (rebuilt to include ADC and GPIO active). 


Any ideas?  Can anybody see what I'm doing wrong?