Writing custom Jaguar motor controller firmware

I was thinking about writing custom Jaguar motor controller firmware in order to use the limit switch inputs as encoder inputs. This would allow the Jaguar to handle more elements of control and also simplify wiring at least for me. But is there an SDK to do this?

The Jaguar source code is available from TI (at least for now): http://www.ti.com/tool/rdk-bdc24-cd. More details in this thread.

I have to ask, though - Why isn’t the built-in encoder input sufficient?
Also, be aware that last year it wasn’t legal to use custom Jaguar firmware, per [R61]. I would be surprised if that changes this year.

I suggest you study the RDK’s specs on the limit switch GPIOs to verify that they can actually handle the frequency resolution that effective encoder input demands.

Also, on top of Steven’s question, is there a reason you can’t handle encoder processing through another interface? I can’t see it would simplify your wiring either, or even why the Jaguar would need to juggle input from two encoders.

FWIW, from LM3S2616 datasheet p348:

Each GPIO port is a separate hardware instantiation of the same physical block. The LM3S2616 microcontroller contains five ports and thus five of these physical GPIO blocks.

The Jag encoder inputs are on port C, and the limit switches are on port B.

I don’t really want to write it because the functionality is not there mostly for the experience. Hopefully this year you will be allowed to customize your control system more this year.

What are your plans for handling the unpublished FIRST-specific CAN protocol extensions? In the past the encoders were not permitted without CAN.

If it is for fun and not FRC it is totally doable. Just watch the interrupt priorities to avoid starving the important stuff.