Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
757 Views

Again: MicroC/OS-II with the external VIC

Hi guys,  

I am still fighting with some issues that happen when using the external VIC.  

Here is what I have done: Nios II/f CPU with exceptions enabled, running at 125 MHz from external SSRAM.  

System uses TSE, a dedicated component which generates interrupts at an interval rate of approx 520 us.  

Furthermore it has the required timers, JTAG Uart etc. The system is running MicroC/OS-II, and I have a total of 9 interrupt sources in my system of which 3 of them are disabled. 

I have set the following options in the BSP for the VIC driver :  

1. enable_preemption  

2. enable_preemption _rs_1, _rs_6, _rs_7, _rs_8, _rs_9.  

3. irq1_rnmi and therefore the IRQ for my component that generates interrupts at the 520us is set to Non Maskable. This one also has the highest priority.  

The JTAG Uart has the second highest priority.  

For testing purposes I am posting messages to another task which pends the messageQueue and then prints some debug info to the Nios terminal.  

I have set a breakpoint in my exception handler in order to track any exceptions which might occur on my system during the debugging phase.  

When I start my system then I can see for a while that all the debugging messages appear in the Nios II terminal window. Because they originate from the Non Maskable IRQ which runs at 520 us rate these are quite some messages that will appear on the terminal window.  

I also implemented the statistics task for the OS in order to track the CPU load. According to this task CPU load does not get above 6-7%.  

The strange thing is that after some while I do not get any debug messages anymore.  

Also a heartbeat LED which is flashing normally (and controlled by another task) does not blink anymore.  

However, the interrupt of the custom component is still working. I can still set a breakpoint in my handler and break in my interrupt routine.  

When pressing the pause button on the debug session I land in the Idle Task of the OS.  

It seems that for some reason all my tasks seem to have died and the only running task is the Idle Task. 

I am currently looking for any advice to tackle this problem.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
49 Views

i am also using VIC for my application and stuck in similar kind of problem ....only difference is that i have single external interrupt which come at 125us. could u provide u r sopc file for my Reference. 

 

My application receive interrupt form external PIO and miss lot's of interrupt. if i increase the VIC clock frequency from ddr2_bot_auxhalf to ddr2_bot_auxfull my VIC work fine but System stop responding to PING request , as VIC suppose to receive some fix amount of interrupt (640X460) in a loop and it miss some of interrupt so loop could not complete for fix amount of interrupt , so it won't come out from loop and resultant it won't respond to PING request. 

 

so if you have any comment/suggestion on this issue please provide.
Reply