Another thought - is it really necessary to control the current at 16kHz? Could you back it off to 8kHz or 4kHz? Your current and throttle values are being fed through rolling average filters, so it isn't like you're actually responding to "this cycle's" current reading.
A question about AtMegas in general - can you easily erase and rewrite flash sectors on the fly? On the Coldfire, if I wanted to store some user settings, i could just drop them into the program flash - just need tomake sure that the compiler is avoiding that section of flash.
|