Page 1 of 1

Problem with UART, porting V4 to V5

Posted: Mon Apr 08, 2013 4:58 pm
by Niro
Dear all,

I encountered a big problem using FC V5.5 on an ATMEGA328P.
Compiling and programming with V4 all works fine. Now using V5.5 , the AVR always makes a reset each time I send somthing via UART.
Opening the V4 file with V5.5 the first time, the UART Interrrupt was disabled. I enabled it (UART0 RX) and assigned it to the same ISR as in V4.
Then I compiled it to the chip with no problems. The software seems to work fine on the AVR, but the communication via UART doesn't work at all.
I've checked all RS232 properties and they seem to be the same as in V4.

Can anybody help?

Many thanks!
Niro

Re: Problem with UART, porting V4 to V5

Posted: Mon Apr 08, 2013 5:30 pm
by dazz
Hi
Can you post your flowchart as it enables others to have a look and see if they can spot a problem

Regards
Dazz

Re: Problem with UART, porting V4 to V5

Posted: Mon Apr 08, 2013 7:17 pm
by Niro
Hi Dazz,

many thanks for your fast response.
The code is quite complex and huge, and most parts of it are confidential, so unfortunately I can't disclose it.
The code compiled with V4 really worked fine for over 2 years.

I really think it is a fundamental fault, as every function else on AVR works fine, except the RS232 communication from PC to AVR.
Sending data from the AVR to the PC via RS232 also works fine! But sending one simple byte (no matter what) from PC via terminal program to the AVR
immediately starts the code completely from the beginning (I assume this to be a reset).
As I am using a lot of C-code, maybe some internal FC declarations have changed from V4 to V5.5, but I don't have any compiler erros.

Best regards,
Niro

Re: Problem with UART, porting V4 to V5

Posted: Mon Apr 08, 2013 7:48 pm
by dazz
As
Its confidential you could always pm the code with some notes i could have a quick look and then delete it, or if you dont want to do that i fully understand) then you could pm benj or one of the other mm staff or forum vc'sand see if they could help.

Anything sent confidentially stays that way and is deleted quickly

Regards
Dazz

Re: Problem with UART, porting V4 to V5

Posted: Tue Apr 09, 2013 11:06 am
by Niro
Hi Dazz,

many thanks.
I try to separate the part of the code which does the UART and send it pm.

Best regards,
Niro

Re: Problem with UART, porting V4 to V5

Posted: Fri May 17, 2013 2:52 pm
by Niro
Hi all professionals,

I'm still trying to fix the problem.
Dazz kindly has checked the files and didn't find any problems, in his opinion it is bound to be something simple.

I'd really appreciate some of the pros have a look at my code!

I would send the files via PM to keep it confidential.
The result of course can be posted here, to help others.

Many thanks!
Niro