SoftwareSerial on pins 8 (TX) / 9 (RX) causing reset

Hi all,

I'm currently using a standalone ATmega328P with internal clock only in a project and trying to wrap my head around an issue I'm having.

I created a prototype device using AltSoftSerial on pins 8 and 9, at 9600 baud communicating with a LoRaWAN module. I've since had some PCBs developed and made the classic mistake of switching the TX and RX lines (argh, deadlines!).

I was hoping to simply switch pins 8 and 9 and use SoftwareSerial, so that 9 would become RX, and 8 TX. However having done this, I'm having an awful lot of trouble with the device, and I don't really know why. It doesn't seem to be working correctly, and the chip appears to be resetting itself after having done a few calls to the SoftwareSerial interface (note that it does look to be initializing etc correctly). If I flick the pins back to the "incorrect" but more standard 8 = RX and 9 = TX, these problems go away (but I'm unable to communicate with my attached device).

I understand that lack of SRAM can cause intermittent resetting issues, however I've dropped this substantially with no improvement (and also removed a bunch of other code paths), and suspect it is not related to this.

Ultimately what I'm interested in knowing, is whether there is some inherent reason that RX pin 8 / TX pin 9 is able to work under a SoftwareSerial, but the inverse is not? Am I missing something?

Having to switch the software RX/TX does not look to be an overly common topic, so I'm having difficulty finding relevant information.

Any tips would be greatly appreciated.

Post the program that was written for AltSoftserial and the program that uses SoftwareSerial.

...R