Ridgeglider wrote:There is no way the ISR can support a printf statement!! However, there are other ways you can make the ISR provide you with a signal. One way might be to toggle a pin, or even an LED although frequently blinking a single LED is too fast to see and so you're likely to need a scope on the pin. Another trick is to increment an 8 bit count and write it to
void putleds( unsigned char c );
That way you see all 8 LEDs flash a rolling over binary count as an indicator of activity.
If you want to provide a more substantive indicator, consider having the ISR post a semaphore to a task that pends on that same semaphore. The task can increment a count variable and then, at some appropriate period that's not too fast, say every 100th count, print the count value to the screen. That way if the DMA is happening at 10msec you'll print the count 1x per second. The same task could print out the variable whose bits correlate to the outputs that are active. Just be sure that you read that variable and don't try to write it in 2 different tasks. This should work as long as the variable is an int or other 32 bit (atomic) type that is read or written in one chunk.
I'm not entirely sure how you mean. I was under the impression that it was a simple time that would interrupt the current process to run a separate block of code. Everything I am doing with it now is the exact same stuff it was successfully doing in the example. In the example I had it running the same interval, it would print something to my MTTTY window (using a printf statement) at each tick, then it would run the code attached to the CheckTime(); function. The only difference being, instead of switching pins, it would print to the MTTTY window. It
was able to do all this in the example DMA program. The problem doesnt seem to be in the code itself, just the implementation of the DMA timer. I mean, I could be wrong but everything problem solving has taught me is that if code A works in program A, but the same code A doesnt work in program B then it would be an external problem, outside of code A, in program B.
But if this is the case, and I can't execute the code I want with a DMA timer then I'll need help on other suggestions as to how to do this.