Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- I still face problems when using the code in uCOS/II environment building up on "simple socket server". It works, but after the first call of the ISR it doesn't return to idle mode and hangs at some place. --- Quote End --- Which API is used for uCOS/II environment? And what do you mean with "doesn't return to idle mode"? --- Quote Start --- I cannot use both the legacy and enhanced API, can I ? --- Quote End --- Don't think so. But one more question. Why do you wait for the DMA-Transfer to be completed inside the ISR? The advantage of the DMA is that the CPU is not occupied during DMA-Transfer (even if 4096*4Bytes is not that much, it's still not only a few bytes). Why don't you just start the DMA-Transfer inside the PIO-ISR? If the DMA is completed it will assert the IRQ and DMA-ISR is called. ADDITION: In the API Reference it is mentioned that alt_dma_txchan_open() should not be called from ISRs! Further I don't see any call to alt_dma_txchan_close(). Maybe this leads to problems if you want to initiate your second transfer. We don't use the HAL API for DMA-Transfers. I think it is better if you use directly the REG-File for setting up DMA-Transfers inside ISRs. (Faster and you got the control over DMA) There are some walls to take but afterwars it works fine.... Regards