PIC32MX Clock setting issues
Posted: Sun Jan 09, 2022 11:09 am
Dear Team.
I am having an issue to get the PIC32MX795F512L to run the correct speed and I try to explain the issue below
As a test I used MPLABX and Harmony to generate me the clock settings and it running fine on the mikroE EasyPIC Fusion Development board
XT = 8MHZ
Clock speed 80MHZ
the Harmony configuration
The same settings in the MikroE PIC32 Compiler Runs fine aswell
settings tested in 2 compilers and tool chains with no issue
Running the same settings in FC the clock speed is faster as it should be ,
I set a led on 10msec and off 10msec so an period of 20mSec effectivly as you will se below the ON and OFF timnes are 5mSec
totally incorrect
The configurations below
Notice the generated code the FPLLIDIV is set at 1 (I canot judge that this is correct or not) just showing what I see and the multipier is 5 which is x20
If I set the FPLLIDIV to x4 it causes the the timing to be 100% correct and the code generated show a value of 3 for FPLLIDIV
see below
in all cases the Peripheral clock is set at Pclk/1(div by 1 )
I attatch the project as well however in my humble opion there is an isse with the pic32 config settings in FC
The FC chart I am in a serious problem as I need to do a CAN project for a customer and the timings are wrong so I will battle to get the CAN to work properly Thanks again for all the help and I would appreciate if we can point to the problem regardles me or FC
[attachment=0]
I am having an issue to get the PIC32MX795F512L to run the correct speed and I try to explain the issue below
As a test I used MPLABX and Harmony to generate me the clock settings and it running fine on the mikroE EasyPIC Fusion Development board
XT = 8MHZ
Clock speed 80MHZ
the Harmony configuration
The same settings in the MikroE PIC32 Compiler Runs fine aswell
settings tested in 2 compilers and tool chains with no issue

Running the same settings in FC the clock speed is faster as it should be ,
I set a led on 10msec and off 10msec so an period of 20mSec effectivly as you will se below the ON and OFF timnes are 5mSec
totally incorrect
The configurations below
Notice the generated code the FPLLIDIV is set at 1 (I canot judge that this is correct or not) just showing what I see and the multipier is 5 which is x20
If I set the FPLLIDIV to x4 it causes the the timing to be 100% correct and the code generated show a value of 3 for FPLLIDIV
see below
in all cases the Peripheral clock is set at Pclk/1(div by 1 )
I attatch the project as well however in my humble opion there is an isse with the pic32 config settings in FC
The FC chart I am in a serious problem as I need to do a CAN project for a customer and the timings are wrong so I will battle to get the CAN to work properly Thanks again for all the help and I would appreciate if we can point to the problem regardles me or FC

[attachment=0]