View Single Post
Old 07-04-2012, 02:33 PM   #44 (permalink)
esoneson
EcoModder Student
 
esoneson's Avatar
 
Join Date: Nov 2008
Location: Youngsville, NC
Posts: 117
Thanks: 11
Thanked 14 Times in 13 Posts
A little update on the Uprising Controller software.

I solved the interrupt problem. Turns out that the atmega1284p has a different interrupt vector than the previous cpu. It may be pin compatible, but not interrupt compatible. I changed the pointers to the interrupt vector and voila....all is well for the timers. Also changed the serial interface interrupts and we now have serial port working.

So, I pressed my luck a little bit more and integrated the ethernet software modules. And we just now achieved our first packet exhange from a browser.

Still more work to be done, but it's nice to see blinking lights again instead of a dead board.

I only had one tool to use to find the initial problem.....I was able to turn the led on and off. I used this boolean tool to narrow down the search to the line that was stuck in an infinite while-loop. This loop depended on a global variable being changed on every capture interrupt from timer 1. Well, that variable was never being updated because the interrupt routine was connected to a non-existing interrupt vector location.

Now we have a much better debugging tool and are making progress hand over fist.

Thanks all for your patience.

Eric
__________________
1995 BMW 318i EV in the making
  Reply With Quote
The Following User Says Thank You to esoneson For This Useful Post:
adamj12b (07-04-2012)