I'm not an electronics engineer, but I would go for using the TX operation as a software UART.
For an RX operation, buffering is needed, and interrupts are needed not to miss information. This is typically handled by a hardware UART.
For a TX operation, you only need to send information, which is happening when you want it (for receiving you don't know ...
It's far simpler to implement a UART transmission in software because you just bit-bang the output port until the bytes are sent. To implement a receiver, you have to do multiple checks on the bits as they arrive (such as waiting for the start bit) and parity checking and usually, you have to run at a much higher processing rate to ensure you can cope with ...
I figured it out.
NVIC->ISER |= TIM2_IRQn;
NVIC->ISER = 1UL << TIM2_IRQn;
because to enable the interrupt you want to set bit 28, not write 28 as bit value to the register. Now it works as expected.
Yes, shorting a capacitor with a button does cause a large pulse of current. In fact, AVR hardware design guide suggests that when a push button with contact bounce and reset capacitor is combined with stray inductance from wires and PCB traces, the surge voltages can be out of specs for the reset pin and thus a 330R series resistor is recommended. Also the ...