PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by stefan.erni »

Hi Ben
I have a Digilent PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

I can program it nice with Flowcode 7 and PICkit3. I can turn on/off the 4 pcs of LEDs on the board.
But I have a problem to configurate the clock correct. If I control the on time from a led it's 2.5 miliSeconds.
As if I can not let the board run on 200Mhz "only" on 80Mhz. (2.5 times slower). Can You help me to configurate it to 200Mhz.


http://store.digilentinc.com/chipkit-wi ... ler-board/
Board_info.PNG
PCB
(507.1 KiB) Downloaded 1312 times
Attachments
Flowcode1-chipkit-wi-fire-1.fcfx
Demoprogram
(9.11 KiB) Downloaded 292 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: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by Benj »

Hi,

Are you still having problems getting this running at the right rate? I started having a look for you but then got distracted with something else. What configuration options have you tried? I can maybe put together a new definition file for this ChipKit board and that should allow you to program via the built in bootloader and hopefully this will automatically be running at 200MHz.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by stefan.erni »

Hi Ben
That's a good idea to use the built in bootloader for this kit.It will help us a lot.
Please send me a new definition file for the kit, if it's ready.
I can test it easy with my osciloscope.
For the clock, I tried many different settings, but the clock was never higher than 80Mhz.
Stefan

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: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by Benj »

Hi Stefan,

Just putting the definition file together for you. I don't suppose you know the USB VID and PID for the board do you? They can be found in the windows device manager, under the Ports section. These are used for the COM port auto detection but are not strictly necessary.

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: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by Benj »

Hello,

Right to add the new Wi-FIRE definition you first need to ensure you have applied the latest files from here.
http://www.matrixtsl.com/mmforums/viewt ... 63&t=18209

Once you have done this you need to add the linker script from this archive. The "MZ-application-32MZ2048ECX.ld" file lives in the "Flowcode 7\compilers\pic32\chipKit" folder.
MZ-application-32MZ2048ECX.zip
(4.13 KiB) Downloaded 332 times
Finally you need the new definition file which lives in the "Flowcode 7\FCD\PIC32" folder.
ChipKIT Wi-FIRE Bootloader.fcdx
(47.59 KiB) Downloaded 321 times
Let me know how you get on.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by stefan.erni »

Hi Ben

I did it. I can load the chipkit add my code and compiele it to c.
I can also see the com3 USB serial port in the programmer port option.

But compile it to hex gives problem....

I create a folder "chipKit" and put the "MZ-application-32MZ2048ECX.ld" there
C:\Program Files (x86)\Flowcode 7\compilers\pic32\chipKit


********************************************************************
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic32\bin\xc32-gcc.exe -O1 -G1024 -Wl,--gc-sections,-Map,"Flowcode1_usb_Bootloader1.map" -nostartfiles -T "C:\Program Files (x86)\Flowcode 7\compilers\pic32\chipKit\MZ-application-32MZ2048ECX.ld" -T "C:\Program Files (x86)\Flowcode 7\compilers\pic32\chipKit\chipKIT-application-COMMON-MZ.ld" "C:\Program Files (x86)\Flowcode 7\compilers\pic32\chipKit\cpp-startup.S" -mprocessor=32MZ2048EFG100 -o "Flowcode1_usb_Bootloader1.cof" "Flowcode1_usb_Bootloader1.c"
xc32-gcc.exe: error: C:\Program Files (x86)\Flowcode 7\compilers\pic32\chipKit\cpp-startup.S: No such file or directory
******************************************************************

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: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by Benj »

Hi Stefan,

Make sure you have done this step as it includes several key files to allow the ChipKIT bootloader programming to function.
Right to add the new Wi-FIRE definition you first need to ensure you have applied the latest files from here.
http://www.matrixtsl.com/mmforums/viewt ... 63&t=18209

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by stefan.erni »

Hi Ben

Thank you for the remind me.... I have to do this on every computer with F7 .
It's great what you did! It's working nice.

A little bit is not correct in my program. I have delay of 1mSec but the scope shows me 4mSec.
I will test some more signals.
scope_0-2.png
(11.55 KiB) Downloaded 5909 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by stefan.erni »

Hi Ben
There is a small question about the board.
Will the Wifi chip(modul) be supported in the future from FC7.
It's from Microchip
MRF24WG0MA WiFi module

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: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by Benj »

Hello,

It might be worth toggling an output with a timer interrupt and seeing if that is running at the right speed.

2 things I can think of to cause this.

1) it's not running at 200MHz it's running at 50MHz, seems unlikely as ChipKIT bootloader should have it running at max speed.

2) The core timer we use for timings is running on a /4 pre-scaler on some MZ devices.

To test out option 2 here is a slightly updated CAL file for PIC32, note do not update the file unless your having this issue on a MZ device. This file lives in the "Flowcode 7/CAL/PIC32BIT" folder.
PIC32BIT_CAL_Delay.c
(4.19 KiB) Downloaded 320 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: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by Benj »

Hello,
Will the Wifi chip(modul) be supported in the future from FC7.
You should be able to talk to the module now using the SPI component in Flowcode, and of course if you create macros that are useful then you can package these up into your own component.

As for us creating a component to simplify the usage, we can certainly add it to the list to investigate but we have a lot on our plate at the moment.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by stefan.erni »

Hi Ben
Thank You for the big help.
I used the new cal_Delay.c
It's correct now. One Second delay in software is on the board one second too.

Unfortunately I tryed to use an IRQ.
In the simulation it's working but if I download it in the chipkit, the software is not running.

And I saw some PIC32 USB folder...... Is Usb now working with pic32?
Attachments
Flowcode1_usb_Bootloader1.fcfx
simple irq
(10.95 KiB) Downloaded 255 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: PICKIT WI-Fire PIC32MZ2048EFG100 200MHz

Post by stefan.erni »

Hi Ben

I have now FC7.2 and I have the Problem with the IRQ. The program stop if I use an IRQ

Post Reply