FC8 uart speed Pic32 MX440F256H
Moderator: Benj
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
FC8 uart speed Pic32 MX440F256H
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
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
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: FC8 uart speed Pic32 MX440F256H
Hi All
This is an old issue that has been discussed a few time with no end result or solution )I have uploaded a few mE projects and MPLABx project in the past that shows this error in FC
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
This is an old issue that has been discussed a few time with no end result or solution )I have uploaded a few mE projects and MPLABx project in the past that shows this error in FC
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
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: FC8 uart speed Pic32 MX440F256H
Hello,
What setting do you have on the peripheral divider in the configuration options?
What setting do you have on the peripheral divider in the configuration options?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: FC8 uart speed Pic32 MX440F256H
Hi Ben
If I change the settings like in the picture then it's ok
regards
Stefan
If I change the settings like in the picture then it's ok
regards
Stefan
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: FC8 uart speed Pic32 MX440F256H
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 Glad you have it running correctly now.
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 Glad you have it running correctly now.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: FC8 uart speed Pic32 MX440F256H
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: FC8 uart speed Pic32 MX440F256H
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: FC8 uart speed Pic32 MX440F256H
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
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
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: FC8 uart speed Pic32 MX440F256H
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.
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
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.
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