McBSP接收设置与例程--5502

news/2025/2/16 4:55:45/

一、接收的配置流程

1.       Global behavior:

设置管脚和工作模式

          Set the receiver pins to operate as McBSP pins

          Enable/disable the digital loopback mode   回环模式

          Enable/disable the clock stop mode 时钟停止模式

          Enable/disable the receive multichannel selection mode 多通道

2.       Data behavior:

          Choose one or two phases for the receive frame 接受帧单段还是双段

          Set the receive word length(s)  接收字长

          Set the receive frame length 

          Enable/disable the receive frame-sync ignore function

          Set the receive companding mode

          Set the receive data delay

          Set the receive sign-extension and justification mode 数据符号扩展和校验

          Set the receive interrupt mode

3.       Frame-sync behavior:

          Set the receive frame-sync mode

          Set the receive frame-sync polarity

          Set the SRG frame-sync period and pulse width

4.       Clock behavior:

          Set the receive clock mode

          Set the receive clock polarity

          Set the SRG clock divide-down value

          Set the SRG clock synchronization mode

          Set the SRG clock mode [choose an input clock]

          Set the SRG input clock polarity

 

 

二、寄存器配置

        接收时需要配置的寄存器: SPCR1, SPCR2, PCR, RCR1, RCR2SRGR1, SRGR2 ,其他的可以设为default

        下面是一个我的调试配置参数,所有时钟和帧同步都由外部提供

 

注意的几点:

1.  configure RRST XRST 一定要设置为Disable,才可以正确的配置他的各个寄存器

2. 5502 不支持 CLKG的同步  SRGR2中的 GSYNC bit 始终写为 0

使用时如下步骤:

 

IRQ_globalDisable();

hMcbsp = MCBSP_open(MCBSP_PORT1, MCBSP_OPEN_RESET);

rcvEventID = MCBSP_getRcvEventId(hMcbsp);

IRQ_setVecs((Uint32)(&VECSTART));

IRQ_clear(rcvEventID);

IRQ_plug(rcvEventID, &readISR);

MCBSP_config(hMcbsp, &MCBSP_READONLY_Config_ _test);

IRQ_enable(rcvEventID);

/* Start Sample Rate Generator and Frame Sync */

MCBSP_start(hMcbsp,MCBSP_SRGR_START | MCBSP_SRGR_FRAMESYNC,0x300);  //如果需要

/* Enable MCBSP transmit and receive */

MCBSP_start(hMcbsp,  MCBSP_RCV_START ,  0);

IRQ_globalEnable();

 

 

 

三、测试例程

 

下面是我的一个测试程序,可以正确接受数据:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


http://www.ppmy.cn/news/344555.html

相关文章

前端 框架 Vue笔试题

第1天 1. Error compiling template: 答: HTML模板中语法写错了 2. Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id"{{ val }}">, use <div :id"val">. …

戴尔灵越/成就 5402/5502 最新十一代处理器重装系统过程中无法识别硬盘解决方案

戴尔灵越/成就 5402/5502 最新十一代处理器如何重装系统&#xff0c;如何解决安装过程中无法识别硬盘&#xff1f;&#xff1f;&#xff1f; 相信大家最近遇到过&#xff0c;十一代的笔记本重装系统是在选择硬盘是显示没有驱动器&#xff0c;如下图所示&#xff1a; BIOS下能…

HTTPS 原理浅析及其在 Android 中的使用

1.HTTP协议的不足 HTTP1.x在传输数据时&#xff0c;所有传输的内容都是明文&#xff0c;客户端和服务器端都无法验证对方的身份&#xff0c;存在的问题如下&#xff1a; 通信使用明文(不加密)&#xff0c;内容可能会被窃听&#xff1b;不验证通信方的身份&#xff0c;有可能遭…

实验篇(7.2) 11. 创建点对点安全隧道(FortiGate-IPsec) ❀ 远程访问

【简介】前面我们实验的是FortiClient客户端与防火墙进行VPN连接&#xff0c;现在我们要做的实验是防火墙与防火墙之间进行VPN连接。现在我们来看看两台防火墙之间要怎样创建VPN连接。 实验要求与环境 OldMei集团深圳总部部署了域服务器和ERP服务器&#xff0c;用来对集团总部进…

亚马逊、eBay新品期没有出单怎么办?自养买家号的重要性和技巧

一&#xff1a;新品期没有出单怎么办&#xff1f; 1.刚开始,低bid 调整&#xff0c;20元预算&#xff0c;让位置可以靠后点&#xff0c;因为前期跟前面比&#xff0c;比不赢&#xff0c;不如去后面比。 2.价格不是由卖家单一决定&#xff0c;而是由市场决定的。 3.切记自嗨型…

js验证银行卡号

export function checkBankno(bankno) {var lastNum bankno.substr(bankno.length - 1, 1); //取出最后一位&#xff08;与luhm进行比较&#xff09;var first15Num bankno.substr(0, bankno.length - 1); //前15或18位var newArr [];for (var i first15Num.length - 1; i …

银行/信用卡识别全代码详细注释(Python)

直接上源码&#xff0c;需要的copy&#xff0c;运行结果会在原图上打印出来&#xff0c;卡号也会在控制台上打印出来&#xff0c;注释很详细的&#xff0c;可以先看看&#xff0c;不懂的可以在下面留言&#xff0c;博主看到了会第一时间讲解的。 import numpy as np import cv…

JS校验银行卡号以及通过银行卡号自动带出所属银行信息

本文实例讲述了JS实现的获取银行卡号归属地及银行卡类型操作以及Luhn校验算法校验银行卡号算法。分享给大家供大家参考&#xff0c;具体如下&#xff1a; javascript代码如下 /*** Luhn校验算法校验银行卡号&#xff1b;Luhm校验规则&#xff1a;16位银行卡号&#xff08;19位…