PIC32 Bit Timings and Peripheral Issues

An area to discuss 32-bit PIC specific problems and examples

Moderator: Benj

User avatar
Benj
Matrix Staff
Posts: 13983
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4247 times
Been thanked: 4008 times
Contact:

PIC32 Bit Timings and Peripheral Issues

Postby Benj » Thu May 18, 2017 12:19 pm

Hello,

Right we've had a few reports of delays and other peripherals not quite acting correctly on the PIC32 hardware.

I have purchased a range of chips and have been playing with the various reports.

If we could try and get all the problems covered here in this topic then hopefully we can get them all fixed and working.

Ok so I have started with the MX range of chips.

Here are my config settings and performing a 1 second flasher program I get 1 second delays.

PIC32Config.jpg
PIC32Config.jpg (120.66 KiB) Viewed 1405 times


Firstly here is a new UART CAL which fixes the baud rate problem for the MX family when using a divide by 1 peripheral clock divisor.

PIC32BIT_CAL_UART.c
(22.97 KiB) Downloaded 63 times


At the moment I am investigating the timer interrupts as there are reports that these are currently generating incorrect frequencies.
These users thanked the author Benj for the post (total 2):
QMESAR (Sat May 20, 2017 3:38 pm) • Zane (Tue May 30, 2017 3:26 pm)
Rating: 11.76%
 

User avatar
Benj
Matrix Staff
Posts: 13983
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4247 times
Been thanked: 4008 times
Contact:

Re: PIC32 Bit Timings and Peripheral Issues

Postby Benj » Thu May 18, 2017 12:53 pm

Ok with the attached updated definitions all of the timer interrupt frequency issues should now be resolved in the MX family.

Simply extract the attached archive into your "Flowcode 7/FCD/PIC32" folder and restart Flowcode.

PIC32.zip
(715.82 KiB) Downloaded 68 times


I'm investigating other features now such as the I2C, PWM and SPI clock rates but if you're aware of another PIC32 issue then please let me know and I will investigate for you.

Edit: PWM looks ok on hardware using the latest definition files though the simulation of the duty looks wrong.

This latest PWM component should fix the simulation duty issue.

PWM.fcpx
(7.98 KiB) Downloaded 54 times
These users thanked the author Benj for the post (total 2):
QMESAR (Sat May 20, 2017 3:38 pm) • Zane (Tue May 30, 2017 3:26 pm)
Rating: 11.76%