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

Instructions for flashing seem to be wrong? #247

Open
PerennialNovice opened this issue Nov 20, 2023 · 5 comments
Open

Instructions for flashing seem to be wrong? #247

PerennialNovice opened this issue Nov 20, 2023 · 5 comments

Comments

@PerennialNovice
Copy link

Having encountered the notorious "failed to autobaud" error in FlashMagic, I almost gave up until I by chance did the following:

Power off the oven
Ground n_ISP
Ground n_RESET
Power on the oven
Release n_RESET
Release n_ISP

It was only then, that I could get FlashMagic to communicate with the LPC2134

@borland1
Copy link

borland1 commented Nov 22, 2023

You didn't say what you did wrong. "seem to be wrong"; you must be referring to Wiki section "Flashing the LPC21xx Controller", heading "Enter boot mode sequence manually".

The instructions do work if followed, but could be improved.

To start the bootloader and enter ISP mode, it is unnecessary to power cycle the oven with the RESET pin already grounded.

You can alternatively, ground the ISP pin and start the bootloader with a power cycle and skip grounding the RESET pin, as turning off power essentially pulls the RESET pin low. And when power is restored, the MCU first looks for an ISP pin being pulled low to ground. Note that: the MCU's ISP pin is pulled high by a pullup resistor on the oven controller PCB in order to prohibit the MCU's ISP pin from floating low and causing it to accidently booting into ISP mode with any power up cycle.

It is also unnecessary to "Release ISP" to flash the program memory. You only need to release ISP pin from ground in order to boot the MCU normally, and test the flashed firmware.

So, these sequences will all work to start bootloader and enter ISP mode:

a. Power Up Oven
b. Ground ISP pin
c. Ground RESET pin momentarily, then
d. Release grounded RESET pin
a. Ground ISP pin
b. Power up oven

After either one of the above sequences, remove grounding of ISP pin to return to the normal boot mode.

Only after burning the firmware in this repository, you can start the bootloader and enter ISP mode by:

a. Press and hold the F1 button on the oven console
b. Power up oven
c. Release F1 button

@PerennialNovice
Copy link
Author

Yes, those are the instructions I am referring to

I followed the first sequence you describe, but FlashMagic could not connect.
The second sequence worked for me.

Since I always leave the possibility, that I did something wrong without knowing, I preferred to write that the instructions "seem" wrong...

@borland1
Copy link

borland1 commented Nov 24, 2023

The number 1 sequence above is essentially the same as what you say you had success with in your first post. Did you notice by the blank oven LCD display ( or lack of a blinking red LED on the control board ), if the MCU actually booted into ISP mode?

Besides booting to ISP mode, the serial port on the PC needs proper serial driver configuration settings before the FlashMagic utility can successfully Autobaud.

@PerennialNovice
Copy link
Author

the LED went blank after tying the ISP pin to ground in sequence 2, but I did not check the display, sorry...

serial driver must have been OK, since it worked without any further steps when using sequence 1

Maybe it would be a good idea to also describe sequence 1 as an alternative on the main article?

@intreatsys
Copy link

Doooood THANK YOU. I also had to use sequence #2 to make this work.

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

3 participants