日本黄色一级经典视频|伊人久久精品视频|亚洲黄色色周成人视频九九九|av免费网址黄色小短片|黄色Av无码亚洲成年人|亚洲1区2区3区无码|真人黄片免费观看|无码一级小说欧美日免费三级|日韩中文字幕91在线看|精品久久久无码中文字幕边打电话

當前位置:首頁 > 單片機 > 單片機
[導(dǎo)讀]要使用STM32,需要各種文檔,其中有(以STM32F103RBT6為例):st官方資源地址:http://www.st.com/internet/mcu/product/164487.jsp1、datasheet:http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LI

要使用STM32,需要各種文檔,其中有(以STM32F103RBT6為例):

st官方資源地址:http://www.st.com/internet/mcu/product/164487.jsp

1、datasheet:http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00161566.pdf

2、REFERENCE MANUALS:http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/REFERENCE_MANUAL/CD00171190.pdf

3、ERRATA SHEETS:http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/ERRATA_SHEET/CD00190234.pdf

4、STM32F10x standard peripheral library:http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f10x_stdperiph_lib.zip

ARM官方:

5、Cortex-M3 Technical Reference Manual Revision r1p1:http://infocenter.arm.com/help/topic/com.arm.doc.ddi0337e/DDI0337E_cortex_m3_r1p1_trm.pdf

6、ARMv7M Architecture Reference Manual:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0403c/index.html

非官方的:

The Definitive Guide to the ARM Cortex-M3(中文名:Cortex-M3 權(quán)威指南),雖然非官方,但很權(quán)威

下面,我們看看關(guān)于NVIC寄存器的描述,都在哪些手冊里面有提到

在使用STM32F10x standard peripheral library寫有關(guān)于stm32中斷的程序的時候,需要開啟某個特定中斷的控制位,除了對應(yīng)外設(shè)的寄存器之外,還需要設(shè)置NVIC的相關(guān)寄存器的對應(yīng)位。例如:


/******STM32specificInterruptNumbers*********************************************************/WWDG_IRQn=0,/*!


而NVIC_Init()這個函數(shù):


/***@briefInitializestheNVICperipheralaccordingtothespecified*parametersintheNVIC_InitStruct.*@paramNVIC_InitStruct:pointertoaNVIC_InitTypeDefstructurethatcontains*theconfigurationinformationforthespecifiedNVICperipheral.*@retvalNone*/voidNVIC_Init(NVIC_InitTypeDef*NVIC_InitStruct){uint32_ttmppriority=0x00,tmppre=0x00,tmpsub=0x0F;/*Checktheparameters*/assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd));assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority));assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority));if(NVIC_InitStruct->NVIC_IRQChannelCmd!=DISABLE){/*ComputetheCorrespondingIRQPriority--------------------------------*/tmppriority=(0x700-((SCB->AIRCR)&(uint32_t)0x700))>>0x08;tmppre=(0x4-tmppriority);tmpsub=tmpsub>>tmppriority;tmppriority=(uint32_t)NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority<NVIC_IRQChannelSubPriority&tmpsub;tmppriority=tmppriority<<0x04;NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel]=tmppriority;/*EnabletheSelectedIRQChannels--------------------------------------*/NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel>>0x05]=(uint32_t)0x01<<(NVIC_InitStruct->NVIC_IRQChannel&(uint8_t)0x1F);}else{/*DisabletheSelectedIRQChannels-------------------------------------*/NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel>>0x05]=(uint32_t)0x01<<(NVIC_InitStruct->NVIC_IRQChannel&(uint8_t)0x1F);}}

本站聲明: 本文章由作者或相關(guān)機構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點,本站亦不保證或承諾內(nèi)容真實性等。需要轉(zhuǎn)載請聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請及時聯(lián)系本站刪除( 郵箱:macysun@21ic.com )。
換一批
延伸閱讀
關(guān)閉