树莓派 bcm2835 串口说明

来源于BCM2835 arm外设文档13章 UART

BCM2835设备有两个串口,一个mini UART一个PL011 UART。本章是PL011串口。

PL011 UART是通用异步接收发送器。这个UART在从外设或者猫接收数据方面实现串行到并行的转换。在从APB(高级外设总线)接受数据方面实现了并行到串行的功能。

这个ARM PL011 UART有可能包含某些功能,也可能丢掉了某些功能。

下列功能是不支持的

1 红外数据关联

2串口红外协议编解码

3DMA (直接内存访问)


UART提供以下内容:

1独立的16*8 传输 和16*12接收的FIFO内存。

2可编程的波特率发生器

3标准的异步交流比特位(开始,停止)这些是数据传输前需要添加的和数据接收后需要移除的。

4错误起始位检测

5

6支持调制控制功能的CTS和RTS,不支持DCD DSR DTR 和RI

7可编程的硬件流控制

8完全可编程的串口接口特性

  数据可以是 5 6 7或者8bit

  奇偶bit产生和校验

  1或者2bit停止位产生

  波特率产生,最高的频率是UARTCLK/16


串口的时钟源和相关的比例因子通过时钟管理器来控制

如果想要彻底了解,请参考ARM PrimeCell UART (PL011)版本 rlp5 Technical Reference Manual

13.1 16c650串口变量

来自工业标准的16c650串口设备的UART变量如下。

FIFO接收触发级别是1/8 1/4 1/2 3/4 和7/8

FIFO传输触发级别是1/8 1/4 1/2 3/4 和7/8

内部的寄存器映射地址空间和bit功能位每个寄存器是不同的。


下面的的16C650串口特性是不支持的

1.5停止bit

独立的接收时钟


13.2 关键的串口输入和输出。

未完待续


串行通信IP核 用于FPGA -- File Name: Baud_rate_generator.vhd -- Function: Baud rate generator for uart communication -- System clock:32MHz -- ************************************************************ -- 7.2 Build 11/02/2009 Full Version 1.0 -- Copyright for limang -- ************************************************************ library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; -- ************************************************************ -- Port Description -- clk: System clock -- data: Decision the Baud rate -- uart_clk: Clock output for uart -- ************************************************************ entity Baud_rate_generator is port ( clk:in std_logic; data:in std_logic_vector (3 downto 0); uart_clk:out std_logic ); end entity Baud_rate_generator; --*********************** -- Baud_rate for input --*********************** --| data | Baud_rate | --| 0000 | 1200 | --| 0001 | 2400 | --| 0010 | 4800 | --| 0011 | 9600 | --| 0100 | 14400 | --| 0101 | 19200 | --| 0110 | 28800 | --| 0111 | 38400 | --| 1000 | 57600 | --| 1001 | 115200 | --|others| for updata | --*********************** architecture behave of Baud_rate_generator is constant system_clock:integer:=32e6; signal divisor:integer range 4444 downto 46; signal cnt:integer range 4444 downto 0:=0; signal clk_tmp:std_logic; begin process(data) begin case data is when "0000" => divisor divisor divisor divisor divisor divisor divisor divisor divisor divisor null; end case; end process; process(clk) begin if clk'event and clk='1' then cnt<=cnt
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值