BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka301

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

Post Reply
RCT
Posts: 6
Joined: Mon Jun 20, 2016 11:20 pm
Been thanked: 1 time
Contact:

BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka301

Post by RCT »

Hi,

I'm transferring code that works on another pic chip due to programming memory shortage on that chip to the PIC24FV32KA301. The RX interrupts are not working, the baud rate on the UART are twice what they are noted to be and the EEPROM causes the error "Error returned from [pic30-gcc.exe]" once it is included in the program. Can anyone suggest the fix to any of these problems? I'm getting tired of bugs.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by Benj »

Hello,

First of all please can we start with the baud rate. Have you performed a 1 second flasher test to double check the chip is running at the right speed?

http://www.matrixtsl.com/wiki/index.php ... ED_flasher

If you have already done this and the chip is definitely running at the right speed then here is a new definition file you can try. This needs placing in the "Flowcode 6/FCD/PIC16" folder before restarting Flowcode.
24FV32KA301.fcdx
(27.06 KiB) Downloaded 388 times
Let me know how you get on with this and I will investigate the EEPROM issue.

Edit. It seems to be the EEPROM Initial values that are causing the compiler error. If you clear the Initial Values property of the EEPROM then the component compiles correctly. I'll see what might be going wrong with the initialisation code.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by Benj »

The EEPROM initialiser problem seems to be a bug in the C30 compiler definitions for newer devices only.

I have made a fix in our internals.c file which is attached below.
internals.c
(11.07 KiB) Downloaded 450 times
The file needs to be placed into the "Flowcode 6/CAL" directory which should then solve the issue.

RCT
Posts: 6
Joined: Mon Jun 20, 2016 11:20 pm
Been thanked: 1 time
Contact:

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by RCT »

Thanks for the response Benj.

1. The internals.c file does prevent the previous error I was having with the eeprom, however, it causes another error where the chip appears to restart about every half second once values are placed in the "Initial Values" section of the eeprom. I can tell because I have a pattern at which I flash my lights during the initialization of the chip which takes about half a second and this pattern keeps repeating. Once I do not initialize the eeprom I have no issues as you said.

2. The baud rate issue has not changed even after replacing the PIC24FV32KA301.fcdx file. I did the LED flasher test and it worked. The UART communicator is currently set to 9600 baud and as a test I am sending the string "Tick " every second. I am using a serial to USB connection to my PC and the RealTerm Serial Capture Program. When Real Term is set to 9600 baud to match the output from the micro controller I receive "E5 C0 85" hex values but at 19200 baud I receive the right values "Tick ".

3. Finally I am unable to send data to the chip over UART. I suspect this is related to the baud issue above but I am using a CircularBuffer and an Interrupt on UART Channel 2 of this chip and I coded for a confirmation to be sent whenever the interrupt is called. I get no confirmation and therefore I'm not even sure the interrupt is working.

I have full confidence in the codes I have written as they have worked when using another micro controller. I only wanted to add more features to my circuit so I needed more programming memory. But I haven't added any new features yet because I'm trying to work out these issues first.

Thanks again for the help Benj. I hope we can find a solution soon.

RCT
Posts: 6
Joined: Mon Jun 20, 2016 11:20 pm
Been thanked: 1 time
Contact:

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by RCT »

While I know this may be a lot of bugs to go through I was really hoping for a response. I have further confirmed that nothing is wrong with the circuit as I have gotten proper UART communication after compiling a simple MPLAB written program, however, I meet up on a whole other set of problems when using MPLABs,(mostly my shortcomings).

Please help...

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

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by dazz »

Hi RCT

Matrix staff are away till monday, the staff are very busy at present, and i'm sure benj will reply when he has a minute, can you post your flowchart as this will help others to see the issues

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

RCT
Posts: 6
Joined: Mon Jun 20, 2016 11:20 pm
Been thanked: 1 time
Contact:

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by RCT »

Thanks for the reply.

Here is an example of the issue I am facing attached.
Attachments
COM Output.JPG
This is the information received by the COM port, notice the baud rate is twice the one set in Flowcode
(77.87 KiB) Downloaded 2250 times
Code.JPG
This is a simple program to flash a light and send info over UART at 9600 baud
(139.01 KiB) Downloaded 2250 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by Benj »

Hello,

Please can you post your Flowcode project file. Could the resetting be caused by the Watchdog timer?

RCT
Posts: 6
Joined: Mon Jun 20, 2016 11:20 pm
Been thanked: 1 time
Contact:

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by RCT »

Hi Benj,

Please see the simple sample I have attached.
Attachments
WTS_Chip_Test_3.fcfx
Sample program with output as seen in the above post
(8.87 KiB) Downloaded 365 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Post by Benj »

Hello,

Right let's try to get to the bottom of this problem.

1) You had an issue where the EEPROM would cause a compilation error on your project, this was fixed with a mod to the internals code.
2) You had a second issue where the UART baud rate was twice what it was suppost to be.

The attached definition file below should hopefully fix issue 2 for you.
24FV32KA301.fcdx
(27.1 KiB) Downloaded 369 times
3) The third issue is that the device resets when the EEPROM component is in your project. Not sure what would be causing this, Is it possible for you to do more tests on this to help us get to the bottom of the issue.

a) Does the device reset when the EEPROM component is not present
b) Does the device reset when the EEPROM component is present but not called or initialised
c) Does the device reset when the EEPROM component is present, not called but is initialised
d) Does the device reset when the EEPROM component is present and called but not initialised
e) Does the device reset when the EEPROM component is present and called and initialised
f) Does the device reset when the EEPROM component is only written to?
g) Does the device reset when the EEPROM component is only read from?

Post Reply