Forum Discussion
Hi
Sorry that i did not attached to the link.
Please find it below:
Regards
Jingyang, Teh
- Vincent_F1 year ago
New Contributor
Hi Jingyang, Teh,
Thank you for trying to help. Yet, the above example is based on the nios-dedicated macros for sending/reading data from a UART, which obviously work, and I also successfully used them as previously mentioned. But it still does not answer my original question/issue: why is the use of the fprintf instruction incompatible with the interrupts on the UART, even when the interrupt is disabled prior to using fprintf?
To summarize the context and symptoms:
Context: System that features a UART
Symptoms:
1. Program that manages to send/receive data from that UART without IRQ using fprintf (via a FILE)
2. Program that gets stuck whenever the IRQ of the UART is registered, even when no data is sent or received
3. Program that gets stuck even when no data is sent or received AND trying to unregister or disable the IRQ of the UARTI know the solution and workaround exist, but I still would like to understand the cause of this issue. We tried an equivalent code on other microcontrollers and no issues were detected. I hope my request is clearer.
Best regards
Vincent