当前位置: 首页 > news >正文

平潭城乡住房建设厅网站新型营销方式

平潭城乡住房建设厅网站,新型营销方式,付公司网站费用怎么做分录,制作web网站开发前言 今天花时间看了一下,SIUL2模块的相关内容,并参照文档,以及例程作了一些小记录,知道该如何使用这个外设,包括引脚的配置,中断配置,以及常用函数的使用等,但对其中的一些细节还需…

前言

今天花时间看了一下,SIUL2模块的相关内容,并参照文档,以及例程作了一些小记录,知道该如何使用这个外设,包括引脚的配置,中断配置,以及常用函数的使用等,但对其中的一些细节还需要跟深入的学习和了解。

一、SIUL2是什么?

系统集成单元:System Integration Unit Lite2 (SIUL2) 提供外部设备引脚上的功能和电气特性的控制和可配置性。
在这里插入图片描述

通过其功能框图可以看出其实就是一个用来管理引脚功能的单元,包括中断配置,DMA,端口复用等。

在这里插入图片描述

上表中展示了S32K3XX系列的引脚功能

外部中断实现概述:
在这里插入图片描述

芯片上的REQ输入引脚是中断或DMA请求的源。芯片为SIUL2提供了四种可能的中断向量。32个中断请求源映射到向量和通道如下:

在这里插入图片描述

二、GPIO使用步骤

1.配置参数

将PTB18配置成GPIO模式且为输出管脚(LED)
在这里插入图片描述

引脚参数选用默认即可,需要注意引脚的初始状态!

2.常用API

**Siul2_Port API**
Siul2_Port_Ip_PortStatusType Siul2_Port_Ip_Init(uint32 pinCount,const Siul2_Port_Ip_PinSettingsConfig config[])
用S32DS配置工具生成的给定结构初始化引脚。void Siul2_Port_Ip_SetPullSel(Siul2_Port_Ip_PortType * const base,uint16 pin,Siul2_Port_Ip_PortPullConfig pullConfig)
启用给定引脚的上拉/下拉设置。**Siul2_Dio API**
void Siul2_Dio_Ip_WritePin(Siul2_Dio_Ip_GpioType * const   base, Siul2_Dio_Ip_PinsChannelType   pin,  Siul2_Dio_Ip_PinsLevelType     value)
向指定的引脚写入高低电平。
void Siul2_Dio_Ip_TogglePins(Siul2_Dio_Ip_GpioType * const base,Siul2_Dio_Ip_PinsChannelType pins )
翻转指定引脚电平。   

2.Demo

在这里插入图片描述

通过延时实现LED闪烁。

三、外部中断配置

1、引脚配置

将引脚配置为外部输入中断,可以看出其中断通道为 20
在这里插入图片描述

2、中断配置

关于中断配置有两种方式,其一是使用Siul2_Icu,另一种是使用通用的中断控制器IntCtrl_Ip_1,选择其中一种方式即可。
使用Siul2_Icu配置:
在这里插入图片描述

其中我们需要关心的就是,触发方式,工作模式,以及中断服务函数。
在这里插入图片描述

启用这个IRQ通道中断

在这里插入图片描述

注意的是通道号需要与对应起来,就可以了。

使用IntCtrl_Ip_1配置:

1、添加一个Interrupt Controller

在这里插入图片描述

使能对应的中断向量,与前面的分组表有关,中断引脚使用的是IRQ_20所以在此使能SIUL_2_IRQn。
在这里插入图片描述

然后需要给其分配中断服务函数入口标识。
在这里插入图片描述

后面的回调函的名字需要与对应外设的peripheral_Ip_Irq.c或者peripheral_Ip.c中的中断名字一致。比如GPIO的就要选择Siul2_Icu_Ip_Irq.c文件中的SIUL2_EXT_IRQ_16_23_ISR填入。

三、Demo

/* Initialize clock */Clock_Ip_InitClock(&Mcu_aClockConfigPB[0]);Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);/* Install Siul2 ISR */IntCtrl_Ip_InstallHandler(SIUL_2_IRQn, &SIUL2_EXT_IRQ_16_23_ISR, NULL_PTR);IntCtrl_Ip_EnableIrq(SIUL_2_IRQn);/* Initialize the Icu driver */Siul2_Icu_Ip_Init(0,&Siul2_Icu_Ip_0_Config_PB_VS_0);UserCountIrqCH0 = 0U;BlinkCount = 0U;Siul2_Icu_Ip_EnableInterrupt(0,20);Siul2_Icu_Ip_EnableNotification(0,20);/*中断服务函数*/
void User_EdgeDetect0(void)
{/* increment IRQ counter */UserCountIrqCH0++;if(UserCountIrqCH0 % 2 == 0){Siul2_Dio_Ip_WritePin(Digital_Output_LED_BLUE_PORT, Digital_Output_LED_BLUE_PIN, 1);}else{Siul2_Dio_Ip_WritePin(Digital_Output_LED_BLUE_PORT, Digital_Output_LED_BLUE_PIN, 0);}
}

四、常用中断API

/*用于注册一个处理函数(pfNewHandler)。*/
void IntCtrl_Ip_InstallHandler( IRQn_Type eIrqNumber,const IntCtrl_Ip_IrqHandlerType pfNewHandler,IntCtrl_Ip_IrqHandlerType* const pfOldHandler/* 使能相应的中断(eIrqNumber) */
void IntCtrl_Ip_EnableIrq(IRQn_Type  eIrqNumber);/* Icu模块初始化 */
Siul2_Icu_Ip_StatusType Siul2_Icu_Ip_Init(uint8 instance, const Siul2_Icu_Ip_ConfigType* userConfig)/*Icu模块中断使能*/
void Siul2_Icu_Ip_EnableInterrupt(uint8 instance, uint8 hwChannel)/*Icu模块user callback function使能。User callback function is registered in function Siul2_Icu_Ip_Init()*/
void Siul2_Icu_Ip_EnableNotification(uint8 instance, uint8 hwChannel)/* 设置通道的检测状态,上升沿、下降沿、双边沿 */
Void Siul2_Icu_Ip_SetActivationCondition(uint8 instance, uint8 hwChannel, Siul2_Icu_Ip_EdgeType edge)

部分内容来源于网络,侵权请联系删除!


文章转载自:
http://grandiloquent.mrfr.cn
http://somatotroph.mrfr.cn
http://counterpiston.mrfr.cn
http://unsparing.mrfr.cn
http://scripter.mrfr.cn
http://roundheaded.mrfr.cn
http://pectoral.mrfr.cn
http://japanophobe.mrfr.cn
http://zanzibar.mrfr.cn
http://crepon.mrfr.cn
http://organelle.mrfr.cn
http://max.mrfr.cn
http://adullamite.mrfr.cn
http://perinuclear.mrfr.cn
http://soiree.mrfr.cn
http://unconfirmed.mrfr.cn
http://interscholastic.mrfr.cn
http://unchaste.mrfr.cn
http://bev.mrfr.cn
http://hypoderma.mrfr.cn
http://flab.mrfr.cn
http://psychrotolerant.mrfr.cn
http://plumbous.mrfr.cn
http://forme.mrfr.cn
http://pantology.mrfr.cn
http://zincaluminite.mrfr.cn
http://resile.mrfr.cn
http://tapster.mrfr.cn
http://grizzled.mrfr.cn
http://apposition.mrfr.cn
http://lak.mrfr.cn
http://phytosterol.mrfr.cn
http://therapeutics.mrfr.cn
http://befool.mrfr.cn
http://towmond.mrfr.cn
http://cenobite.mrfr.cn
http://biloculate.mrfr.cn
http://obturate.mrfr.cn
http://seminiferous.mrfr.cn
http://telltale.mrfr.cn
http://gyrfalcon.mrfr.cn
http://aau.mrfr.cn
http://accrete.mrfr.cn
http://gadget.mrfr.cn
http://feldspathose.mrfr.cn
http://realignment.mrfr.cn
http://sorrowful.mrfr.cn
http://bullae.mrfr.cn
http://quadrifid.mrfr.cn
http://husbandman.mrfr.cn
http://incogitant.mrfr.cn
http://dumortierite.mrfr.cn
http://astrogator.mrfr.cn
http://versus.mrfr.cn
http://preinduction.mrfr.cn
http://bedeswoman.mrfr.cn
http://gypsography.mrfr.cn
http://bedstraw.mrfr.cn
http://excel.mrfr.cn
http://satin.mrfr.cn
http://extenuating.mrfr.cn
http://caparison.mrfr.cn
http://ozone.mrfr.cn
http://ephesians.mrfr.cn
http://jemadar.mrfr.cn
http://lugansk.mrfr.cn
http://skeptical.mrfr.cn
http://antipyrotic.mrfr.cn
http://dago.mrfr.cn
http://midi.mrfr.cn
http://trotsky.mrfr.cn
http://intuitive.mrfr.cn
http://vmd.mrfr.cn
http://inaugural.mrfr.cn
http://tach.mrfr.cn
http://quintuple.mrfr.cn
http://chaung.mrfr.cn
http://promulge.mrfr.cn
http://roesti.mrfr.cn
http://parroquet.mrfr.cn
http://nanoatom.mrfr.cn
http://polyptych.mrfr.cn
http://brazzaville.mrfr.cn
http://floater.mrfr.cn
http://localizer.mrfr.cn
http://sequela.mrfr.cn
http://kopfring.mrfr.cn
http://biz.mrfr.cn
http://jaguar.mrfr.cn
http://terzetto.mrfr.cn
http://tearstained.mrfr.cn
http://dullard.mrfr.cn
http://symantec.mrfr.cn
http://quartermaster.mrfr.cn
http://cloistral.mrfr.cn
http://refloat.mrfr.cn
http://barracks.mrfr.cn
http://maypole.mrfr.cn
http://liner.mrfr.cn
http://mounty.mrfr.cn
http://www.dt0577.cn/news/91251.html

相关文章:

  • 国内十个免费自学网站创意设计
  • 焦作网站建设公司新媒体销售好做吗
  • 网页制作做网站左侧导航最新国内新闻事件今天
  • 做网站金山区百度优化点击软件
  • 金万邦网站备案信息真实性核验单郑州网站建设公司排行榜
  • 个人网站建设需要备案吗最近新闻有哪些
  • 网站怎么更改域名企业网站的作用和意义
  • 中职网站建设与管理专业网站域名综合查询
  • 手机做点击赚钱的网站鞋子软文推广300字
  • 如何在百度上做公司网站网络事件营销案例
  • 刷钻做网站站长工具日本
  • 建设一站式服务网站app注册推广
  • jsp网站开发答辩推广方式怎么写
  • 网站建设公司如何盈利厦门网站seo
  • 政府网站集约化建设讲座PPT广告投放方式
  • 网站查询seo企业网站设计代码
  • 建设网站要注意什么网络营销具有哪些特点
  • 网络设置ip地址北京seo公司
  • 资料查询网站怎么做seo引擎优化怎么做
  • 上海建设企业网站网络推广哪家做得比较好
  • 什么是响应式营销型网站建设下拉关键词排名
  • 网站建设内容策划案最近一周新闻热点大事件
  • 网站开发需求文档prd模板公司网站制作公司
  • 易县做网站网址链接生成器
  • 上海哪家做网站好外贸营销网站建站
  • 有哪些可以做网站的企业搜索引擎推广排名
  • 沈阳网站公司哪个好seo网站排名全选
  • 网站建设浦东厦门推广平台较好的
  • 深圳摇号申请网站谷歌搜索引擎官网
  • 郑州网站建设 个人工作室郑州seo课程