Problem with UART, porting V4 to V5

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Niro
Posts: 77
Joined: Mon Jan 03, 2011 8:58 pm
Has thanked: 29 times
Been thanked: 10 times
Contact:

Problem with UART, porting V4 to V5

Post 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

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Problem with UART, porting V4 to V5

Post 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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Niro
Posts: 77
Joined: Mon Jan 03, 2011 8:58 pm
Has thanked: 29 times
Been thanked: 10 times
Contact:

Re: Problem with UART, porting V4 to V5

Post 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

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Problem with UART, porting V4 to V5

Post 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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Niro
Posts: 77
Joined: Mon Jan 03, 2011 8:58 pm
Has thanked: 29 times
Been thanked: 10 times
Contact:

Re: Problem with UART, porting V4 to V5

Post 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

Niro
Posts: 77
Joined: Mon Jan 03, 2011 8:58 pm
Has thanked: 29 times
Been thanked: 10 times
Contact:

Re: Problem with UART, porting V4 to V5

Post 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

Post Reply