Work has finally progressed

xiaoxiao2021-03-06  97

// ***************************** 8/25 ************* ******************************** The serial program card, the program that can correctly read the serial port in the PC After compiling and put it on the board, you cannot read the data. The specific situation is that the write function Write () can return a predetermined byte number, and the read function read () returns 0 (returns -1 if the function is errors), Determine a few points:

1. When answering the card, the issued instructions are correct (incorrectly blocked when the correct words),

2. The wiring is correct, the serial port TTYS1 is correct, the basic read and write function call is correct,

3. The program is operating normally, but the data is not read.

4. You can basically eliminate the problem of serial port devices, because both the reader and the GPS do not read the return value, and the two programs on the PC can read the return value of the two devices,

5. You can rule out the problem of our board, because when using another group of board test, the result is the same,

6. Can basically eliminate the problem of delay, the larger latency is used, and the delay generally does not cause a success,

Now I doubt some of the settings of the serial port of the board, there is a different place with the serial port of the PC, but I don't know how to determine.

// ****************************** 8/26 ************** *****************************************

Under the efforts of everyone, finally found the problem of serial port on the board, the Linux console on the board is default to the serial port, and the written procedure is old is blocked. It turned out to have conflict with the boss (grab the serial port), I am afraid ..... then do things, change the ETC / inittab release the serial port, the program is working properly, the card reader and GPS are better (GPS still determines a suitable delay and information decomposition) .

转载请注明原文地址:https://www.9cbs.com/read-123422.html

New Post(0)