LPC43xx SGPIO Configuration -- Why not use GPDMA ?
LPC43xx SGPIO Configuration
The LPC43xx SGPIO peripheral is used to move samples between USB and the ADC/DAC chip (MAX5864).
The SGPIO is a peripheral that has a bunch of 32-bit shift registers.
These shift registers can be configured to act as a parallel interface of different widths.
For HackRF, we configure the SGPIO to transfer eight bits at a time.
The SGPIO interface can also accept an external clock, which we use to synchronize transfers with the sample clock.
In the current HackRF design, there is a CPLD which manages the interface between the MAX5864 and the SGPIO interface.
There are four SGPIO signals that control the SGPIO data transfer:
- Clock: Determines when a value on the SGPIO data bus is transferred.
- Direction: Determines whether the MAX5864 DA (ADC) data is driven onto the SGPIO lines,
or if the SGPIO lines drive the data bus with data for the MAX5864 DD (DAC) signals. - Data Valid: Indicates a sample on the SGPIO data bus is valid data.
- Transfer Enable: Allows SGPIO to synchronize with the I/Q data stream.
The MAX5864 produces/consumes two values (quadrature/complex value) per sample period -- an I value and a Q value.
These two values are multiplexed on the SGPIO lines. This signal suspends data valid until the I value should be transferred.
Frequently Asked Questions
Why not use GPDMA to transfer samples through SGPIO?
It would be great if we could, as that would free up lots of processor time.
Unfortunately, the GPDMA scheme in the LPC43xx does not seem to support
peripheral-to-memory and memory-to-peripheral transfers with the SGPIO peripheral.
You might observe that the SGPIO peripheral can generate requests from SGPIO14 and SGPIO15,
using an arbitrary bit pattern in the slice shift register.
The pattern in the slice determines the request interval.
That's a good start.
However, how do you specify which SGPIO shadow registers are read/written at each request,
and in which order those registers are transferred with memory?
It turns out you can't.
In fact, it appears that an SGPIO request doesn't cause any transfer at all, if your source or destination is "peripheral".
Instead, the SGPIO request is intended to perform a memory-to-memory transfer synchronized with SGPIO.
But you're on your own as far as getting data to/from the SGPIO shadow registers.
I believe this is why the SGPIO camera example in the user manual describes an SGPIO interrupt doing the SGPIO shadow register transfer,
and the GPDMA doing moves from one block of RAM to another.
Perhaps if we transfer only one SGPIO shadow register, using memory-to-memory?
Then we don't have to worry about the order of SGPIO registers, or which ones need to be transferred.
It turns out that when you switch over to memory-to-memory transfers, you lose peripheral request generation.
So the GPDMA will transfer as fast as possible -- far faster than words are produced/consumed by SGPIO.
I'd really love to be wrong about all this, but all my testing has indicated there's no workable solution
to using GPDMA that's any better than using SGPIO interrupts to transfer samples.
If you want some sample GPDMA code to experiment with, please contact Jared (sharebrained on freenode #hackrf).
LPC43xx SGPIO Configuration -- Why not use GPDMA ?的更多相关文章
- LPC43xx SGPIO Experimentation
LPC4350 SGPIO Experimentation The NXP LPC43xx microcontrollers have an interesting, programmable ser ...
- LPC43xx SGPIO I2C Implementation
I²C SGPIO Configuration SGPIO is a hardware feature of LPC4300 series. There are 16 SGPIO pins calle ...
- LPC43xx SGPIO DMA and Interrupts
The SGPIO output pins SGPIO14 and SGPIO15 can trigger a GPDMA request SGPIO pins SGPIO14 and SGPIO15 ...
- LPC43xx SGPIO Slice 示意图
SGPIO inverted clock qualifier Hi, With bits 6:5 of SGPIO_MUX_CFG the QUALIFIER_MODE is selected (0x ...
- LPC43xx SGPIO Camera interface design
AN11196: Camera interface design using SGPIO
- LPC43xx SGPIO Pattern Match Mode
模式匹配 所有位串均具有模式匹配功能. 该功能可用于检测启动代码等.要使用该功能,则必须用需匹配的模式来对REG_SS 编程 (请注意, POS 达到零时 REG_SS 不会与 REG 交换!) M ...
- LPC43xx SGPIO Slice 输入输出连接表
- LPC43xx Dual-core or Multi-core configuration and JLink Debug
Test access port (TAP) JTAG defines a TAP (Test access port). The TAP is a general-purpose port that ...
- LPC18xx LPC43xx LPC4370 Bootrom USB DFU FPB - Flash Patch and Breakpoint Unit
What is the difference between a Bootrom vs bootloader on ARM systems Bootrom Bootrom (or Boot ROM) ...
随机推荐
- SDWebImage源码阅读-第二篇
一 SDWebImageManager的downloadImageWithURL的方法 上一篇,我们刚开了个头,分析了一下开始加载图片之前如何取消其他正在下载的任务,接着,我们回到 - (void) ...
- JS异常简单处理
有时候JS某一处报错会导致整个页面JS的运行出问题,于是想的简单研究一下JS的错误处理机制.更详细的可以自己参考网站研究: https://developer.mozilla.org/zh-CN/ ...
- flask基础之session原理详解(十)
前言 flask_session是flask框架实现session功能的一个插件,用来替代flask自带的session实现机制,flask默认的session信息保存在cookie中,不够安全和灵活 ...
- C# 每月第一天和最后一天
//每月第一天 - DateTime.Now.Day); //每月最后一天 var endTime=DateTime.Now.AddDays(1 - DateTime.Now.Day).AddMont ...
- 修复 Tween.JS 的 onStop 设置无效
Tween.js 个人认为还是一个比较不错的 缓动动画库,给作为学渣的我实现一些酷酷的动画带来了极大的遍历. 但是,今天突然发现特么设置onStop的回调函数居然没反应...... 作为一个渣渣只能一 ...
- python爬虫-基础
所谓网页抓取,就是把URL地址中指定的网络资源从网络流中读取出来,保存到本地. 类似于使用程序模拟IE浏览器的功能,把URL作为HTTP请求的内容发送到服务器端, 然后读取服务器端的响应资源. 1.浏 ...
- 说commit,rollback
事务执行失败后,看做的是commit还是rollback:commit是把执行成功的部分提交了,rollback就是全回滚了.如果rollback失败了,此时不处理,等到客户端断开,MySQL内部默认 ...
- 【LOJ】#2265. 「CTSC2017」最长上升子序列
题解 点了一个新技能叫杨表(事实上集训的时候听过,但是一直不会 这道题就是让我们找到k个不上升子序列,要求长度加和最大 我们用杨表去维护,但是由于杨表的行数可能是n的,复杂度会炸 我们只维护前\(\s ...
- OpenCV中的SVM参数优化
OpenCV中的SVM参数优化 svm参数优化opencv SVMSVR参数优化CvSVMopencv CvSVM SVM(支持向量机)是机器学习算法里用得最多的一种算法.SVM最常用的 ...
- hive1.2.1安装步骤(在hadoop2.6.4集群上)
hive1.2.1在hadoop2.6.4集群上的安装 hive只需在一个节点上安装即可,这里再hadoop1上安装 1.上传hive安装包到/usr/local/目录下 2.解压 tar -zxvf ...