{"id":6193,"date":"2024-08-16T11:01:01","date_gmt":"2024-08-16T03:01:01","guid":{"rendered":""},"modified":"2024-08-16T11:01:01","modified_gmt":"2024-08-16T03:01:01","slug":"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART","status":"publish","type":"post","link":"https:\/\/mushiming.com\/6193.html","title":{"rendered":"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART"},"content":{"rendered":"
\n  zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART<\/span>\n<\/div>\n
\n

                              \u4f5c\u8005\uff1a\u5362\u6d69  <\/span><\/p>\n

                                     \u65f6\u95f4\uff1a2017.2.13<\/span><\/p>\n

                                    \u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904<\/span><\/p>\n

                                                                 \u5d4c\u5165\u5f0f\u7231\u597d\u8005\u5f00\u53d1\u7fa4\uff1a<\/span><\/p>\n

\u57fa\u4e8e\u4e0a\u4e00\u7bc7AXI GPIO\u7684\u8bbe\u8ba1\uff0c\u6211\u4eec\u8fdb\u884cUART\u7684\u6269\u5c55\uff0c\u6253\u5f00vivado\u5de5\u7a0b\uff0c\u6dfb\u52a0UART IP\uff0c\u5728zynq\u4e0a\u6253\u5f00IRQ_F2P\u7684\u4e2d\u65ad\uff0c\u5982\u56fe\uff1a<\/span><\/p>\n

\"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART
<\/span><\/p>\n

\u7136\u540e\u628a\u4e2d\u65ad\u8fde\u63a5\u4e0a\uff0c\u70b9\u51fb\u81ea\u52a8\u8fde\u63a5\uff0c\u751f\u6210\u5982\u56fe\uff1a<\/span><\/p>\n

\"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART
<\/span><\/p>\n

\u7136\u540eRun Implementation.<\/span><\/p>\n

\u7136\u540e\u8fdb\u884c\u7ea6\u675f\u8bbe\u8ba1\uff0c\u5982\u56fe\uff1a<\/span><\/p>\n

\"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART
<\/span><\/p>\n

\u6211\u9009\u62e9\u7684\u662fJA\u5ea7\u5b50\u4e0a\u7684JA1\u548cJA7\u4e24\u4e2a\u5f15\u811a\u6765\u505aUART\u7684RX TX\uff0c\u5bf9\u5e94\u5904\u7406\u5668\u7684Y11 AB11\u5f15\u811a\uff0c\u90fd\u662fbank13\u7684\u5f15\u811a\u3002<\/span><\/p>\n

\u5982\u56fe\uff1a<\/span><\/p>\n

\"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART
<\/span><\/p>\n

\u63a5\u4e0b\u6765\u751f\u6210BIT\u6587\u4ef6\u3002\u7136\u540eexport hardware\uff0claunck sdk\uff0c\u6b65\u9aa4\u548c\u4e0a\u4e00\u7bc7AXI GPIO\u5dee\u4e0d\u591a\uff0c\u4f46\u662f\u8fd8\u662f\u6709\u51e0\u4e2a\u6ce8\u610f\u70b9\u7684\uff0c\u6211\u4eec\u7ee7\u7eed\u5f80\u4e0b\u505a\u3002<\/span><\/p>\n

\u6253\u5f00SDK\u540e\uff0c\u751f\u6210FSBL\u6587\u4ef6\uff0c\u8f93\u51fa\u4e32\u53e3\u914d\u7f6e\u4e00\u5b9a\u4e0d\u80fd\u9519\uff0c\u5982\u56fe\uff1a<\/span><\/p>\n

\"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART
<\/span><\/p>\n

\u53e6\u5916\u5728dts\u91cc\u9762\u4e5f\u4e0d\u80fd\u914d\u7f6e\u9519\u3002<\/span><\/p>\n

\u6211\u4eec\u53ef\u4ee5\u770bsdk\u751f\u6210\u7684pl.dtsi\u6587\u4ef6\uff0c\u5982\u56fe\uff1a<\/span><\/p>\n

\"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UART
<\/span><\/p>\n

\u53ef\u4ee5\u770b\u5230PL\u6269\u5c55\u7684UART\u7684DTS\u63cf\u8ff0\u4fe1\u606f\u3002<\/span><\/p>\n

<\/span>axi_uartlite_0: serial@42c00000 {
\n
<\/span>clock-names = \"ref_clk\";
<\/span>clocks = <&clkc 0>;
<\/span>compatible = \"xlnx,xps-uartlite-1.00.a\";
<\/span>current-speed = <>;
<\/span>device_type = \"serial\";
<\/span>interrupt-parent = <&intc>;
<\/span>interrupts = <0 29 1>;
<\/span>port-number = <1>;
<\/span>reg = <0x42c00000 0x10000>;
<\/span>xlnx,baudrate = <0x2580>;
<\/span>xlnx,data-bits = <0x8>;
<\/span>xlnx,odd-parity = <0x0>;
<\/span>xlnx,s-axi-aclk-freq-hz-d = <0x64>;
<\/span>xlnx,use-parity = <0x0>;
<\/span>};
<\/span><\/p>\n

\u53e6\u5916\u6709\u4e00\u4e2a\u91cd\u8981\u70b9\u5c31\u662f\u8bb0\u5f97\u5185\u6838\u914d\u7f6e\u9700\u8981\u6dfb\u52a0axi uart\u7684\u652f\u6301<\/span><\/p>\n

<\/span><\/p>\n

make menuconfig ---> Device Drivers ---> Character devices ---> Serial drivers ---> Xilinx uartlite serial port support<\/pre>\n
# integrate into the kernel CONFIG_SERIAL_UARTLITE=y # build as loadable module CONFIG_SERIAL_UARTLITE=m<\/pre>\n

<\/p>\n

\u7f16\u8bd1\u8fdb\u5185\u6838\u8fd8\u662f\u5185\u6838\u6a21\u5757\uff0c\u7528\u6237\u81ea\u5df1\u9009\u62e9\u3002<\/span><\/p>\n

\u6211\u4eec\u628a\u987a\u5e8f\u7406\u4e00\u4e0b\uff0c1.\u7528vivado\u751f\u6210bit\u6587\u4ef6\uff1b2.\u5728sdk\u91cc\u9762\u751f\u6210fsbl\u6587\u4ef6;3.\u5408\u6210BOOT.bin\u6587\u4ef6\uff1b4.\u751f\u6210dtb\u6587\u4ef6\uff1b5.\u751f\u6210uImage\u6587\u4ef6<\/span><\/p>\n

\u7136\u540e\u53ef\u4ee5\u653e\u5728sd\u5361\u91cc\u9762\u542f\u52a8\u3002<\/span><\/p>\n

\u5728linux\u542f\u52a8\u4fe1\u606f\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u8fd9\u6837\u4e00\u53e5\u6253\u5370\u4fe1\u606f\uff1a<\/span><\/p>\n

42c00000.serial: ttyUL1 at MMIO 0x42c00000 (irq = 165, base_baud = 0) is a uartlite
<\/span><\/p>\n

\u8fd9\u5c31\u662fPL\u6269\u5c55\u7684UART\u3002<\/span><\/p>\n

\u5728linux\u4e0b\u53ef\u4ee5\u4f5c\u4e3a\u6807\u51c6\u4e32\u53e3\u4f7f\u7528\uff0c\u7528\u6237\u53ef\u4ee5\u77ed\u63a5TX RX\uff0c\u7136\u540e\u6d4b\u8bd5\u4e00\u4e0b\u6536\u53d1\u3002<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"zynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b\u63a7\u5236PL\u6269\u5c55\u7684UARTzynq-7000\u7cfb\u5217\u57fa\u4e8ezynq-zed\u7684vivado\u521d\u6b65\u8bbe\u8ba1\u4e4blinux\u4e0b...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6193"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=6193"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6193\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=6193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=6193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=6193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}