Switching between UART1 and UART2


#1

Hi all,

I have an external device(processor) connected to the Wismo on UART1.
Now this processor sends debug information to the UART which is UART1 of the Wismo. What I want to do is capture this debug information and send it to the UART2 of the Wismo so that user can read this.
if the processor sends teh debug information it will starts with “***”.

I think there is mechanism to switch between the UARTs ?
But what is this time of switching and when I have switched to UART2 and what if I receive data on UART1 will it be buffered or lost ??

Thanks for any reply,
-Jiten


#2

Hi Jiten,

I don’t think you need switch between UARTs. You should be able to use them at the same time. You would subscribe two flows, one for UART1, the other for UART2. Then you have handler and data callback funtions for each UART and when you receive data in the UART2 handler you can send it to UART1 using adl_fcmSendData(). (No data should be lost…)

Hope this helps,
Jan


#3

Hi Jan/All,

What I did is enabled the UART2 of the Wismo and connected a serial data capture on the UART2 with baud 4800 and I started receiving GPS data as below:

$GPGSV,1,1,00*79
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53
$GPGGA,,,,,,0,0,99.99,,,,,,*78
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30

Searching through the documents I found WGPSM command which is GPS controller management. So I disabled it by

at+wgpsm=0,0

Now the frames were not send by the Wismo.

But whenever I send a AT command to the UART2 I donot receive any response !
Am I missing some more configuration or something is to be activated ??

Thanks,
-Jiten.


#4

Hi,

when you are receiving GPS data, I assume your UART2 is in data mode. In this mode you can not send AT commands, because your application will receive everything as data and does not do AT command processing…

Best Regards,
Jan


#5

Hello,

I think Jiten uses q2501, before you can use the Uart2 make sure the internal gps is in external mode. ( AT+WGPSCONF=0,0) After then,you can activate Uart 2 with AT+WMFM=0,1,2 from Uart1 on OS 6.51.

tom