Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Start Application' from Atmel DFU bootloader #647

Open
tmk opened this issue Apr 2, 2020 · 1 comment
Open

'Start Application' from Atmel DFU bootloader #647

tmk opened this issue Apr 2, 2020 · 1 comment
Labels

Comments

@tmk
Copy link
Owner

tmk commented Apr 2, 2020

Got an issue report from FC660C Alt controller user.

The instructions (/~https://github.com/tmk/tmk_keyboard/wiki#flash-firmware) say in step #5 to either re-plug the USB cord OR click Start Application in FLIP. I found whenever I pressed Start Application, they keyboard would become non-responsive and I'd have to power cycle it a few times. If I instead just re-plug the USB cord it works as expected.

This issue is related to 'watchdog timer' or USB startup code?

Atmel DFU bootloader document says like below.
http://ww1.microchip.com/downloads/en/devicedoc/doc7618.pdf

4.10 Starting the Application
The flow described below allows to start the application directly from the bootloader upon a specific command reception.
Two options are possible:

• Start the application with an internal hardware reset using watchdog. When the device receives this command the watchdog is enabled and the bootloader enters a waiting loop until the watchdog resets the device.

• Start the application without reset. A jump at the address 0000h is used to start the application without reset.

Important note:
The bootloader performs a watchdog reset to generate the “hardware reset” that allows to execute the application section. After a watchdog reset occurs, the AVR watchdog is still running,
thus the application should take care to disable watchdog at program start-up (otherwise the
application that does not manage the hardware watchdog will run in an infinite reset loop).

@tmk tmk added the TODO label Apr 2, 2020
@tmk
Copy link
Owner Author

tmk commented Nov 11, 2021

We have to put 'wdt_disable()' at beginning of application?
Section '.initX' can be used for this purpose, perhaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant