Thinking about serial communication via Serial 1,2,3 I wondered, why the transmit interrupt is not used. Transmission events seem to be polled in the main loop and when some application function holds the CPU, transmission should stop also.
So for me it seemed to be a good training for C++ to program my own USART-Class and replace that of Arduino (e.g. via #define MyUSART).
But when I started my new USART drivers, the CPU seems to hang up.
I did not find the reason. Simply when initialising the USART, nothing else works any more.
Ok, seems to be my mistake and some misunderstanding, how to use SAM3.
Then I made some tests with the existing USARTClass (USARTClass.cpp/USARTClass.h in ...\arduino-1.5.3\hardware\arduino\sam\cores\arduino).
And I get the same effect if I only enable the transmit interrupt _pUsart->US_IER = .... | US_IER_TXRDY .
Ok, you should not do this without having prepared for this interrupt in the IRQ handler.
But with my own class, I was prepared and I got the same effect.
I have no idea what reason stops my programms with enabled TXD-Interrupts on USART.
Now I started to create a workaround based on my sysTick-Scheduler avoiding the transmit interrupt.
But if anybody goes for programming the USART with transmit interrupt, I would appreciate a contact for exchanging know how and questions.
Thanks for reading ....
Some time later ...
After installing a polling routine calling the transmit IRQ handler, I can state, that at least my new class is working. And I can show, that it is really the TXD-Interrupt-Enable which stops everything.
Did the Arduino experts make the same experience and is that the reason for not using transmit interrupt?