Hello,
I have the serial driver implemented for uart1 on an LPC1778 and the device I'm trying to communicate with has an API with RTS flowcontrol enabled by default.
My pin configs are set for RTS and CTS and using a scope I can see my data when I transmit, but I get no response from the other device.
Using TRACE32 (lauterback) if I manually enable RTSEN in the MCR register then everything works. I transmit and the other device responds.
I can't find where to configure the MCR register via the serial drivers. Is this possible?
thanks,
Ryan
LPC17xx Serial enabling RTS
Re: LPC17xx Serial enabling RTS
I was noticing that in LPC17xx.h MCR is defined in the structure definition for UART0
But MCR is not defined in UART structure definition and has RESERVED0 between LCR and LSR. Can I add MCR here so I can configure it then?
But MCR is not defined in UART structure definition and has RESERVED0 between LCR and LSR. Can I add MCR here so I can configure it then?
Re: LPC17xx Serial enabling RTS
Got it working.
I added the highlighted line in serial_lld.c and it enables the RTSEN bit.
#if LPC17xx_SERIAL_USE_UART1
if (&SD2 == sdp) {
div = LPC17xx_SERIAL_UART1_PCLK / (config->sc_speed << 4);
LPC_UART1->MCR |= 0x40;
}
#endif
I added the highlighted line in serial_lld.c and it enables the RTSEN bit.
#if LPC17xx_SERIAL_USE_UART1
if (&SD2 == sdp) {
div = LPC17xx_SERIAL_UART1_PCLK / (config->sc_speed << 4);
LPC_UART1->MCR |= 0x40;
}
#endif
- Giovanni
- Site Admin
- Posts: 14565
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1112 times
- Been thanked: 937 times
- Contact:
Re: LPC17xx Serial enabling RTS
Hi,
Thanks for the code, sadly the LPC ports are currently not maintained, the person handling it left the team. Support has been discontinued after 2.6.x.
Giovanni
Thanks for the code, sadly the LPC ports are currently not maintained, the person handling it left the team. Support has been discontinued after 2.6.x.
Giovanni
Who is online
Users browsing this forum: No registered users and 2 guests