Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Problem with printf

Hi,

I have a Cyclone development board and am useing the jtag interface for printf statements in my code. I also have a UART sending and receiving characters and use the uCosII operating system.

At some specific point in my code I have a printf statement that seems to mess up the system. Other printf statements are functioning fine.

The following happens:

I am sending and receiving messages on the UART and when I send a specific message (with the printf statement following) the interrupts are not handled anymore. I can step thorugh the alt_irq_handler and see the interrupt flags for the alt_avalon_timer_sc_irq and the altera uart. However the address of the interrupt routines are not the actual addresses so the interrupts are not handled anymore, freezing up the system.

When I remove the printf statement all functions well. When I change the printf statement the problem seems to change as well: interrupts are handled but the signal flag for receiving characters does not arrive in the place I am pending for it (receive blocking) so the buffer is filled with characters but te receive function is still pending.

I use the standard altera HAL receive routines, only have I extended the buffer size from 64 to 256.

I do not use printf in interrupt routines.

What might be the problem? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
No RepliesBe the first to reply