Hi,
I have installed the latest version of FC and have noticed that delay macro works ok now . To get the UART to work correctly at a given baud rate the peripheral clock divisor needs to be set to /4. In doing this, having a timed interrupt that is also driven from the peripheral clock source, it will roll over at half the desired frequency.
To avoid having to use fiddle factors, should it be set so that with the peripheral clock divisor set to 1, a given baud rate selected will transmit at that rate and also the rollover frequency of the timed interrupt to occur at the rate set in the properties for the timed interrupt? I have not had time to test other functions such as CAN or PWM etc but would they be affected in the same manner?
Any help in getting this resolved would be hugely appreciated.
Thanks
PIC32mx270f256b timing issues unresolved - [Solved]
Moderator: Benj
- 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: PIC32mx270f256b timing issues unresolved
Hi Zane,
Please can you try this updated CAL file to see if it fixes the baud problems with a peripheral divisor of 1.
The file needs to be placed into your "Flowcode 7/CAL/PIC32BIT" folder.
Let us know how you get on.
Please can you try this updated CAL file to see if it fixes the baud problems with a peripheral divisor of 1.
The file needs to be placed into your "Flowcode 7/CAL/PIC32BIT" folder.
Let us know how you get on.
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
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: PIC32mx270f256b timing issues unresolved
Hi Ben,
I have installed the updated CAL file and with the peripheral clock divisor set to 1 the UART transmits data at the correct rate .
Thanks
I have installed the updated CAL file and with the peripheral clock divisor set to 1 the UART transmits data at the correct rate .
Now the timed interrupt will roll over at 2 x the desired frequency.To get the UART to work correctly at a given baud rate the peripheral clock divisor needs to be set to /4. In doing this, having a timed interrupt that is also driven from the peripheral clock source, it will roll over at half the desired frequency.
Thanks
- 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: PIC32mx270f256b timing issues unresolved
Hi Zane,
Right I have changed the FCD now and hopefully the timer interrupt frequency should now be calculated correctly.
Simply copy the attached file into your "Flowcode 7/FCD/PIC32" folder and restart Flowcode for the changes to be loaded.
Let me know how you get on, if this works well for you then I'll roll it out to the other devices.
Right I have changed the FCD now and hopefully the timer interrupt frequency should now be calculated correctly.
Simply copy the attached file into your "Flowcode 7/FCD/PIC32" folder and restart Flowcode for the changes to be loaded.
Let me know how you get on, if this works well for you then I'll roll it out to the other devices.
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
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: PIC32mx270f256b timing issues unresolved
Hi Ben,
I have installed the FCDX file and it works . In the properties for the timer 1 interrupt the roll over frequency has changed from 150hz to 300hz.
Thanks
I have installed the FCDX file and it works . In the properties for the timer 1 interrupt the roll over frequency has changed from 150hz to 300hz.
Thanks