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

uP_table does not know mcuid 1753 #280

Open
miclol opened this issue Dec 10, 2023 · 6 comments
Open

uP_table does not know mcuid 1753 #280

miclol opened this issue Dec 10, 2023 · 6 comments

Comments

@miclol
Copy link

miclol commented Dec 10, 2023

I'm trying to upload a sketch to an ATMega328P via an Arduino UNO, but it throws an error. I am using V3.0.0 of Minicore. Changed Settings: Clock: "Internal 8 MHz", Arduino IDE Version: 1.8.19
Traceback:

Sketch uses 3976 bytes (12%) of program storage space. Maximum is 32384 bytes.
Global variables use 195 bytes (9%) of dynamic memory, leaving 1853 bytes for local variables. Maximum is 2048 bytes.
avrdude warning: uP_table does not know mcuid 1753
avrdude warning: programmer is not responding
avrdude error: initialization failed, rc=-1
        - double check the connections and try again
        - use -B to set lower the bit clock frequency, e.g. -B 125kHz
        - use -F to override this check
the selected serial port         - use -F to override this check
 does not exist or your board is not connected
@miclol
Copy link
Author

miclol commented Dec 10, 2023

After some testing, this seems to be caused by the bootloader, as disabling it fixes the issue.

@MCUdude
Copy link
Owner

MCUdude commented Dec 10, 2023

It may be because the internal oscillator isn't all that accurate, and there is a slight baud rate error that causes Avrdude to read an incorrect mcuid. Did you just select the ATmega328P, internal 8 MHz clock, and then hit "Burn bootloader"?

@miclol
Copy link
Author

miclol commented Dec 10, 2023

Yes, burning the bootloader causes no problems. Only when uploading sketches does the error occur.

@MCUdude
Copy link
Owner

MCUdude commented Dec 10, 2023

I'll have to ask @stefanrueger who wrote the bootloader + the Avrdude implementation for help. It might be because of the serial connection, but let's hear what he has to say.

@stefanrueger
Copy link

If it is an autobaud bootloader using a different host baud rate might do the trick. In absence of more debugging info (avrdude version, command line, baud rate, which urboot bootloader configuration, the actual frequency of the internal oscillator, ...), @MCUdude's conjecture is the best I can come up with as well.

upload a sketch to an ATMega328P via an Arduino UNO

I don't understand the "via an Arduino UNO" bit. If the target ATmega328P wants to use its urboot bootloader then the target's serial lines (D0/D1) are supposed to be connected directly to the host PC, possibly via a USB to serial connector cable. How is the connection rigged up?

@MCUdude
Copy link
Owner

MCUdude commented Dec 10, 2023

The problem with Arduino IDE is that it's not all that easy to let the user specify the upload speed, as it would also have to match the main clock to be withing the acceptable ±2.5% error margin.

What I could do was to create a new menu option, "Upload speed", where I provide a set of common baud rates, but also a "default" one that sits on the very top of the list. Then the user could use the default one in most cases, but at the same time have the freedom to either increase or descrease the speed is needed. Sounds like a feature for the 3.0.1 release!

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