Go Down

Topic: MiniCore - An Arduino core for the ATmega8/ 48/ 88/ 168/ 328 (Read 35297 times) previous topic - next topic

quangnguyenjvz

My 328p-AU running on 12MHz can upload sketch only one time after burn bootloader (I use CH340g as USB uart to upload scketch). I want to test my code with minicore without burning bootloader again! Any solution for me? Tks.

I try to change "328.menu.clock.12MHz_external.upload.speed=57600" with all availabe upload speed, reload IDE, burn bootloader again, but the problem's still the same:

"avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x8e
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: Access is denied.


avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x8e
avrdude: ser_drain(): read error: Access is denied."

hansibull

Quote
My 328p-AU running on 12MHz can upload sketch only one time after burn bootloader (I use CH340g as USB uart to upload scketch).
This means your auto-reset circuity isn't working properly. See the minimal setup diagram in the MiniCore readme to how it's done.
MightyCore -  ATmega1284, mega644, mega324, mega164, mega32, mega16, mega8535
Github.com/MCUdude/MightyCore

MiniCore - ATmega8, mega48, mega88, mega168, mega328
Github.com/MCUdude/MiniCore

quangnguyenjvz

#122
May 30, 2020, 04:56 pm Last Edit: May 30, 2020, 04:59 pm by quangnguyenjvz

Is the problem from C25? So why i can upload sketch on time after burn bootloader?
https://drive.google.com/open?id=1fgynjIhTtQeaZvd70T3uVwzXJXI3je48

quangnguyenjvz

Thank you, Hans! I really apreciate your minicore! After remove C25, issue is gone.

petehard

Quote
1. With the new bootloader I am not able to upload any code the the MCU via serial interface.
    The chosen baud rate is set to 57600, which seems to be the cause of the issue.
    Changing it to 115200 in your boards.txt solves this.
Quote
If you have to increase the baud rate with a factor of two in order to communicate with it, it's likely that the chip is running twice as fast as it should.
Yes you are right. I was able to measure the frequency and it is 16 MHz. It was not evident from the datasheet, which says 8/16 MHz
and the markings on the crystal are not really readable.


Quote
2. My program generates some output via serial port. In my code the baud rate is set to 9600,
    but the output is garbled. If I change my terminal to 19200 baud, the output is OK.
    If I change my code to 4800 baud, then my terminal has to be set to 9600.
Quote
Same answer as 1. Are you 100% sure the crystal isn't running at 16 MHz? Because symptoms like this indicate that it is.
No I'm not   ;)


Quote
3. There is a difference in the low fuse values for the 168P. The original setting is 0xff(ext. crystal 8MHz).
    With MiniCore (168P, 8Mhz) it is changed to 0xf7 (ext. full-swing crystal).
    Changing it manually via ISP seems to have no effect either.
Quote
The full swing option consumes a little more power, but is able to drive "heaver" loads, and makes the chip less sensitive to interference on the XTAL lines. Full swing is the way to go for most applications that uses an external oscilator.
Thank you, then I will use this setting.

Miki56

Hi all,
I develop a board with Atmega328PB. I discovered the "minicore" and I tried to upload it in the micro.
As programmer I' m using Arduino uno as ISP.
The VCC of Atmega328 (target) is 3,3V with an external clock is 8 Mhz.

Between programmer e target there is a bidirectional shift logic level (programmer -> 5V ; target --> 3,3V)

I ceched wiring (I use ISP connector and the reset is to pin 10 ), but I don't be able to  burn bootloader.

Could someone do you give me some suggestion?

Thanks a lot.

 

Go Up