国产欧美精品一区二区,中文字幕专区在线亚洲,国产精品美女网站在线观看,艾秋果冻传媒2021精品,在线免费一区二区,久久久久久青草大香综合精品,日韩美aaa特级毛片,欧美成人精品午夜免费影视

一種串口中斷數據幀拼接現象處理研究
DOI:
CSTR:
作者:
作者單位:

航天江南集團有限公司

作者簡(jiǎn)介:

通訊作者:

中圖分類(lèi)號:

基金項目:


Research and Processing of Serial Interrupt Data Frame Splicing
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 圖/表
  • |
  • 訪(fǎng)問(wèn)統計
  • |
  • 參考文獻
  • |
  • 相似文獻
  • |
  • 引證文獻
  • |
  • 資源附件
  • |
  • 文章評論
    摘要:

    在某型以FPGA+C8051單片機架構的控制模塊內,采用串行通信總線(xiàn)RS232實(shí)現FPGA與單片機之間的數據交互。為實(shí)現單片機因外部高優(yōu)先級的中斷觸發(fā)串口接收中斷關(guān)閉,導致串口接收再次打開(kāi)后,出現數據幀錯位、數據幀拼接現象的異常問(wèn)題的解決方案。對單片機接收一幀完整的數據幀時(shí)長(cháng)、接收一幀數據的處理機制、接收數據幀拼接的機制等進(jìn)行研究處理,并在程序內設置監測點(diǎn)對串口數據幀被外部中斷觸發(fā)中斷的關(guān)閉時(shí)長(cháng)、中斷發(fā)生的頻次等進(jìn)行監測; 證實(shí)了本次串口數據幀拼接、數據幀錯誤問(wèn)題引起的因素為單片機串口接收開(kāi)啟后,受到外部高優(yōu)先級中斷觸發(fā)串口中斷關(guān)閉,在執行高優(yōu)先級中斷的同時(shí),FPGA控制軟件端并未停止串口數據幀的發(fā)送,在單片機串口中斷重新開(kāi)啟后,新的串口數據幀與單片機關(guān)閉中斷前接收的部分數據幀進(jìn)行拼接,出現數據幀拼接異常現象;且在拼接數據幀中含有與通信協(xié)議中數據幀幀尾一致的數據時(shí),該幀數據就會(huì )被判讀為正常數據幀,從而出現數據解析時(shí),數據幀有拼接、錯位的異常問(wèn)題。采用在通信數據錯位異常的軟件中增加監測信號及相應的測試用例對串口接收中斷關(guān)閉時(shí)間捕獲,實(shí)現了對串口數據幀拼接的結果分析和試驗驗證。對通信數據錯位異常采取減小串口中斷關(guān)閉時(shí)間等更改措施后,確保了串口數據幀接收時(shí),因串口關(guān)閉時(shí)間過(guò)長(cháng)而導致的通信數據數據拼接、錯位的異常現象。有效地解決了因串口關(guān)閉時(shí)間過(guò)長(cháng)帶了的數據拼接問(wèn)題,保證了該控制模塊的FPGA與單片機之間通信數據的正常。

    Abstract:

    In a certain type of control module based on FPGA + C8051 single-chip microcomputer architecture, serial communication bus RS232 is used to realize data interaction between FPGA and single-chip microcomputer. In order to realize the abnormal solution of the single-chip computer due to the external high-priority interrupt triggering the serial port receiving interrupt to close, resulting in the serial port receiving being opened again, the data frame is misaligned and the data frame is spliced. Research and process the duration of a complete data frame received by the microcontroller, the processing mechanism of receiving a frame of data, the mechanism of receiving data frames, etc., and set the monitoring point in the program to close the serial data frame by an external interrupt. The frequency of interrupt occurrence is monitored; it is confirmed that the factors caused by this serial data frame splicing and data frame error problem are that after the serial port reception of the microcontroller is turned on, the external high-priority interrupt is triggered to close the serial port interrupt. The FPGA control software does not stop the serial data frame transmission. After the serial port interruption of the microcontroller is restarted, the new serial data frame is spliced ??with some of the data frames received before the interruption of the microcontroller is turned off. When the data frame contains data that is consistent with the end of the data frame in the communication protocol, the frame data will be interpreted as a normal data frame, so that there is an abnormal problem of splicing and misalignment during data analysis. The monitoring signal and the corresponding test case are added to the software with abnormal communication data misalignment to capture the serial port interruption off time capture, and the result analysis and experimental verification of the serial data frame splicing are realized. After taking measures such as reducing the serial port interruption closing time for the abnormal communication data misplacement, it ensures the abnormal phenomenon of splicing and misalignment of the communication data caused by the serial port closing time when the serial data frame is received. It effectively solves the problem of data splicing caused by the serial port closing time being too long, and ensures the normal communication data between the FPGA and the single chip of the control module.

    參考文獻
    相似文獻
    引證文獻
引用本文

劉超,張永龍.一種串口中斷數據幀拼接現象處理研究計算機測量與控制[J].,2020,28(8):203-210.

復制
分享
文章指標
  • 點(diǎn)擊次數:
  • 下載次數:
  • HTML閱讀次數:
  • 引用次數:
歷史
  • 收稿日期:2020-04-26
  • 最后修改日期:2020-06-03
  • 錄用日期:2020-06-04
  • 在線(xiàn)發(fā)布日期: 2020-08-13
  • 出版日期:
文章二維碼
武陟县| 宁强县| 宜兰市| 和硕县| 湖北省| 泸西县| 奎屯市| 天水市| 孟津县| 南澳县| 健康| 诏安县| 洪洞县| 丰都县| 三门县| 中山市| 隆子县| 清徐县| 尚义县| 阿鲁科尔沁旗| 北辰区| 桓仁| 达拉特旗| 隆尧县| 南投市| 工布江达县| 德庆县| 赤城县| 信宜市| 固原市| 五原县| 宁南县| 松阳县| 玉龙| 大关县| 晋江市| 那坡县| 河西区| 望奎县| 萍乡市| 潞城市|