Page 1 of 3

small clock error PIC32MZ2048EFH100

Posted: Fri Jan 14, 2022 2:21 pm
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 102 times

Re: small clock error PIC32MZ2048EFH100

Posted: Mon Jan 17, 2022 1:11 pm
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.

Re: small clock error PIC32MZ2048EFH100

Posted: Tue Jan 18, 2022 12:26 pm
by SpeedPIC32
the LED that is controlled via the interrupt clocks twice as fast

mfg SpeedPic32

Re: small clock error PIC32MZ2048EFH100

Posted: Thu Jan 27, 2022 8:48 am
by SpeedPIC32
Hello,
when do we continue?

mfg SpeedPic32

Re: small clock error PIC32MZ2048EFH100

Posted: Fri Jan 28, 2022 10:17 am
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.

Re: small clock error PIC32MZ2048EFH100

Posted: Fri Jan 28, 2022 11:05 am
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 121 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

Re: small clock error PIC32MZ2048EFH100

Posted: Fri Jan 28, 2022 2:03 pm
by SpeedPIC32
hello,
unfortunately there has been no change

With kind regards
SpeedPic32

Re: small clock error PIC32MZ2048EFH100

Posted: Fri Jan 28, 2022 4:43 pm
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.

Re: small clock error PIC32MZ2048EFH100

Posted: Tue Feb 01, 2022 12:09 pm
by SpeedPIC32
Hello,
the LEDs flash differently even in the simulation
Fehler.fcfx
(16.92 KiB) Downloaded 96 times

With kind regards SpeedPic32

Re: small clock error PIC32MZ2048EFH100

Posted: Tue Feb 01, 2022 12:34 pm
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