LPC43xx SGPIO Pattern Match Mode

模式匹配

所有位串均具有模式匹配功能。

该功能可用于检测启动代码等。要使用该功能,则必须用需匹配的模式来对REG_SS 编程

(请注意, POS 达到零时 REG_SS 不会与 REG  交换!)

MATCH_MODE 位必须设为1。

输入数据 REG 现在与已编程的模式 REG_SS 相比较。发现匹配时会提出模式匹配中断。

Bit MATCH_MODE selects whether the match filter is active or whether data is captured.

Only slice A, H, I, and P support matching with a mask (register MASK_x).

For other slices the pattern is not masked.

匹配掩码

四个位串(A、H、I 和P)同样支持对模式的掩码;必须设置MASK_x 以便对模式位进行比较(‘1’表示比较)。

例如,寻找模式0x1234.xxxx.5678.9ABC 时,

REG 应设置为0x1234.xxxx.5678.9ABC,

MASK 设置为0xFFFF.0000.FFFF.FFFF。

When using the data match interrupt bit 0 has to be high.

When using data match mode, the slice’s shadow register [ REG_SS ] should hold the pattern to be matched.

In addition, when data match is enabled the main register [ REG ] and the shadow register [ REG_SS ] will not exchange when FIFO is done with input or output data.

Pattern match

All slices feature pattern match functionality.

This can be used for example to detect a start code.

To use this functionality, REG_SS must be programmed with the pattern to be matched
(Note that REG_SS will not be swapped with REG when POS reaches zero!).

The MATCH_MODE bit must be set to 1.

The input data is now compared to the programmed pattern.

When a match is found the pattern match interrupt is raised.

Four slices (A, H, I and P) also support masking the pattern; MASK_x must be set for the pattern bits to be compared (1 is compare).

E.g. when looking for pattern 0x1234 XXXX, then REG_SS should be set to 0x1234 XXXX and MASK to 0xFFFF 0000.

0x1234 xxxx -- REG
0x1234 0000 -- REG_SS
0xFFFF 0000 -- MASK

MASK_A, MASK_H, MASK_I, MASK_P

The mask registers are used for the “on pattern match” interrupts.

With some slices it is possible to mask the data for the pattern match interrupts. Slices A, H, I and P support this function.

Every bit that is 1 in this register will be masked.

If this register contains the value 0b00001111 the first 4 bits will be masked for the pattern interrupt.

时间: 2024-10-11 12:57:56

LPC43xx SGPIO Pattern Match Mode的相关文章

LPC43xx SGPIO DMA and Interrupts

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 patte

LPC43xx SGPIO Configuration

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 par

正则表达式中pattern.match(),re.match(),pattern.search(),re.search()方法的使用和区别

正则表达式(regular expression)是一个特殊的字符序列,描述了一种字符串匹配的模式,可以用来检查一个串是否含有某种子串. 将匹配的子串替换或者从某个串中取出符合某个条件的子串,或者是在指定的文章中抓取特定的字符串等.Python处理正则表达式的模块是re模块,它是Python语言中拥有全部的正则表达式功能的模块.正则表达式由一些普通字符和一些元字符组成.普通字符包括大小写的字母.数字和打印符号,而元字符是具有特殊含义 正则表达式大致的匹配过程是: 拿正则表达式依次和字符串或者文本

LPC43xx SGPIO I2C Implementation

I²C SGPIO Configuration SGPIO is a hardware feature of LPC4300 series. There are 16 SGPIO pins called from SGPIO 0 to SGPIO 15. SGPIO is one of the functions of LPC 4300 pins which can be chosen. SGPIO could work as standard GPIO pins, or do stream p

LPC43xx SGPIO Camera interface design

AN11196: Camera interface design using SGPIO

【LABVIEW到C#】3》String的操作之Match Pattern Funtion.vi

C#实现如下 using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; namespace DEMO { class Darrenstring { public class Matchpattern:Darrenstring { private string text; private string pattern; private int in

Beginning Scala study note(5) Pattern Matching

The basic functional cornerstones of Scala: immutable data types, passing of functions as parameters and pattern matching. 1. Basic Pattern Matching In Scala, your cases can include types, wildcards, sequences, regular expressions, and so forth. scal

.net正则表达式大全(.net 的 System.Text.RegularExpressions.Regex.Match()方法使用)

正则表达式的本质是使用一系列特殊字符模式,来表示某一类字符串.正则表达式无疑是处理文本最有力的工具,而.NET的System.dll类库提供的System.Text.RegularExpressions.Regex类实现了验证正则表达式的方法.Regex 类表示不可变(只读)的正则表达式.它还包含各种静态方法,允许在不显式创建其他类的实例的情况下使用其他正则表达式类. 正则表达式的字符代表的说明: Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN

scala pattern matching

scala语言的一大重要特性之一就是模式匹配.在我看来,这个怎么看都很像java语言中的switch语句,但是,这个仅仅只是像(因为有case关键字),他们毕竟是不同的东西,switch在java中,只能是用在函数体类的,且需要结合break使用.但是,在scala语言中,pattern matching除了有case关键字,其他,似乎和java又有很多甚至完全不同的东西. scala在消息处理中为模式匹配提供了强大的支持! 下面看看模式匹配的英文定义: A pattern match incl