![]() |
Robot Controller reset issue when pwm value changes
I am having a troublesome issue. Whenever I have something in my code change the value of the pwm the controller seems to keep resetting non-stop. When it is in regular user mode it resets every couple of seconds. There is nothing touching the three prog/reset pins. It only does this when I change the value of the pwm or am in regular user mode. This does happen in auton as well when I change the pwm.
I have been trying to get interrupts to work with my gear tooth sensor and my friend has been working with the camera. I don't know exactly how long this has been doing this for. I have tried loading the default code to the bot again with no luck as well. Any help would be greatly appreciated, thank you. |
Re: Robot Controller reset issue when pwm value changes
have you tried a master reset with the master code from ifi? this is different from the default code.
|
Re: Robot Controller reset issue when pwm value changes
You say it is resetting every couple of seconds; if this is the case, are your attempts to reprogram it successful? It makes it through the entire download without resetting? What do the LEDs look like on the RC? Are they all blinking green when connected to an OI and enabled?
It sounds like you have a really dead battery. If you haven't checked it already, replace it with a fresh one. Changing PWM values means changing motor speeds, which often causes a hefty draw on the battery. If you have no backup battery and a really low main battery, this will reset the controller. If you already tried that, disconnect *everything* except the two power wires. See if that fixes it. Then start plugging items in, one by one, until you find the culprit. If, with everything unplugged except power, it is still resetting, contact IFI and see if they can give you any hints. JBot |
Re: Robot Controller reset issue when pwm value changes
In your interrupt handler, are you clearing the interrupt flag? Are you clearing it in all cases (i.e. for every interrupt type)? Resetting seems a little odd to me, but I've seen cases where forgetting to clear the interrupt flag will cause it to run for a few seconds, and then freeze/crash/red-light-of-death. You said this correlates to changing a PWM value; you also said you have a gear-tooth sensor installed. If the motor is not running, you would be getting no interrupts. As soon as you change the PWM value, the motor starts running. This causes the gear-tooth sensor to start triggering interrupts. If you don't clear the interrupt flag in your interrupt handler, this will basically cause the system to overload, trying to repeatedly process the interrupt. In my experience, this resulted in a crash; in your case, maybe it's resulting in a reset.
Or maybe you have some other problem. |
Re: Robot Controller reset issue when pwm value changes
I am clearing the flag, regularly it has all happy green lights. I took out the part in my auton what changed the pwm's and kept the geartooth in, and I manually moved the wheel to see if I was getting anything. I still wasnt getting anything on the geartooth but it was not resetting.
The program gets on the thing fine, maybe I have to put the master code on it again, I shall try that Monday when I get back to school as well as the new battery, although I tested that and it said I had 12v coming out of it. The reason I say it is resetting is when I do change the pwm the lights just flash a lot, and my terminal has that standard startup message <IFI Initialized...>. The flashes on the controller go between what it looks like when you press reset and when they are all green. I do get a couple of printf's before it resets, but only sometimes and only a couple. I will give these suggestions a try on Monday when I get back to school. Thank you |
| All times are GMT -5. The time now is 10:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi