- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am moving from NIOSI to NIOSII. I have an interrupt where if we are still DMA'ing, I just want to return from the interrupt. Before, I just had the following if statement to check the status of the DMA operation:
if((na_USB_DMA->np_dmastatus & np_dmastatus_busy_mask) != 0) How do I do this using HAL? thanxLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.altera.com/literature/hb/nios2/...pu_nii51006.pdf (http://www.altera.com/literature/hb/nios2/n2cpu_nii51006.pdf)
On page 8 there is the description of the status register. I haven't checked but there should either be a function call to get the status or some value to read back to use. If not then you can just do the old school method and read it back and mask the other bits you don't care about. http://www.altera.com/literature/hb/nios2/...sw_nii52004.pdf (http://www.altera.com/literature/hb/nios2/n2sw_nii52004.pdf) Page 4-18 might be helpful as well. Happy reading (I know I'm lazy) Cheers- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First you should define a callback function such as dma_done. Assign a mark describing the end of dma transmission. Inputting dma_done as the forth parameter on invoking alt_dma_txchan_send/alt_dma_rxchan_prepare.
I think handbook should describe such usage more clearly.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page