博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
LPC43xx SGPIO DMA and Interrupts
阅读量:4635 次
发布时间:2019-06-09

本文共 4785 字,大约阅读时间需要 15 分钟。

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

SGPIO pins SGPIO14 and SGPIO15 can trigger a GPDMA request. < Output = '1' >

To generate the request, program a pulse in the bit stream of slice 14 or 15.

For example, use a pattern like 0x4000 0000.

GPDMA Master 1 can access memories and peripherals 

GPDMA master 0 can access memories and the SGPIO

The SGPIO interrupts<4> is connected to interrupt slot <Interrupt ID> #31 in the ARM Cortex-M4 

The SGPIO interrupts<4> is connected to interrupt slot <Interrupt ID> #19 in the ARM Cortex-M0APP

The SGPIO Input Bit Match interrupt is connected to interrupt slot <Interrupt ID> #4 in the ARM Cortex-M0SUB
The SGPIO Data Pattern Match interrupt is connected to interrupt slot <Interrupt ID> #5 in the ARM Cortex-M0SUB
The SGPIO Shfit Clock interrupt is connected to interrupt slot <Interrupt ID> #6 in the ARM Cortex-M0SUB
The SGPIO Capture Clock interrupt is connected to interrupt slot <Interrupt ID> #7 in the ARM Cortex-M0SUB

SGPIO interrupt specific registers

For these interrupt specific registers, replace the x with the correct number for the interrupt.

  • 0 for shift clock;
  • 1 for capture clock, main register and shadow register exchange;
  • 2 for data pattern match and
  • 3 for input bit match.

4.3.1 CLR_EN_x
This register is used to disable interrupts.
Slice interrupts can be disabled by writing a 1 to the register.
For example, if a 1 is written to bit 2 the interrupt for slice C will be disabled.

4.3.2 SET_EN_x

This register is used to enable interrupts.
Slice interrupts can be enabled by writing a 1 to the register.
If, for example, a 1 is written to bit 3 the interrupt for slice D will be enabled.

4.3.3 ENABLE_x

Reading out this register will return what slices have their interrupts enabled.
If this register contains the value 0b1001 that means slice A and D have the interrupts enabled.

4.3.4 STATUS_x

Reading out this register will return on which slices an interrupt has happened.
It is possible that an interrupt happens on multiple slices at the same time.
If this register contains the value 0b1000100 interrupts happened on slice C and G.

4.3.5 CLR_STAT_x

This register is used to clear the interrupt state.
It is recommended to clear all interrupt states after handling the interrupts
otherwise the value in the STATUS_x register will also contain old interrupt states.

4.3.6 SET_STAT_x

This register is used to set interrupt states.
When a 1 is written to bit 0 it will look like an interrupt happened on slice A.
This register can be used for code testing.

SGPIO Interrupts

There are four interrupt methods available for SGPIO, they are:

  • 1. On shift clock
  • 2. On data exchange clock
  • 3. On data pattern match
  • 4. On input bit match (rising/falling edge, high/low level)

6.1 On shift clock
When enabled through SET_EN, this interrupt occurs every time COUNTx == 0.
This normally happens every time 1 data bit is clocked out or in of an SGPIO slice and can be CPU intensive. The registers used for this interrupt are:
• CLR_EN_0
• SET_EN_0
• ENABLE_0
• STATUS_0
• CTR_STATUS_0
• SET_STATUS_0

6.2 On data exchange (swap) clock
When enabled through SET_EN, this interrupt will occur every time the data
between the Data register (REGx) and the shadow register (REG_SSx) is exchanged. < POS == 0 >
This interrupt can be used to place new data in the shadow register,
at the next exchange (and interrupt) the new data will be loaded in the data register
and new data can be put in the shadow register.

The registers used for this interrupt are:

• CLR_EN_1
• SET_EN_1
• ENABLE_1
• STATUS_1
• CTR_STATUS_1
• SET_STATUS_1

6.3 On data pattern match < 1 or more bits match REG_SS >
It is possible to interrupt when a certain pattern is clocked in or out.
Slices A, I, H and P also support mask functionality for the pattern match interrupt.
The pattern match interrupt can be used to look for certain data when making a logic or data analyzer.

To use this interrupt, bit 0 from register SLICE_MUX_CFGx must be high.  The MATCH_MODE bit must be set to 1.

The pattern can be up to 32-bit long and should program in REG_SS register.

If the data in the data register matches the data in the shadow register an interrupt will happen.
1) As long as this interrupt is enabled and 2) bit 0 in SLICE_MUX_CFGx is high the data register and shadow register will not swap.
The registers used for this interrupt are:
• CLR_EN_2
• SET_EN_2
• ENABLE_2
• STATUS_2
• CTR_STATUS_2
• SET_STATUS_2

6.4 On input bit match
When enabled through SET_EN, it is possible to interrupt on a low or high level or on a falling or rising edge on the input data bit.
The registers used for this interrupt are:
• CLR_EN_3
• SET_EN_3
• ENABLE_3
• STATUS_3
• CTR_STATUS_3
• SET_STATUS_3

 

转载于:https://www.cnblogs.com/shangdawei/p/4905979.html

你可能感兴趣的文章
Linux Supervisor的安装与使用入门
查看>>
AngularJS和DataModel
查看>>
在进行商业运算时解决BigDecimal的精度丢失问题
查看>>
创建 PSO
查看>>
JasperReport报表设计4
查看>>
项目活动定义 概述
查看>>
团队冲刺04
查看>>
MAC和windows开发操作系统环境,解决Maven工程中报 Missing artifact jdk.tools:jdk.tools
查看>>
我的Python分析成长之路8
查看>>
Python从零开始 day2
查看>>
泛型在三层中的应用
查看>>
云栖社区> > 正文 永久免费SSL安全证书Letsencrypt安装使用方法
查看>>
SharePoint2010 -- 管理配置文件同步
查看>>
jq--ajax中止请求
查看>>
osgearth+vs2010安装
查看>>
linux内核内存管理(zone_dma zone_normal zone_highmem)
查看>>
第十一章_文件下载
查看>>
js自己定义插件-选项卡
查看>>
针对JavaScript的常用事件、对象捕获和使用技巧
查看>>
[NOI 2015]荷马史诗
查看>>