small clock error PIC32MZ2048EFH100

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

small clock error PIC32MZ2048EFH100

Post by SpeedPIC32 »

Hello

small error with the PIC32MZ2048EFH100 200Mhz Flip Clickboard PIC32MZ :shock:
Loop with second cycle runs at second cycle
LED one sec on one sec off.
The second LED should do the same with a 10msec cycle in conjunction with a counter up to 100. But flashes faster
I have output the count value via a RS232 and it was the same, much too fast.
The build rate was correct.

With kind regards
SpeedPic32
Fehler.fcfx
(31.22 KiB) Downloaded 97 times

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: small clock error PIC32MZ2048EFH100

Post by BenR »

Hello,

What sort of speed is the second LED flashing at? Is it twice as fast or something totally different.

The register setup looks to be correct for the rate to be correct. I haven't spotted a problem so far anyway.

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

Re: small clock error PIC32MZ2048EFH100

Post by SpeedPIC32 »

the LED that is controlled via the interrupt clocks twice as fast

mfg SpeedPic32

SpeedPIC32
Posts: 251
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,
when do we continue?

mfg SpeedPic32

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: small clock error PIC32MZ2048EFH100

Post by BenR »

Hello,

It looks like we are expecting the interrupt clock to be the same as the main core clock and a previous mod I did to change the UART/SPI clocks to be correct has effected the interrupt clock too.

For now please can you set the rate to be 2X what it should be and I'll see if I can narrow down the range of effected devices here to provide a fix that doesn't cause more knock on problems with other devices.

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: small clock error PIC32MZ2048EFH100

Post by BenR »

Hello,

Do you want to give this modified definition file a go. It looks like it should be calculating the timer frequency correctly now but we might have to double check that delays have not become effected by the change.

32MZ2048EFH100.fcdx
(91.45 KiB) Downloaded 112 times

The file needs to be placed here and then Flowcode will need restarting if you have it open.

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PIC32

SpeedPIC32
Posts: 251
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,
unfortunately there has been no change

With kind regards
SpeedPic32

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: small clock error PIC32MZ2048EFH100

Post by BenR »

Hello,

The change should be that the interrupt enable icon now shows 200Hz instead of the previous 100Hz it was showing before. So the calculated frequency should now match the hardware frequency.

SpeedPIC32
Posts: 251
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,
the LEDs flash differently even in the simulation
Fehler.fcfx
(16.92 KiB) Downloaded 89 times

With kind regards SpeedPic32

SpeedPIC32
Posts: 251
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,
I recompiled it with your fcdx file.
In the interrupt settings, I set the frequency to 100.00 Hz. This worked
I have recompiled this and it works. The LEDs now flash the same way
at some point I got the message that an update is available.
I have imported this and it also runs. Thank you

With kind regards SpeedPic32

Post Reply