Uart data corrupt if working with Qt Qml on Allwinner A20 legacy kernel
-
Hi and welcome to devnet,
Did you check that you are setting up your serial port correctly ?
How do you know whether you got all data ? -
Hi and welcome to devnet,
Did you check that you are setting up your serial port correctly ?
How do you know whether you got all data ? -
How are you setting up the QSerialPort you are using for your application ?
-
You should also check that setBaudRate is successful.
Then are you using in your port in the main thread ? If so, you should move its handling in its own thread.
-
You should also check that setBaudRate is successful.
Then are you using in your port in the main thread ? If so, you should move its handling in its own thread.
@SGaist
baud is correct, i can see it with logic analyzer
i have made new class inherit from QSerialPort and thenQThread *serialThread = new QThread(); mySerialClass = new MySerialClass(); mySerialClass->moveToThread(serialThread); serialThread->start(); serialThread->setPriority(QThread::TimeCriticalPriority);
-
I didn't imply that the value was wrong, setBaudRate returns a boolean, that's the return value I suggested to check.
-
I didn't imply that the value was wrong, setBaudRate returns a boolean, that's the return value I suggested to check.
-
Nice !
In that case, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)