OpenCores
no use no use 1/1 no use no use
Storm SoC - Tx Uart ISR/VIC Problems
by cstack89 on Jun 28, 2012
cstack89
Posts: 14
Joined: May 17, 2012
Last seen: Dec 5, 2012
I am working on implementing the Storm SoC on my DE0-Nano. Everything is going smoothly, but I am having trouble with the Uart TX Interrupts.

I know that this interrupt is called whenever the Uart is not transmitting, so I am trying to set it up to read from a buffer in software and turn itself off when the buffer is empty. I have tried to disable the interrupt within the ISR as well as set a flag which then turns off the interrupt when it reaches the if statement in the main loop.

The program seems to come to a halt either way when I try to disable the interrupt. To disable the interrupt I have tried the 3 following statements (and I think all possible combinations of the 3)

VICVectCntl2 = 0; // enable and channel select = 2
VICIntEnable ^= ( 1 "leftshift" 2 ); // enable channel 2
VICIntEnClear = 2;

Please ignore the leftshift part, it won't let me put the correct C syntax for left shift there without screwing everything up.


Please let me know what I am doing wrong. Thanks!

Chris
RE: Storm SoC - Tx Uart ISR/VIC Problems
by cstack89 on Jul 2, 2012
cstack89
Posts: 14
Joined: May 17, 2012
Last seen: Dec 5, 2012
Thanks to the help of Stephan I have solved the problem.

There are two possible solutions. To disable the TX interrupt you would have to do VICIntEnClear = (1 "shift left by" 2) not VICIntEnClear = 2 as I was mistakenly doing earlier.

The option I'm going with hover is to change the trigger mode from going off constantly if the interrupt is high (which is will almost always be if the UART isn't constantly being filled) to only changing on edges. To do this you just need to add in VICTrigMode |= (1 "shift left by" 2);
no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.