Page 1 of 1

BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka301

Posted: Wed Jun 22, 2016 2:57 pm
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.

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Wed Jun 22, 2016 5:21 pm
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 403 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.

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Wed Jun 22, 2016 5:36 pm
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 463 times
The file needs to be placed into the "Flowcode 6/CAL" directory which should then solve the issue.

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Thu Jun 23, 2016 5:04 pm
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.

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Sat Jul 16, 2016 3:32 pm
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...

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Sat Jul 16, 2016 9:25 pm
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

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Thu Jul 21, 2016 5:52 pm
by RCT
Thanks for the reply.

Here is an example of the issue I am facing attached.

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Thu Aug 04, 2016 11:40 am
by Benj
Hello,

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

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Sun Aug 14, 2016 2:34 pm
by RCT
Hi Benj,

Please see the simple sample I have attached.

Re: BUG in FLOWCODE 6.1.3.2 eeprom not working Pic24fv32ka30

Posted: Tue Aug 16, 2016 12:12 pm
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 386 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?