Page 1 of 1
32mZ UART Flow Control Pin Selection
Posted: Sun Oct 30, 2016 12:10 pm
by Brendan
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
Re: 32mZ UART Flow Control Pin Selection
Posted: Mon Oct 31, 2016 1:00 am
by kersing
Hi Brendan,
Please check
this message from Ben with regards to flow control.
Best regards,
Jac
Re: 32mZ UART Flow Control Pin Selection
Posted: Mon Oct 31, 2016 2:54 am
by Brendan
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
Re: 32mZ UART Flow Control Pin Selection
Posted: Mon Oct 31, 2016 11:38 am
by Benj
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.
Re: 32mZ UART Flow Control Pin Selection
Posted: Tue Nov 01, 2016 10:53 am
by Brendan
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