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. .gitignore 失效问题解决

    对于Git,已经跟踪的文件,再加入到.gitignore中,会使忽略失效.使用下面3个命令使它重新生效 git rm -r --cached . git add . git commit -m &qu ...

  2. Linux - trap 命令

    trap 命令用于指定在接收到信号后将要采取的动作,常见的用途是在脚本程序被中断时完成清理工作.当shell接收到sigspec指定的信号时,arg参数(命令)将会被读取,并被执行. trap 信号参 ...

  3. HDU 4712 Hamming Distance(随机算法)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4712 解题报告:输入n个数,用十六进制的方式输入的,任意选择其中的两个数进行异或,求异或后的数用二进制 ...

  4. SSH 公钥登录

    一般使用SSH进行远程登录时需要提供密码,这也是我们所熟知的一种方式. 另外,就是通过公钥登录的方式,本文将简要介绍公钥登录的两种方法,建议使用方法二.本文也将简单演示公钥登录过程,以及强制使用公钥和 ...

  5. Python 入门基础3 --流程控制

    今日目录: 一.流程控制 1. if 2. while 3. for 4. 后期补充内容 一.流程控制--if 1.if判断: # if判断 age = 21 weight = 50 if age & ...

  6. 各浏览器 position: fixed 造成的bug 通用解决办法,Safari, iOS

    将原来使用 position: fixed  的元素外层包裹一个 div.fixedWrapper .fixedWrapper { width: 100%; overflow: hidden; pos ...

  7. java中final、finally、finalized使用方法

    首先需要明白  final和finally是关键字,finalize是一个方法. 1. final关键字 final可以修饰类.方法.变量, 修饰类表示类不可以被继承 修饰方法表示此方法不可以被重写( ...

  8. Mybatis逆向工程——(十四)

    逆向工程可以快速将数据库的表生成JavaBean,同时生成对单标操作的Mapper.java与Mapper.xml,极大地提高了开发速度. 1.jar包

  9. InteliJ IDEA 简单使用:配置项目所需jdk

    1:配置项目所需jdk: File->Project Structure 弹出如下界面: 首先选中SDKs,会出现下图界面:点击“+”标志弹出Add New SDK 然后选择JDK,会弹出路径框 ...

  10. Ubuntu下SSH安装

    step: 1.输入命令: sudo apt-get install openssh-server 2.验证sshserver是否启动了,以下两条命令均可 ps -e | grep ssh netst ...