Skip to content

Commit bb51d6d

Browse files
committed
Add menu to select old HW revision (Serial working)
1 parent 1f38911 commit bb51d6d

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

Diff for: boards.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# See: http://code.google.com/p/arduino/wiki/Platforms
22

3-
menu.cpu=Processor
3+
menu.revision=Revision
44

55
##############################################################
66

@@ -15,6 +15,11 @@ uno2018.upload.maximum_size=32256
1515
uno2018.upload.maximum_data_size=2048
1616
uno2018.upload.speed=115200
1717

18+
uno2018.menu.revision.rev2=RevB
19+
uno2018.menu.revision.rev2.build.extra_flags=
20+
uno2018.menu.revision.rev1=RevA (Engineering sample)
21+
uno2018.menu.revision.rev1.build.extra_flags=-DREV_A_ENGINEERING_SAMPLE
22+
1823
uno2018.bootloader.tool=avrdude
1924
uno2018.bootloader.low_fuses=0xFF
2025
uno2018.bootloader.high_fuses=0xDE

Diff for: cores/arduino/wiring.c

+10
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,20 @@ void init()
392392

393393
/****************************** USART *****************************************/
394394

395+
#ifdef REV_A_ENGINEERING_SAMPLE
396+
/* Configure PORTMUX for USARTS */
397+
//PORTMUX.USARTROUTEA = (PORTMUX_USART1_ALT1_gc // MAIN
398+
//| PORTMUX_USART0_ALT1_gc // SPARE
399+
//| PORTMUX_USART3_ALT1_gc); // DEBUG
400+
401+
PORTMUX.USARTROUTEA = (PORTMUX_USART0_ALT1_gc // SPARE
402+
| PORTMUX_USART3_ALT1_gc); // DEBUG
403+
#else
395404
/* Configure PORTMUX for USARTS */
396405
PORTMUX.USARTROUTEA = (PORTMUX_USART1_ALT1_gc // MAIN
397406
| PORTMUX_USART0_ALT1_gc // SPARE
398407
| PORTMUX_USART3_ALT1_gc); // DEBUG
408+
#endif
399409

400410
/********************* TCB3 for system time tracking **************************/
401411

Diff for: variants/uno2018/pins_arduino.h

+5
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,13 @@ static const uint8_t SCL = PIN_WIRE_SCL;
5959
//!!BUG in device header file. The RXC and DRE vectors are swapped!!
6060
#define HWSERIAL0_DRE_VECTOR (USART1_DRE_vect)
6161
#define HWSERIAL0_RXC_VECTOR (USART1_RXC_vect)
62+
#ifdef REV_A_ENGINEERING_SAMPLE
63+
#define PIN_WIRE_HWSERIAL0_RX (12)
64+
#define PIN_WIRE_HWSERIAL0_TX (11)
65+
#else
6266
#define PIN_WIRE_HWSERIAL0_RX (0)
6367
#define PIN_WIRE_HWSERIAL0_TX (1)
68+
#endif
6469

6570
// Uno2 Debug USART (not available on headers, only via the EDGB virtual COM port)
6671
// USART3 on mega4809 (alternative pins)

0 commit comments

Comments
 (0)