Hardware UART component - PIC32MZ... [Solved]

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Brendan
Posts: 222
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 136 times
Been thanked: 115 times
Contact:

Hardware UART component - PIC32MZ... [Solved]

Postby Brendan » Wed Nov 30, 2016 6:09 pm

PIC32MZ continued...

I'm sure they could make a soap opera of this chip, but a recent personal observation when attempting to enable hardware UART.
In simulation all is good, but the problem reveals itself at build time. To confirm, I'm working with PIC32MZ2048EFG144, using the latest Flowcode V7.1.1.0 and have applied the patch of 14/10/2016.

Using software UART with the UART Comms component builds fine, but not with hardware UART.

Selecting channel 1 and mapping Tx and Rx from the drop-down (personally confirmed against the datasheet that all options were valid), and regardless of whether flow control is enabled or disabled, results in the following build error...

C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c: In function 'FC_CAL_UART_Init_1':
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c:250:12: error: '__IEC0bits_t' has no member named 'U1RXIE'
IEC0bits.U1RXIE = 0;
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c:251:12: error: '__IEC0bits_t' has no member named 'U1TXIE'
IEC0bits.U1TXIE = 0;



Best regards,

Brendan
These users thanked the author Brendan for the post:
Benj (Wed Nov 30, 2016 8:55 pm)
Rating: 5%
 

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

Re: Hardware UART component - PIC32MZ...

Postby Benj » Fri Dec 02, 2016 10:56 am

Hi Brendan,

Right I think I might have this sorted now.

First you need to use our updated UART CAL file which needs to live in the "Flowcode 7/CAL/PIC32BIT" folder.

PIC32BIT_CAL_UART.c
(22.65 KiB) Downloaded 87 times


Next you need to use our updated definition file which needs to live in the "Flowcode 7/FCD/PIC32" folder.

PIC32BIT_CAL_UART.c
(22.65 KiB) Downloaded 87 times


Hopefully these should solve the problem for you, let me know how you get on.
Attachments
32MZ2048EFG144.fcdx
(77.66 KiB) Downloaded 57 times
These users thanked the author Benj for the post:
Brendan (Fri Dec 02, 2016 12:45 pm)
Rating: 5%
 

Brendan
Posts: 222
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 136 times
Been thanked: 115 times
Contact:

SOLVED: Hardware UART component - PIC32MZ...

Postby Brendan » Fri Dec 02, 2016 1:53 pm

Fantastic job !
Thanks Ben.

Following your patches I can confirm that the same project now builds without issue using hardware UART. I'm presently coding in advance of the hardware, though will try to remember to confirm physical operation when possible. Unless proven otherwise - assumed fully resolved :D

Thanks and best regards,

Brendan
These users thanked the author Brendan for the post:
Benj (Fri Dec 02, 2016 4:50 pm)
Rating: 5%