91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.69MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-08-10
  • 語言: 其他
  • 標簽: ad??

資源簡介

STM32的無刷直流電機控制方案

資源截圖

代碼片段和文件信息

#include?“includes.h“



uint16_t?ADCConvertedValue=1;;

void?ADC_GPIOConfig(void)
{
GPIO_InitTypeDef?GPIO_InitStruct;

//作為模擬通道10輸入引腳?????????????????????????
????GPIO_InitStruct.GPIO_Pin?=?ADC01_Pin;
????GPIO_InitStruct.GPIO_Mode?=?GPIO_Mode_AIN;
????GPIO_Init(ADC01_PORT?&GPIO_InitStruct);
}
/**********************************************************************
*?Description????:?None
*?Input??????????:?None
*?Output?????????:?None
*?Return?????????:?None
*?Attention??????:?None
**********************************************************************/
void?BLDC_AdcConfig(void)?//DMA1_channel_1和ADC_IN10
{

ADC_InitTypeDef?ADC_InitStructure;
DMA_InitTypeDef?DMA_InitStructure;

/*?DMA1?channel?1?configuration?----------------------------------------------*/
??DMA_DeInit(DMA1_Channel1);
??DMA_InitStructure.DMA_PeripheralbaseAddr?=?0x4001244C;
??DMA_InitStructure.DMA_MemorybaseAddr?=?(u32)&ADCConvertedValue;
??DMA_InitStructure.DMA_DIR?=?DMA_DIR_PeripheralSRC;
??DMA_InitStructure.DMA_BufferSize?=?1;
??DMA_InitStructure.DMA_PeripheralInc?=?DMA_PeripheralInc_Disable;
??DMA_InitStructure.DMA_MemoryInc?=?DMA_MemoryInc_Enable;
??DMA_InitStructure.DMA_PeripheralDataSize?=?DMA_PeripheralDataSize_HalfWord;
??DMA_InitStructure.DMA_MemoryDataSize?=?DMA_MemoryDataSize_HalfWord;
??DMA_InitStructure.DMA_Mode?=?DMA_Mode_Circular;
??DMA_InitStructure.DMA_Priority?=?DMA_Priority_High;
??DMA_InitStructure.DMA_M2M?=?DMA_M2M_Disable;
??DMA_Init(DMA1_Channel1?&DMA_InitStructure);
??
??/*?Enable?DMA1?channel1?*/
??DMA_Cmd(DMA1_Channel1?ENABLE);

??/*?ADC1?configuration?------------------------------------------------------*/
??ADC_InitStructure.ADC_Mode?=?ADC_Mode_Independent;//獨立工作模式
??ADC_InitStructure.ADC_ScanConvMode?=?ENABLE;//掃描方式
??ADC_InitStructure.ADC_ContinuousConvMode?=?ENABLE;//連續轉換
??ADC_InitStructure.ADC_ExternalTrigConv?=?ADC_ExternalTrigConv_None;//外部觸發禁止
??ADC_InitStructure.ADC_DataAlign?=?ADC_DataAlign_Right;//數據右對齊
??ADC_InitStructure.ADC_NbrOfChannel?=?1;//8;//用于轉換的通道數
??ADC_Init(ADC1?&ADC_InitStructure);

??/*?ADC1?regular?channels?configuration?[規則模式通道配置]*/?
??ADC_RegularChannelConfig(ADC1?ADC_Channel_10??1?ADC_SampleTime_239Cycles5);?

??/*?Enable?ADC1?DMA?[使能ADC1?DMA]*/
??ADC_DMACmd(ADC1?ENABLE);
??
??/*?Enable?ADC1?[使能ADC1]*/
??ADC_Cmd(ADC1?ENABLE);??

??/*?Enable?ADC1?reset?calibaration?register?*/???
??ADC_ResetCalibration(ADC1);
??/*?Check?the?end?of?ADC1?reset?calibration?register?*/
??while(ADC_GetResetCalibrationStatus(ADC1));

??/*?Start?ADC1?calibaration?*/
??ADC_StartCalibration(ADC1);
??/*?Check?the?end?of?ADC1?calibration?*/
??while(ADC_GetCalibrationStatus(ADC1));
??
??/*?Start?ADC1?Software?Conversion?*/
??ADC_SoftwareStartConvCmd(ADC1?ENABLE);
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-03-22?09:55??BLDC_STM32_V2\
?????目錄???????????0??2012-03-14?23:40??BLDC_STM32_V2\App\
?????目錄???????????0??2012-03-15?00:01??BLDC_STM32_V2\App\inc\
?????文件?????????220??2013-03-01?19:17??BLDC_STM32_V2\App\inc\AppADC.h
?????文件?????????351??2011-12-17?00:28??BLDC_STM32_V2\App\inc\AppBLDC.h
?????文件?????????812??2011-12-16?00:17??BLDC_STM32_V2\App\inc\AppKey.h
?????文件?????????432??2011-12-15?23:25??BLDC_STM32_V2\App\inc\BLDCInit.h
?????文件????????2817??2012-03-15?00:02??BLDC_STM32_V2\App\inc\includes.h
?????文件?????????399??2012-01-08?18:38??BLDC_STM32_V2\App\inc\Lcd_1602_6wires.h
?????文件?????????196??2011-12-16?00:13??BLDC_STM32_V2\App\inc\LED.h
?????目錄???????????0??2012-03-15?00:01??BLDC_STM32_V2\App\src\
?????文件????????2857??2013-03-01?19:17??BLDC_STM32_V2\App\src\AppADC.c
?????文件????????3463??2012-03-21?23:12??BLDC_STM32_V2\App\src\AppBLDC.c
?????文件????????5685??2013-03-01?19:23??BLDC_STM32_V2\App\src\AppKey.c
?????文件????????7309??2012-03-21?22:03??BLDC_STM32_V2\App\src\BLDCInit.c
?????文件????????4074??2013-03-01?19:26??BLDC_STM32_V2\App\src\Lcd_1602_6wires.c
?????文件????????1350??2011-12-12?22:03??BLDC_STM32_V2\App\src\LED.c
?????文件????????2006??2013-03-01?19:26??BLDC_STM32_V2\App\src\main.c
?????目錄???????????0??2012-03-14?23:40??BLDC_STM32_V2\Libraries\
?????目錄???????????0??2012-03-14?23:40??BLDC_STM32_V2\Libraries\inc\
?????文件????????8893??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\misc.h
?????文件???????21601??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_adc.h
?????文件????????7466??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_bkp.h
?????文件???????23230??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_can.h
?????文件????????6483??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_cec.h
?????文件????????2073??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_crc.h
?????文件???????15145??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_dac.h
?????文件????????3729??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_dbgmcu.h
?????文件???????20661??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_dma.h
?????文件????????6735??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_exti.h
?????文件???????25356??2010-10-18?20:09??BLDC_STM32_V2\Libraries\inc\stm32f10x_flash.h
............此處省略118個文件信息

評論

共有 條評論