Go Down

Topic: Leonardo and critical timing (Read 314 times) previous topic - next topic

tim7

Dear Group,
I'm designing a device which will use a USB port to upload firmware updates (the port won't be used for anything else).  To save space I'm planning on using a Sparkfun ProMicro, which is an ATmega32U4 board similar to an Arduino Leonardo.

As far as I can see I have two choices for firmware upload:
- An AVR109 bootloader, which requires hardware signals to enter programming mode
- The Leonardo environment, which includes USB code in the application to trigger the bootloader

The second option is simpler and more elegant, but may interfere with the application code.  The application contains certain routines which run with critical timing, which might be disturbed if interrupted by USB service routines.

Does anybody have any advice or pointers regarding the Leonardo application-space USB code?  Can it be disabled and re-enabled in software?  Thanks,

Erdin

If you don't use the Mouse.begin() or the Keyboard.begin(), they are not enabled.
http://arduino.cc/en/Reference/MouseKeyboard

However, the Leonarde detects a low baudrate of 1200, it is used to upload a new sketch.
http://arduino.cc/en/Guide/ArduinoLeonardo

Go Up