Baudrate change during data mode


#1

Dear All,

In Q24plus
I am changing baud rate of uart2 using adl_atcmdcreate() in data mode.

first time it getting changed from 300 to 4800 when it is in data mode.

next time it is not changing from 4800 to 300.
But at cmd response handler giving result OK.
Data coming on the terminal are still in 4800 baud rate not in 300 baud rate.

where is the problem please suggest?

chidu


#2

Is that allowed?


#3

When UART2 is in data mode first time it is changing from 300 to 4800 and reverse of this not happening

Yes it is in data mode


#4

Is it recommendable to change baud rate in DATA MODE?


#5

I thought not - which is why I asked you whether using adl_atcmdcreate() in data mode is allowed.

What does the ADL User Guide say?


#6

adl_atcmdcreate() is allowing first time and no errors during second time but not changing to specified baudrate.

this topic not found in ADL user guide.

What do you suggest?


#7

Oh yes it is!

Study the ADL User Guide more carefully:

Sounds clear enough to me…?


#8

Thank you Awneil i found this topic. I will do according to that.

But still my doubt is how it is allowing first time from 300 to 4800 baud rate while in data mode.


#9

The ADL User Guide tells you what is guaranteed to work; everything else is undefined behaviour - you should never rely upon undefined behaviour :exclamation:


#10

I did switching baud rate from 300 to 4800 during AT mode. Baud rate changeover is happening properly.

But my device connected is receiving OK response due to baud rate change command sent from my application and hence it is not responding to my next command in data mode treating OK as junk data.

How can i suppress this OK or modem responses on UART2 without closing UART2.

Can i use the below command will it work

adl_atCmdCreate(“AT+IPR=4800;+WMFM=0,0,2”,ADL_AT_PORT_TYPE( ADL_AT_UART2, TRUE),(adl_atRspHandler_t) atCmdRspHandler, “*”, NULL);


#11

The return value from your response handler controls whether or not the response is forwarded to the external “application” - see the ADL User Guide.


#12

Thanks a lot

it is working now after returning false from atcmdresphdlr();

But my previous condition was working in Debug mode in OpenAT IDE. May be due to timing taken by TMT in debug mode.


#13

-Edit- In my OpenAT application If i try to change buadrate during SMS reception modem restarts.

After reset init type giving result.ADL_INIT_REBOOT_FROM_EXCEPTION.

Please suggest how to come over this problem?


#14

Why OS not handling this Multi task?


#15

How do you know that the faults is in the OS?

Maybe the fault is in your application…


#16

My Application Pseudo code is like below

change baud rate to 300
Switch to Data mode
send data cmd1
receive data response 1
switch to AT mode
change baud rate to 4800
switch to data mode
send data command 2
receive data response 2
switch to AT mode
goto step 1

this will go normally when there is no incoming sms

below is the steps while incoming SMS

step1: change baud rate to 300
Switch to Data mode
send data cmd1
receive data response 1
switch to AT mode
change baud rate to 4800
SMS starts coming …
program stops here and restarts with init type exception
switch to data mode
send data command 2
receive data response 2
switch to AT mode
goto step 1

If SMS arrives at this point ie. during baud change it restarts.


#17

I am initiating each step only after respective handlers event triggers.


#18

Please have a look debug traces

We have received a

+CMTI: “SM”,1

OK

AADL_FCM_EVENT_V24_UART2_AT_MODE

TIMER OK

SMS Unsubscribe OK

changing baud rate to 300
17:17:53.727 [RX] -
+WIND: 13

+CGEV: ME CLASS “B”
17:17:54.832 [RX] -
+CGREG: 0

Global Size=12174

StackSize=3072

HeapSize=1688690

TotalSize=1703936

INSIDE APPLICATION MAIN VERSION
L&T-HT1.1-02.11.09-10:00PM


FREE MEM=130510

IDcount1=100

IDcount2=65427

Used size=502

POWER ON FLASH READ OK

ADL_INIT_REBOOT_FROM_EXCEPTION


#19

In my application i made Unsosubscribe for for +CMTI indication.

if i give baud rate change command in between the time of +CMTI indication and ADL smsdatahandler() receives SMS reset is happening.