RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1,ENABLE);RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1,DISABLE);
时间: 2023-08-24 22:15:01 浏览: 399
RCC.zip_stm32 rcc
这段代码是用来控制STM32的SPI1外设的复位功能的。根据引用\[1\],函数RCC_APB2PeriphResetCmd()用于强制或释放APB2总线上的外设复位。第一个参数RCC_APB2Periph_SPI1指定了要复位的外设,而第二个参数ENABLE表示要强制复位该外设。根据引用\[2\],如果NewState参数不等于DISABLE,那么就会将RCC_APB2Periph参数的对应位设置为1,即使能该外设。如果NewState参数等于DISABLE,那么就会将RCC_APB2Periph参数的对应位设置为0,即禁用该外设。所以,RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1,ENABLE)会强制复位SPI1外设,而RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1,DISABLE)会释放SPI1外设的复位。
#### 引用[.reference_title]
- *1* [RCC_APB2PeriphResetCmd(0X01FC,DISABLE)](https://blog.csdn.net/gtkknd/article/details/52879981)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [STM32F103固件库源码解析——RCC_APB2PeriphClockCmd](https://blog.csdn.net/qq_37253168/article/details/113726821)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [STM32管脚的复用和重定义功能(RCC_APB2Periph_AFIO)](https://blog.csdn.net/ZIIllIIll/article/details/118244895)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文