Page 1 of 1

FC8 uart speed Pic32 MX440F256H

Posted: Fri Jun 01, 2018 1:42 pm
by stefan.erni
I have a problem with the speed of the uart. It's factor 2 wrong.
In FC8 it's 115000 and in the terminalprogram I need to config as 57600.
If I use the custom baud option in FC8 with 230400 and in the terminalprogramm 115000
it's working too.
But I can not custom baud option in FC8 with 2*921600=1'843'200

If it's possible to add some higher speed in the pulldown menue and test it?

230400Bd
460800Bd
921600Bd

Re: FC8 uart speed Pic32 MX440F256H

Posted: Fri Jun 01, 2018 2:16 pm
by QMESAR
Hi All

This is an old issue that has been discussed a few time with no end result or solution :D )I have uploaded a few mE projects and MPLABx project in the past that shows this error in FC :D

Stefan please do a delay test (it will yield a too slow or double period)and you will notice that anything in the PIC32 that FC calculates you will see it is 2 time slower that is should be.

To solve your issue setup the UART manually avoid the auto calculation stuff on PIC32 in FC

Re: FC8 uart speed Pic32 MX440F256H

Posted: Fri Jun 01, 2018 2:43 pm
by Benj
Hello,

What setting do you have on the peripheral divider in the configuration options?
PerClock.png
(14.63 KiB) Downloaded 2149 times

Re: FC8 uart speed Pic32 MX440F256H

Posted: Fri Jun 01, 2018 3:03 pm
by stefan.erni
Hi Ben
Here is the config options
regards
Stefan
FC8_Clockset_80MHz.PNG
(148.79 KiB) Downloaded 2142 times

Re: FC8 uart speed Pic32 MX440F256H

Posted: Fri Jun 01, 2018 3:45 pm
by stefan.erni
Hi Ben

If I change the settings like in the picture then it's ok

regards

Stefan
FC8_Clockset_80MHz_version2.PNG
(149.82 KiB) Downloaded 2139 times
FC8_Clockset_Diagramm.PNG
(172.68 KiB) Downloaded 2139 times

Re: FC8 uart speed Pic32 MX440F256H

Posted: Fri Jun 01, 2018 3:51 pm
by Benj
Many thanks,

Can you try setting the peripheral clock to /2 and see if it solves the speed issue on the UART.

Regarding the SPI rate, there is likely a cap on how fast this can reliably run, a 50MHz clock is likely a massive source of EM noise and capacitance will likely have a big impact on this running correctly.

Whoops you beat me to it :D Glad you have it running correctly now.

Re: FC8 uart speed Pic32 MX440F256H

Posted: Tue Jun 05, 2018 3:43 pm
by stefan.erni
Hi Ben

I controled the time of the IRQ and delay.
For the IRQ I choosed 4kHz and it's 4kHz
the delay I choosed 1Sek and it's 500mSek

The Uart is ok.

Is there a magic trick that all the time and speed are ok?
If not, how should I proceed?

regards

Stefan

Re: FC8 uart speed Pic32 MX440F256H

Posted: Wed Jun 06, 2018 4:04 pm
by Benj
Hello Stefan,

Right please set the peripheral clock divider back to /1, run the check for updates to get the latest definition file and restart Flowcode once you have downloaded the update. Hopefully this will allow delays, timers and UART baud to be correct. Just checked on a 32MX250F128B device and all working well so fingers crossed.

Re: FC8 uart speed Pic32 MX440F256H

Posted: Thu Jun 07, 2018 11:13 am
by stefan.erni
Hi Ben

With FC8 make update pleasure. I can see what is being updated and I just have to press OK
I do not have to unzip ...
I have tested the MX440F256H and Delay, Uart and IRQ speed is correct now.
Soon I will test the Pic32MZ2048
Also, I test the speed of SPI, I2C, Delay, IRQ and Uart
and if it is ok i will post settings and results here.

regards

Stefan

Re: FC8 uart speed Pic32 MX440F256H

Posted: Mon Jun 11, 2018 4:10 pm
by stefan.erni
Hi Ben

I tested the speed on Pic32MZ2048
at first the good news.....
The SPI Hardware is fast..... Fosz/2 is 50MHz perfect! Thats what I need for the SD-card
The delay and the IRQ timing looks also correct.
scope_0.png
(20.58 KiB) Downloaded 2044 times
What ever I did, the I2C is not working. the program hang in the PIC if I transmit a Byte, even if I use hard or software I2C. (But the IRQ is still working) and the simulation is ok .


The uart hardware is halfspeed what I choosed in FC. (in the PIC MX440 it was ok, I check it again....)
but with the uart software, the speed is correct.


regards


Stefan