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 ?的更多相关文章

  1. LPC43xx SGPIO Experimentation

    LPC4350 SGPIO Experimentation The NXP LPC43xx microcontrollers have an interesting, programmable ser ...

  2. LPC43xx SGPIO I2C Implementation

    I²C SGPIO Configuration SGPIO is a hardware feature of LPC4300 series. There are 16 SGPIO pins calle ...

  3. LPC43xx SGPIO DMA and Interrupts

    The SGPIO output pins SGPIO14 and SGPIO15 can trigger a GPDMA request SGPIO pins SGPIO14 and SGPIO15 ...

  4. LPC43xx SGPIO Slice 示意图

    SGPIO inverted clock qualifier Hi, With bits 6:5 of SGPIO_MUX_CFG the QUALIFIER_MODE is selected (0x ...

  5. LPC43xx SGPIO Camera interface design

    AN11196: Camera interface design using SGPIO

  6. LPC43xx SGPIO Pattern Match Mode

    模式匹配 所有位串均具有模式匹配功能. 该功能可用于检测启动代码等.要使用该功能,则必须用需匹配的模式来对REG_SS 编程 (请注意, POS 达到零时 REG_SS 不会与 REG  交换!) M ...

  7. LPC43xx SGPIO Slice 输入输出连接表

  8. 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 ...

  9. 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) ...

随机推荐

  1. <dl>

    定义列表 自定义列表不仅仅是一列项目,而是项目及其注释的组合. 自定义列表以 <dl> 标签开始.每个自定义列表项以 <dt> 开始.每个自定义列表项的定义以 <dd&g ...

  2. Jquery常用方法合集,超实用

    转自:十分钟玩转 jQuery.实例大全 一.简介 定义 jQuery创始人是美国John Resig,是优秀的Javascript框架: jQuery是一个轻量级.快速简洁的javaScript库. ...

  3. Linux下JDK到底应该安装在哪儿?

    1 Linux 目录结构 即使这是个菜鸟级的问题,也经常难住老鸟.我就见过很资深的程序员把JDK不合适地安装到/home目录下.虽然不一定有最正确的安装位置,但一定有不适当的安装位置.为了确定我们到底 ...

  4. python3之模块random随机数

    1.random.random() 随机生成一个大于0小于1的随机数. print(random.random()) 0.03064765450719098 2.random.uniform(a,b) ...

  5. python enumerate用法总结【转】

    enumerate()说明 enumerate()是python的内置函数 enumerate在字典上是枚举.列举的意思 对于一个可迭代的(iterable)/可遍历的对象(如列表.字符串),enum ...

  6. 公共语言运行库(CLR)开发系列课程(1):Pinvoke 简介 学习笔记

    前言 让拖管代码对象和非托管对象协同工作的过程称为互用性(Interoperability),通常简称为 Interop. P/Invoke在托管代码与非托管代码交互式时产生一个事务(Transiti ...

  7. 2010 NEERC Western subregional

    2010 NEERC Western subregional Problem A. Area and Circumference 题目描述:给定平面上的\(n\)个矩形,求出面积与周长比的最大值. s ...

  8. tar命令的实用详解(C参数和排除文件 --exclude)

    一.tar:从压缩包中解压出指定文件 [root@d176 test]# tar ztf nrpe-2.12.tar.gz |grep srcnrpe-2.12/src/nrpe-2.12/src/. ...

  9. Entity Framework 6.1.0 Tools for Visual Studio 2012 & 2013

    http://www.microsoft.com/en-us/download/confirmation.aspx?id=40762

  10. jenkins的svn路径中文问题

    今天弄Jenkins,我们的SVN代码路径是中文的,他娘的坑死我了,很没面子弄了俩点,网上方案试了好多,说装插件,修改Tomcat server.xml,基本没用,后来看到一个帖子写的方案蛮实用的,分 ...