LowPowerLab Forum

Hardware support => MoteinoMEGA => Topic started by: Uncle Buzz on November 07, 2017, 05:14:41 AM

Title: dualoptiboot and serial1 (RX1 TX1) instead of serial0 (RX0 and TX0) [solution]
Post by: Uncle Buzz on November 07, 2017, 05:14:41 AM
Hi all !

Since I did a small mistake on my PCB (I have inverted TX/RX0 and TX/RX1), is there a way to compile dualoptiboot to use RX/TX1 instead of RX/TX0 to program sketchs on atmega1284p ?

Thank you to help me !

EDIT: should I change those values ?UART_SRB = _BV(RXEN0) | _BV(TXEN0);
Title: Re: dualoptiboot and RX1 TX1 instead of RX0 and TX0
Post by: LukaQ on November 07, 2017, 06:25:41 AM
I showed how you can compile bootloader, try it, should be similar process

https://lowpowerlab.com/forum/wireless-programming-(aka-ota)/how-to-ota-(overtheair)-new-bootloader-modify-bootloader/
Title: Re: dualoptiboot and RX1 TX1 instead of RX0 and TX0
Post by: Uncle Buzz on November 07, 2017, 06:33:32 AM
I am able to compile optiboot, but I wonder if I can invert RX0/TX0 and RX1/TX1 in bootloader so I can use RX1/TX1 to program the atmega1284p with FTDI on RX1/TX1
Title: Re: dualoptiboot and RX1 TX1 instead of RX0 and TX0
Post by: Uncle Buzz on November 07, 2017, 10:17:18 AM
well, it was simple :

set UART to 1 instead of 0 in beginning of optiboot.c (line 303)
#ifndef UART
#define UART 1
#endif