Using Flowcode 10, i made a flow which is using interrupt UART0 RX (Channel 1, 19200 baud rate) and a very small macro to save the received serial data in a circular buffer. Microcontroller used is Atmega 2560, board - Mega 2560 Pro.
I realized that the flow is not functional and start to search for the reason.
SendChar/SendString and ReceiveChar/ReceiveString are perfectly functional without using Interrupt.
When i use interrupt no serial data is received.
I suspect that something is wrong in the configuration, when ISR is activated, but i do not know what.
Atmega 2560 - UART0 RX Interrupt not functional
-
minolta
- Posts: 11
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 10, 2020 6:04 pm
- Location: Romania
- Has thanked: 1 time
Atmega 2560 - UART0 RX Interrupt not functional
- Attachments
-
- Flowcode1.fcfx
- (32.24 KiB) Downloaded 11 times
-
mnfisher
- Valued Contributor
- Posts: 1982
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 158 times
- Been thanked: 940 times
Re: Atmega 2560 - UART0 RX Interrupt not functional
I would try stripping it back to basics a bit and try just echoing the string received to UART. Channel 1 is connected n to the USB - so it might be worth trying channel 2?
Martin
Martin
Re: Atmega 2560 - UART0 RX Interrupt not functional
Yes, i should have thought of this. I removed the CH340 from the board (i use ICSP for programming) and now the uart0 line is "free".
Tested and is working with interrupt activated.
Thanks.
Tested and is working with interrupt activated.
Thanks.