Forum Discussion
Altera_Forum
Honored Contributor
20 years agoError -In dma data transfer
hello i am newbie ,please help me. i have following error. i am using four task for displaying leds and i am using button as an interrupt,so when i press any switch button it will go to i...
Altera_Forum
Honored Contributor
20 years agoHi, Nirav.
In my opinion your problem comes from using the DMA API calls from inside an ISR. The following excerpt from the Nios II SW programmer manual, chapter 6 should help you in understanding: Restricted Environment ISRs run in a restricted environment. A large number of the HAL API calls are not available from ISRs. For example, accesses to the HAL file system are not permitted. As a general rule, when writing your own ISR, never include function calls that can block waiting for an interrupt. In addition, you should be careful when calling ANSI C standard library functions inside of an ISR. No calls should be made using the C standard library I/O API, because calling these functions can result in deadlock within the system, i.e., the system can become permanently blocked within the ISR. In particular, you should not call printf() from within an ISR without careful consideration. If stdout is mapped to a device driver that uses interrupts for proper operation, the printf() call can deadlock the system waiting for an interrupt that never occurs because interrupts are disabled. You can use printf() from within ISRs safely, but only if the device driver does not use interrupts. Hope this helps. Maurizio