32mZ UART Flow Control Pin Selection

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

Moderator: Benj

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

32mZ UART Flow Control Pin Selection

Postby Brendan » Sun Oct 30, 2016 12:10 pm

Merely an observation for a future FC7 tweak...

Working with PIC32MZ devices and hardware UART, TxD and RxD mappings are correct for the channels selected, but we observed that FC7 permits arbitrary selection of flow control pins which aren't appropriate when using hardware channels.

A review of the datasheet reveals designated flow control pins for each channel so not an insurmountable problem before a fix, though thought I'd mention this as it can cause a bit of head-scratching for a while - just don't ask me why I say this :)


All the best,

Brendan

kersing
Valued Contributor
Valued Contributor
Posts: 1907
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 552 times
Been thanked: 1064 times
Contact:

Re: 32mZ UART Flow Control Pin Selection

Postby kersing » Mon Oct 31, 2016 1:00 am

Hi Brendan,

Please check this message from Ben with regards to flow control.

Best regards,

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

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

Re: 32mZ UART Flow Control Pin Selection

Postby Brendan » Mon Oct 31, 2016 2:54 am

Hi Jac.

Thanks for the link, which suggests that as most chips don't support hardware flow control then the software implementation will work regardless.

Regrettably however, this was not our experience with the 32MZ. After an engineer selected pins for flow control in FC7, and spending considerable time exploring why it wasn't working, the data sheet was reviewed and flow control pins were electrically reassigned to specified pins supported by hardware channels of the PIC. Only then did UART start working.

Best regards,

Brendan

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

Re: 32mZ UART Flow Control Pin Selection

Postby Benj » Mon Oct 31, 2016 11:38 am

Hi Brendan,

That's interesting I wonder if the hardware flow control pins are being enabled somehow. Which specific chip are you using and I will investigate to make sure these are switched off.

Also are you using the chip with a bootloader? Just in case it is maybe the bootloader that is switching on the hardware flow control.
These users thanked the author Benj for the post:
Brendan (Tue Nov 01, 2016 10:03 am)
Rating: 5%
 

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

Re: 32mZ UART Flow Control Pin Selection

Postby Brendan » Tue Nov 01, 2016 10:53 am

Hi Ben.

The device concerned is PIC32MZ2048EFG144, and no bootloader.

It's a bit of a handful, and we're progressively getting to know it better, though appears to set itself apart in the way you have to configure and use it. Other things seem not to make sense, such as growing silicon errata (the 'fix' for primary and secondary oscillators, not working as crystal clocks, being not to use them was amusing), and configured/enabled ADC's still returning noise (still investigating that). One of the ICSP pins was also mapped as UART RxD but refused to work as such, so we moved it and all was well.

To resolve the flow control issue it was a matter of using the specified pins for the chosen UART block, and affirming flow control pin selections in FC7. I don't believe we attempted to preset registers to disable hardware flow control as we'd expected the choice to be arbitrarily selectable (as per your separate post), until we discovered this behaviour.

Of-course I'm unable to rule out pin-specific weirdness and bad luck in choice (similar to the RxD issue above), though I'd generally recommend anyone using flow control on the PIC32MZ to stick with pins designated by datasheet when using hardware blocks if they can to minimise potential for issues.

Probably just the hallmarks of early silicon, unless you should highlight an oversight Ben :)

Best regards,

Brendan
These users thanked the author Brendan for the post:
Benj (Tue Nov 01, 2016 2:56 pm)
Rating: 5%