Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThe open, close and write functions are not designed to be called from within the context of an ISR. This fact can be found in the hal api reference (http://www.altera.com/literature/hb/nios2/n2sw_nii52010.pdf). For example, the documentation for the open() function indicates, "Available from ISR: No."
If you really want to write to the UART from an ISR, you can write your own UART code instead of using the HAL driver. Alternatively, you can create a mechanism for your ISR to queue the data and have non ISR code actually perform the write. There are many ways the problem can be addressed.