- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All
I have a big project with time critical devices - VGA and Sound playing VGA Refresh use separate video banks in separate SDRAMs I use DMA for VGA refresh - irq 9 most important And Sound player (fifo - almost_empty sygnal generate IRQ ) - irq 8 I set IRQ handler to Sound Player and all work ( Video & sound correct) BUT SOME TIMES NIOS2 RESTART PROGRAMM in a random way!!! What reason will restart program ?Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is IRQ handler
And i find what string is influent to unplaned RESTART I mark in comments my try's and effects wich i get (1) - I try set IRQ wich can interrupt sound IRQ Result - NO EFFECT (SOUND WORK but VIDEO crash refresh) (2) - I try set manual enable VGA_IRQ Result - NO EFFECT (SOUND WORK but VIDEO crash refresh) (3) - I try to enable ALL Interupts inside Sound_irq Result - I get workable Sound and Video - ALL work's fine but sometimes nios restart programm by random way. void __irq_sound_handler(void* context,alt_u32 id) { if((dsp_buff[0] & FIFO_A_EMPTY) && playing) { // alt_u32 old_priority=alt_irq_interruptible(VGA_DMA_IRQ); // (1). // alt_irq_enable_all(NIOS2_STATUS_PIE_MSK); //(3) // alt_irq_enable(VGA_DMA_IRQ); (2) FillSndBuff(); // fill sound fifo counter++; // counter of irq calls dsp_buff[1]=1; // IRQ ENABLE FLAG // Enable sound IRQ for next call (by default it IRQ ENABLE cleared when i sound fifo get chipselect) // IRQ is asserted when FIFO buffer signal almost_empty get rising edge // alt_irq_non_interruptible(old_priority); //(1). } } So I want create interuptable IRQ handler What I do wrong ? Any Ideas ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I find that most processor resets (on NIOS or other) are due to buffer overflows. I mostly happens when you overflow a buffer (i.e. go beyond the buffer space and into some other space ... either code or data) and then do something else. It is when doing something else that you usually see the problem, however the error actually occured when the buffer was overflown.
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