small clock error PIC32MZ2048EFH100

Any bugs you encounter with Flowcode should be discussed here.
SpeedPIC32
Posts: 252
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: small clock error PIC32MZ2048EFH100

Post by SpeedPIC32 »

Hello,
Sorry, I tested everything again.
only with your fcdx file it works
had not restarted FC9.


With kind regards SpeedPic32

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: small clock error PIC32MZ2048EFH100

Post by SpeedPIC32 »

Hello Ben
a small problem has remained.
FC always wants to give me a newer version of the
32MZ2048EFH100.fcdx file.
see picture.
pic32.jpg
pic32.jpg (12.06 KiB) Viewed 3161 times
With kind regards
SpeedPic32

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: small clock error PIC32MZ2048EFH100

Post by medelec35 »

Hi SpeedPic32.
If you replace the current file with one from the forums, that file will be marked as not genuine.
The new revision shown will be the revision of the file you replaced if there have been no further updates.
If the revision was 2 when before you replaced the 32MZ2048EFH100.fcdx file then you can update with revision 3.
If the revision was 3 before you replaced the 32MZ2048EFH100.fcdx file then you will need to wait for revision 4.
It looks like the last time PIC32MZ2048EFH100 was replaced was on 10/11/21
Therefore the file can be left showing Not genuine as that is expected.
Martin

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: small clock error PIC32MZ2048EFH100

Post by SpeedPIC32 »

Hello Medelec35
Thanks I will wait for version 4 :D

with kind regards

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: small clock error PIC32MZ2048EFH100

Post by SpeedPIC32 »

Hello medelec35 and Team Matrix

Just ran the simulation on this error and looked at the outputs on the target device.
There is also an error. The flashing does not match reality.
In hardware terms, it flashes differently. :|

With kind regards
SpeedPic32
Attachments
10ms_test_efh100.fcfx
(11.09 KiB) Downloaded 95 times

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: small clock error PIC32MZ2048EFH100

Post by stefan.erni »

Hi SpeedPic32.

What hardware are you using?
Is this an available demo board or do you have your own hardware?

Can you post part of the schematic or let me know which osci you are using?
You can simply look at the pin 49 port RC12 in the schematic to see if there is an additional osci and what type (how many MegaHz)

regards


Stefan

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: small clock error PIC32MZ2048EFH100

Post by SpeedPIC32 »

Hello Stefan

The board is called Flip click.
The board runs perfectly.
In FC9 it does not run properly when I run it under Debug and look at the pins from the PIC under Target Device.
The LEDs on the board both flash with 1 sec on and 1 sec off.
The clock from the LED on pin A6 only flashes half as fast.

With kind regards
SpeedPic32
Attachments
flip-n-click-pic32mz-manual-v100.pdf
(3.66 MiB) Downloaded 77 times

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: small clock error PIC32MZ2048EFH100

Post by stefan.erni »

Hi SpeedPIC32

This board I used several times. Very practical and easy to use with FC9.
One more question about your program.
I suspect that your problem comes from the "Takt"
If you always trigger an interrupt on the positive edge, your clock will be halved, so half of the speed would be fine.
Can you test if that is the reason?

regards

Stefan

Takt.jpg
Takt.jpg (40.8 KiB) Viewed 3015 times

SpeedPIC32
Posts: 252
Joined: Thu Dec 10, 2020 2:35 pm
Has thanked: 36 times
Been thanked: 17 times

Re: small clock error PIC32MZ2048EFH100

Post by SpeedPIC32 »

Hello Stefan
I create a clock with 100 Hz
this is a 10ms clock
I count up to 100 and switch on the LED at PIN A6.
I count to 100 again and switch the LED off again.

I do the same in the loop with the LED at PIN A7.
I switch on the LED wait 1 sec.
I switch the LED off wait 1 sec.

This must lead to A7 being on first.
when A7 goes off, A6 goes on
and so on.

On the board it works like this
not in the simulation.
There is an error.

The LED on A6 flashes only half as fast.

I have now found the same thing with a PIC32MX795F512H in the simulation.

just load it and start it under Debug and watch the PINS on the chip.

With kind regards
Attachments
10ms_test_MX795.fcfx
(10.9 KiB) Downloaded 80 times

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: small clock error PIC32MZ2048EFH100

Post by stefan.erni »

Hi SpeedPIC32

Ok I saw what you are doing.
Your two programs are set differently timer1. One timer is 100Hz and the other is 50Hz.
But I assume that's not the problem.
I looked at your OSCI configuration in the project options. I guess that's just one clock is on 200Mhz.
All other clocks should be smaller. And you must be careful not to be higher in any place than the PIC allows
Maybe your hardware or your simulation is not doing the right thing.
Setting all the divider and multiplier from the clock in a correct way for the MZ is time-consuming. You can find information here.
You can also test your configuration in an Excel and see how your clocks are.

more Infos:
https://microchipdeveloper.com/32bit:mz-osc


regards

Stefan
Attachments
PIC32_OSC_CONFIG_v1.1 (1).xlsx
(451.21 KiB) Downloaded 85 times

Post Reply