Custom board on 1.6.4 and hardware serial not working

30 views
Skip to first unread message

Jeremy Porter

unread,
Jun 23, 2015, 7:51:37 AM6/23/15
to devel...@arduino.cc
I have a custom board, with a ATmega328p, using the internal 8 mhz oscillator, at 3.3volts.  I had things running fine, uploading to the board via external programmer (TinyUSB).
I get no output over the serial pins.  I've hooked up an oscilloscope to the pins and they don't even toggle.  I can do digitalWrites to the two pins, and see them toggle on the scope, so I have confidence that the scope is working.  I've verified the clock rate on the chip seems to be correct (delayMicroseconds(100) seems to generate the correct timings).

I'm sort of at roadblock here, I'm not sure if the problem is in my boards.txt (I added a custom entry to boards.txt in the Program Files\Arduino\harware\arduino\avr\boards.txt).

Is there something obvious I'm missing that needs to be set for the serial libraries to be initialized?  Does the chip need to have the bootloader programmed, if I'm using the ISP port, in order for the serial port to be initialized?

I'm open to suggestions, pointers to documentation, asking on other forums, etc.

My boards.txt entry looks like:
##### JWP

jwp.name=Arduino jwp
jwp.upload.tool=arduino:avrdude
jwp.upload.protocol=arduino
jwp.upload.maximum_size=30720
jwp.upload.speed=57600

jwp.bootloader.low_fuses=0xE2
jwp.bootloader.high_fuses=0xDE
jwp.bootloader.extended_fuses=0x05
jwp.bootloader.path=arduino:atmega
jwp.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
jwp.bootloader.tool=arduino:avrdude
jwp.bootloader.unlock_bits=0x3F
jwp.bootloader.lock_bits=0x0F

jwp.build.mcu=atmega328p
jwp.build.f_cpu=8000000L
#jwp.build.board=AVR_PRO
jwp.build.core=arduino:arduino
jwp.build.variant=eightanaloginputs

Matthijs Kooijman

unread,
Jun 24, 2015, 9:48:02 AM6/24/15
to devel...@arduino.cc
Hi Jeremy,

> Is there something obvious I'm missing that needs to be set for the serial
> libraries to be initialized? Does the chip need to have the bootloader
> programmed, if I'm using the ISP port, in order for the serial port to be
> initialized?
Nope, none of that should be needed. From the observations you've
shared, I would say it should just work.

> I'm open to suggestions, pointers to documentation, asking on other forums,
> etc.
Perhaps it would be good to write a small sketch that directly talks to
the UART hardware registers? Perhaps even compile and upload that with
avr-gcc and avrdude directly, though using the IDE should also work.
I don't have any examples ready, but there should be plenty basic
avr-gcc UART examples out there. The datasheet is obviously also very
relevant documentation here.

Gr.

Matthijs
signature.asc

William Westfield

unread,
Jun 26, 2015, 2:30:47 AM6/26/15
to devel...@arduino.cc
> Is there something obvious I'm missing
>
> jwp.build.variant=eightanaloginputs
>

jwp.build.variant=arduino:eitheranaloginputs

perhaps?

BillW/WestfW

Reply all
Reply to author
Forward
0 new messages