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

USE_LED ... LED not lit when USE_ENTER_DELAY = no and USE_ENTER_PIN = yes #41

Open
sloped-soarer opened this issue Feb 6, 2020 · 0 comments

Comments

@sloped-soarer
Copy link

sloped-soarer commented Feb 6, 2020

Entry
USE_ENTER_DELAY = no
USE_ENTER_PIN = yes
USE_ENTER_UART = no
USE_ENTER_I2C = no
USE_ENTER_FIFO = no

Communication
USE_LED = yes
USE_UART = yes

What appears to be happening is that the LED is lit during initialisation and then turned off when the bootloader in entered by the toggle code.
The line val = get_char(); appears to be blocking and so the LED remains off until the bootloader processes some serial input.

Suggest moving the LED toggling code below val = get_char(); so that a positive visual indication is given that the bootloader has been entered.

e.g.

// Main bootloader
while (in_bootloader) {
val = get_char();

#ifdef USE_LED
#ifdef AVR_XMEGA
LED_PORT.OUTTGL = (1 << LED_PIN);
#else // AVR_XMEGA
LED_PORT ^= (1 << LED_PIN);
#endif // AVR_XMEGA
#endif // USE_LED

....

Thanks for the work so far on this project.

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

No branches or pull requests

1 participant