蓝牙开发那些事之ceva controller代码解读

VIP蓝牙开发那些事之ceva controller代码解读
对比ceva的经典蓝牙和ble的controller在软件上的差异点
开通可读全文 ·1k 人阅读
最低0.47元/天 解锁文章

诸位蓝牙协议栈驯兽师,今天咱们来场《时间管理大师争霸赛》——经典蓝牙与BLE在CEVA核上的软件哲学对决!(背景切换成《黑客帝国》数字雨)

笔者接触过ceva的经典蓝牙的ip核,也接触过ble的ip核,从controller的代码结构上是完全不同的东西:

由于涉及保密,所以不能开放代码,但是蓝牙原厂的同学,估计对以下代码结构很熟悉了。

经典蓝牙的代码路径大概长这个样子:

图5-24 某款ceva经典蓝牙 ip核软件代码结构

BLE看着就简洁多了

图5-24 某款ceva ble ip核软件代码结构

4.4.1 经典蓝牙代码解读

图5-25 经典蓝牙IP模块框图

根据上面的模块结构,大概可以分为以下几个模块

transport层

位置在host和controller之间的传输层,维护相关的queue,比如hci command ,lmp in/oout,l2cap in/out queue等等

关于分包和重组,在lmp层是没有重组的,重组发生在bb层

关于传输层流控,acl和sco的流控通过hci命令使能,使能后,可以通过hci number of complete packets event通知上层,hci command目前是通过hci command complete和hci command status event来实现流控的。

lmp层

图5-26 LMP架构

介于host controller和LC layer之间,实现对connectin,inquiry,scan的管理,上层对他的调用通常是LM_前缀,peer端的调用通常是LMP_前缀,底层的调用通常是LP_前缀

lmp层的util中包含了timer

lmtimer,总体上也是以链表形式组织所有的timer,放在全局数组lm_timers中,这个结构体的是这样的:

typedef struct {

VIP 蓝牙5 低功耗蓝牙LE controller层分析 蓝牙5 LE controller 开通可读全文·9.2k 阅读·10 点赞·55 收藏 阅读全文

相关推荐

蓝牙开发那些事儿12——(记一颗BLE芯片BringUp折腾过程)

蓝牙这个系列已经很久很久没有更新了,感慨良多。现在写这篇文章主要是BringUp一颗蓝牙芯片的过程中遇到了一些奇怪的问题,想了一些办法,一一克服了,看看对其他做蓝牙的同学有没有启发。同时也安利一个叫做HACKRF的设备。借助于目前软件定义无线电的飞速发展,在定位射频类问题的时候,真的已经比以前什么手段都没有的时候快多了也方便多了,一个HACKRF的设备大概也就700多元,最后解决了困扰我数周的问题。目前这家公司是做BLE芯片的,用的CEVA的蓝牙5.2的IP核,在我来这家公司之前,蓝牙的协议栈和软件部分由深

袁赟的博客 1414

蓝牙开发那些事之btstack移植(一)

这个hci_packet_buffer_reserved,实际上设置的原因,也是上文说过的,大多数的场景,比如说串口,是一个异步的接口,所谓异步,就是指代码调用发送的时候,实际上并没有发送完。可以看到host协议栈会直接调用hci层的hci_send_2_controller的接口,其参数是通过一个叫做KE_MSG_ALLOC的函数生成的,也就是说,ceva的协议栈的hci接口传递的参数都是kernel message,一种ceva协议栈内部定义的东西。system tick的接口实现,AI完全可以做到。

袁赟的博客 989

【Bluetooth|蓝牙开发】二、蓝牙开发入门

蓝牙,是一种利用低功率无线电,支持设备短距离通信的无线电技术,能在包括移动电话、PDA、无线耳机、笔记本电脑、相关外设等众多设备之间进行无线信息交换,蓝牙工作在全球通用的2.4GHz ISM(即工业、科学、医学)频段,使用IEEE802.11协议。

Donge's Blog 1万+

嵌入式系统中的蓝牙C语言编程指南

本文还有配套的精品资源,点击获取 简介:蓝牙C语言编程是嵌入式系统中实现蓝牙通信的关键技术,广泛应用于各类智能硬件的数据传输。本文将介绍蓝牙协议栈、HCI、GATT、事件驱动编程、内存管理、错误处理、安全性、调试工具使用、开发环境配置以及代码的移植性等关键知识点。掌握这些技术能够帮助开发者构建基本的蓝牙通信程序,并根据应用场景进行优化。 1. 蓝牙通信软件开发技术...

weixin_42471823的博客 3884

BX2400_BLE_SDK_V1.6_3697.zip

BlueX发行CEVA蓝牙低功耗IP,用于BX2400可穿戴SoC 这个链接很重要->https://bxble-sdk-doc.readthedocs.io/zh_CN/latest/ Ultra-low power BX2400 IC winning global OEM customers including Huami SHANGHAI, June 27, 2018 -- Mobile World Congress – CEVA, Inc. (NASDAQ: CEVA), the leading licensor of signal processing platforms and artificial intelligence processors for smarter, connected devices, today announced that BlueX Microelectronics (Hefei) Co., Ltd. (BlueX) has licensed and deployed CEVA's RivieraWaves Bluetooth low energy technology in its new BX2400 Bluetooth® 5 compliant wireless integrated circuit (IC). Building on BlueX's deep expertise in CMOS subthreshold design, the BX2400 is an ultra-low power SoC that incorporates Bluetooth, processor, power charge and discharge management, touch and heart rate monitor. Ideally suited to applications such as personal health and fitness wearables, the BX2400 is already gaining strong traction with leading global OEMs and ODMs including Huami. Huang Wang, founder and CEO of Huami, stated: "As the world's leading wearable technology company our customers rely on us to consistently deliver leading-edge, innovative products with exceptional performance. The BlueX BX2400 SoC powered by CEVA's Bluetooth IP enables outstanding battery life and a range of compelling features and sensors, making it an ideal processor for our wearable designs." Huang Wang, founder and CEO of Huami, stated: "As the world's leading wearable technology company our customers rely on us to consistently deliver leading-edge, innovative products with exceptional performance. The BlueX BX2400 SoC powered by CEVA's Bluetooth IP enables outstanding battery life and a range of compelling features and sensors, making it an ideal processor for our wearable designs." "Product differentiation is always a challenge in such a competitive market and we set out to ensure our BX2400 IC outperforms the competition," said Hongyu Li, CEO at BlueX. "CEVA's RivieraWaves Bluetooth low energy IP has gone the extra step in low power architecture, matching our technical strengths and product aims and has proven to be the perfect choice for us." "We are delighted to announce BlueX as a licensee for our Bluetooth IP," said Aviv Malinovitch, vice president and general manager of the Connectivity Business Unit at CEVA. "The adoption of the BX2400 by Huami is a testament to the outstanding performance of their IC and we look forward to seeing their continued success with this product.""We are delighted to announce BlueX as a licensee for our Bluetooth IP," said Aviv Malinovitch, vice president and general manager of the Connectivity Business Unit at CEVA. "The adoption of the BX2400 by Huami is a testament to the outstanding performance of their IC and we look forward to seeing their continued success with this product." CEVA's RivieraWaves Bluetooth IP platforms provide comprehensive solutions for both Bluetooth LE and Bluetooth dual mode connectivity. Each platform consists of a hardware baseband controller, plus a feature-rich software protocol stack. A flexible radio interface allows the platforms to be deployed with either RivieraWaves RF or various partners' RF IP, enabling optimal selection of foundry and process node. All Bluetooth 5 features are supported, including LE 2Mbps data rate, Long Range and LE Advertising Extension. With more than 1.5 billion devices shipped to date and dozens of licensees, the RivieraWaves Bluetooth IP is widely deployed in consumer and IoT devices with many of the world's leading semiconductors companies and OEMs, including smartphones, tablets, wireless speakers, wireless headsets and earbuds, hearing aids and other wearables. For more information on RivieraWaves Bluetooth IP platforms, go to https://www.ceva-dsp.com/product/rivierawaves-bluetooth-platforms/. About BlueX BlueX Microelectronics Corp. Ltd is a fabless semiconductor company that designs, develops and markets ultra-low power wireless systems-on-chip and analog semiconductors for IoT and wearable applications. Power consumption and cost are the main focus areas of our company. Typical end-user applications are IoT, wearable devices, consumer electronics, intelligent sports equipment, wireless medical, remote control, security and toys. Our BLE product BX2400 is a System-on-Chip combining an application processor, memories, cryptography engine, power management unit, digital and analog peripherals and a MAC engine complied with Bluetooth® 5.0 and radio transceiver. Our ultra-low power analog chip BX300 is a 100nA Watch Dog IC suited for wearable and low power IOT wireless solution. More information is available at: http://www.bluexmicro.com/. About Huami Huami is a biometric and activity data-driven company with significant expertise in smart wearable technology. Since inception in 2013, Huami has quickly established its global market leadership and brand recognition with a mission to make the world more connected as transforming the way individuals connect with the Internet and with each other through smart wearable technology and data-driven innovations. Huami designs and manufactures self-branded smart wearable products under the brand "Amazfit", including the Pace, Stratos, Arc, Cor, Bip, Moonbeam and Equator. Huami is the sole partner of Xiaomi for Xiaomi wearable products, including Mi band series. Through mobile apps, Mi Fit and Amazfit, working hand in hand with the smart wearable devices, Huami provides users with a comprehensive view of their biometric and activity data and the relevant analytics. About CEVA, Inc. CEVA is the leading licensor of signal processing platforms and artificial intelligence processors for a smarter, connected world. We partner with semiconductor companies and OEMs worldwide to create power-efficient, intelligent and connected devices for a range of end markets, including mobile, consumer, automotive, industrial and IoT. Our ultra-low-power IPs for vision, audio, communications and connectivity include comprehensive DSP-based platforms for LTE/LTE-A/5G baseband processing in handsets, infrastructure and cellular IoT enabled devices, advanced imaging and computer vision for any camera-enabled device, audio/voice/speech and ultra-low power always-on/sensing applications for multiple IoT markets. For artificial intelligence, we offer a family of AI processors capable of handling the complete gamut of neural network workloads, on-device. For connectivity, we offer the industry's most widely adopted IPs for Bluetooth (low energy and dual mode) and Wi-Fi (802.11 a/b/g/n/ac/ax up to 4x4). Visit us at www.ceva-dsp.com

小米MIUI 12免REC解锁Root:Magisk Manager与Fastboot实战指南

本文详细介绍了小米MIUI 12免REC解锁Root的完整流程,涵盖Magisk Manager与Fastboot的实战操作。从解锁前的准备工作到提取boot.img、Magisk修补技巧,再到Fastboot刷入全流程,提供了常见问题解决方案和进阶优化建议,帮助用户安全高效地获取Root权限。

weixin_33698823的博客 231

宝塔面板一键部署Z-Blog博客 - 内网穿透实现公网访问

Ubuntu系统作为Linux系统的一个重要分支,既有Linux系统的轻量化、高扩展性和长时间稳定运行,也拥有Windows一样的友好图形界面,因此可以作为熟悉服务器系统的良好选择。对于笔者来说,ubuntu系统最大的用处,就是可以让家里老旧的电脑重焕生机,让本已退居二线的电脑与cpolar内网穿透软件搭配,成为私人服务器,搭建自己喜欢的各种网站。今天,笔者就为大家介绍,如何使用cpolar内网穿透+Z-blog搭建私人博客网站。

m0_74808907的博客 3149

如何制作DOS启动盘 U盘制作DOS启动盘 HP-U盘启动DOS7 详细步骤教程 Intel网卡使用软件 bootutil lanconfig eeupdate Intel网卡修改MAC地址教程

制作DOS启动盘不是一项复杂的任务,只要按照以下简单的步骤进行操作,您就可以自己动手制作一个DOS启动盘。

lcy524514826的博客 904

codesys工程ST语言学习笔记(二)写文件操作与添加库方法

ST语言文件读写功能 由于实验中需要大量的数据,文件读写比较方便,但是网上的文件读写的程序很多都用不了,小编将自己的工程发布出来

sf9090的博客 1万+

AFE芯片做什么用的?AFE(Analog Front End) 模拟前端

AFE采样精度的影响因素非常多,需要综合考虑各种因素,并根据实际应用场景来选择合适的参数和方法。通过减少噪声、提高采样频率、调节放大器增益、降低电源噪声、优化传输线路、进行温度补偿、选择合适的ADC分辨率、根据信号类型选择合适的AFE参数、进行器件匹配和校准等方法,可以提高AFE的采样精度,从而更好地满足各种应用需求。版权声明:本文为CSDN博主「czf.Forver」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

学海无涯的专栏 4万+

基于STM32设计的校园智慧路灯系统(华为云IOT)(212)

当前设计并研发了基于STM32的智慧路灯系统,本系统的目的是打造一个高效节能、智能化管理的校园照明环境。通过集成STM32F103RCT6高性能微控制器为核心,结合多种传感器模块如BH1750光敏传感器、热释电人体感应模块以及中科微电子GPS模块等,实现了对校园路灯的精准控制与实时监控。

5146

AgentScope深入分析-ReActAgent

ReActAgent 是 AgentScope 框架中最核心的智能体实现,它完美诠释了"推理-行动"(Reasoning-Acting)循环的精髓。本文将深入分析 ReActAgent 的类继承关系、核心执行流程,以及状态管理、钩子机制、实时介入等关键技术点。通过阅读本文,你会理解智能体如何与模型交互、如何执行工具、如何处理中断,以及这些机制背后的设计考量。模块化:通过组合不同的组件(模型、格式化器、工具集、记忆)来构建智能体透明性:所有关键流程都对开发者可见,可以精确控制可扩展性。

845

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

上一篇: 蓝牙开发那些事之Ellisys逻辑分析接口的妙用
下一篇: 蓝牙开发那些事之btstack内存管理篇
yuanyun_elber
博客等级 码龄11年 399粉丝 105原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址