Flowkit 2and PIC32MX534F064

An area to discuss 32-bit PIC specific problems and examples

Moderator: Benj

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Flowkit 2and PIC32MX534F064

Postby QMESAR » Thu May 25, 2017 11:02 am

Hi All.
It seems the old problem with the Flowkit 2 and PIC32MX has popped up again
The old error report that you must compile to chip before connecting to the ICD is again showing up .
(1) I did enabled ICD
(2) Compiled to Chip
(3) programming went fine
(4) pressing the Run Arrow brings up the popup window that I must first compile to chip.

Guys Attached is my FC chart can you guys test this please as I have another FC where I did a lot of work and is now in tzhe debugging phase and now I have this issue

Thank a million
Attachments
FC7.rar
(55.77 KiB) Downloaded 82 times
2.JPG
2.JPG (69.44 KiB) Viewed 5327 times
1.JPG
1.JPG (29.42 KiB) Viewed 5327 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby QMESAR » Fri May 26, 2017 10:36 am

Guys just another question
Why if I have no ICD connected, I have a settings page for ICD as in pic1 and when I have the ICD connected to the USB the settings page changes shape format is this correct?(PIC2)

Thank a million for helping out
Attachments
1.JPG
1.JPG (32.71 KiB) Viewed 5308 times
2.JPG
2.JPG (41.59 KiB) Viewed 5308 times

User avatar
SimonB
Posts: 49
Joined: Thu Oct 15, 2015 10:08 am
Has thanked: 15 times
Been thanked: 30 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby SimonB » Fri May 26, 2017 10:46 am

Hi QMESAR,

I can explain the reason why this error happens and maybe it will help you to fix it.

When you turn on ICD there is a bunch of new code that gets generated which doesn't appear in a normal build. If you turn on ICD and then click on Build -> View C Code then scroll down a few lines you can see a few lines written as #define ICD_ICDx 0xXX like the ones here:

aaaa.jpg
FirewareID
aaaa.jpg (122.24 KiB) Viewed 5308 times


Those numbers are a unique 8 digit ID for your flowchart. You will see that if you change any part of your flowchart then those numbers will be different. When you send the build to the chip it stores those numbers and then when you click on the play button it sends a command to the ghost chip to get the numbers and then it compares them to the ones for your flowchart so it knows whether you are trying to debug the same piece of code that is on the target or not.

For some reason when you are clicking on the play button the ID that it is getting doesn't match your flowchart and so this error pops up. When I have seen this in the past it has been because the target has for some reason sent junk data back due to some problem.

There are generally 2 main problems that cause this. Either the clock pin or data pin are not connected correctly between the flowkit and the target or there could also be a problem with the CAL file where maybe a register needs to be set or reset but isn't being. The PIC32 devices are all quite new so there is a chance that maybe something was missed with the PIC32MX534F064 and one of the CAL files needs updating with a fix.

If possible are you able to check that the flowkit 2 works with another device? (just so we can make sure that there is definatly no issue with the flowkit)

Simon
These users thanked the author SimonB for the post:
QMESAR (Fri May 26, 2017 12:00 pm)
Rating: 5.26%
 

User avatar
SimonB
Posts: 49
Joined: Thu Oct 15, 2015 10:08 am
Has thanked: 15 times
Been thanked: 30 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby SimonB » Fri May 26, 2017 10:52 am

QMESAR wrote:Guys just another question
Why if I have no ICD connected, I have a settings page for ICD as in pic1 and when I have the ICD connected to the USB the settings page changes shape format is this correct?(PIC2)

Thank a million for helping out


Ahh yeah this is normal. The first picture is the normal settings page for Ghost where you select the ports and pins that you are interested in. The chips are soldered to the board so it is not possible to connect the pins to different pins.

But when it detects that you have connected a Flowkit 2 it shows the 2nd picture because it is possible for you to connect any pin on the flowkit to any other pin on the target and so you need to be able to tell it which pin is connected to which.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby QMESAR » Fri May 26, 2017 10:52 am

Hi Simon.

Thank you for your reply,
I am 110% sure the Flowkit is working and that the PGEC and PGED lines are connected correctly, Flowkit D8 Connected to PGED and Flowkit D9 connecetd to PGEC ,
I am using the Flowkit 2 with PIC32MX250F128B succesfully
it is now on the PIC32MX534F064H that I am having a problem

Regards

User avatar
SimonB
Posts: 49
Joined: Thu Oct 15, 2015 10:08 am
Has thanked: 15 times
Been thanked: 30 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby SimonB » Fri May 26, 2017 11:09 am

Ok then I think that there might be an issue with the CAL file then. Our resident PIC32 guru (Ben) is currently away for a couple of weeks but let me have a chat with the guys here and see what I can find out :)

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby QMESAR » Fri May 26, 2017 11:14 am

Simon.
Thank you very much and after your post I went and connected my PIC32MX250F128B project board board and as you will see attached I am running the ghost with Flowkit 2 on this device

Have good time
Attachments
1.JPG
1.JPG (17.66 KiB) Viewed 5304 times
These users thanked the author QMESAR for the post:
SimonB (Fri May 26, 2017 11:41 am)
Rating: 5.26%
 

User avatar
LeighM
Matrix Staff
Posts: 1875
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 439 times
Been thanked: 633 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby LeighM » Fri May 26, 2017 1:43 pm

Hi,
Did you remember to "Override Comms Pins" and change to RB0 and RB1?
FCD default is currently RB6 and RB7

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby QMESAR » Fri May 26, 2017 3:43 pm

LeighM wrote:Did you remember to "Override Comms Pins" and change to RB0 and RB1?
FCD default is currently RB6 and RB7


Hi Leigh I had to edit my post as I was confused and looked at the wrong project. :oops:

Yes you are correct the default is RB6 and RB 7 as programming and debug pins however for my board that is correct unfortunately I do not have access to RB0 and RB1 to try as it is a QFN package no pins to access on the outside.
However PGEC2 and PGED 2 are on Pins RB6 and RB7 so I guess that my setting in FC should work.

Thank a million Leigh
Attachments
2.JPG
2.JPG (51.14 KiB) Viewed 5281 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby QMESAR » Fri May 26, 2017 5:07 pm

Hi Team,
I did as leigh suggested changed the pins to RB0 and RB1 (had to modify my board) and now it functions correctly :D
However :shock:
This is confusing as in my opinion not a good state to be in as the PGEDx and PCECx should be available as communication pins this seems to me now that
only PGEC1 and PGEC1 can be used with Flowkit ? correct!
As the mcu can be programmed through and PGEC and PGED pins and the same pins are used for debugging I would expect FC to use the same pin also and all of then not only PGEC and PGED 1

Am I missing something here as in my customer project I can not use PGEC1 and PGED1 as the ready manufactured board with the mcu has left the PGEC2 and PGED2 pins as the communication pins which seems not to work in FC

Please help me understand this situation however I can now start to debug some of the Components of the application :D

User avatar
LeighM
Matrix Staff
Posts: 1875
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 439 times
Been thanked: 633 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby LeighM » Fri May 26, 2017 6:29 pm

Any pin that can be used as generic IO should be useable as ICD clock and data.
I don't know if there is anything re the device that is inhibiting that.
Or it could be that the FCD is incorrectly blocking.
I'm out of the office until Tuesday, I will have a more detailed look then.
Leigh

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby QMESAR » Fri May 26, 2017 6:37 pm

I'm out of the office until Tuesday, I will have a more detailed look then.


No Problem Thank you very much Leigh
I appreciate your help and efforts
have nice weekend :D

User avatar
LeighM
Matrix Staff
Posts: 1875
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 439 times
Been thanked: 633 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby LeighM » Tue May 30, 2017 2:52 pm

I've had a look at the datasheet, but cannot yet see any reason for this ICD failure.
I had thought it could be something like the port default being ADC, but AD1PCFG is set in the startup, from the FCD.
So it's either something else to do with this device and configuration of RB6,7 or something we need to change in the ICD CAL for this device.
This could take a while.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby QMESAR » Tue May 30, 2017 4:06 pm

Hi

Thank you for the reply appreciated, ok that not an urgent issue as I can access the device on RB0 and RB1 for now
Have good time :D

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1103
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 340 times
Been thanked: 549 times
Contact:

Re: Flowkit 2and PIC32MX534F064

Postby QMESAR » Sun Jun 18, 2017 2:05 pm

Sorry I posted in the wrong topic I moved it to the right topic :D
These users thanked the author QMESAR for the post:
Benj (Mon Jun 19, 2017 10:07 am)
Rating: 5.26%