问答

汇集网友智慧,解决技术难题

daye520

TA的家园币:125  

  • 各位帅哥,问下stm32的DMA问题

    使用STM32f103c8t6标准库,的TIM1TRGO触发ADC注入组采样(2个通道),通过DMA传输进AD_Value[2]中在程序中可以使用ADC_GetInjectedConversionValue获得AD值,也可以直接读取JDRx来获得,就是无法通过DMA来读取问问各位帅哥,这是为什么?程序如下(gpio没有用到)#include"stm32f10x.h"//Deviceheader#include#includeuint16_ta=0;intmain(void){uint16_tAD_Value[2]={0};RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1,ENABLE);RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE);RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1,ENABLE);RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1,ENABLE);RCC_ADCCLKConfig(RCC_PCLK2_Div6);GPIO_InitTypeDefgpioa0_1;gpioa0_1.GPIO_Mode=GPIO_Mode_AIN;gpioa0_1.GPIO_Pin=GPIO_Pin_0|GPIO_Pin_1;gpioa0_1.GPIO_Speed=GPIO_Speed_50MHz;GPIO_Init(GPIOA,&gpioa0_1);//没有用到TIM_TimeBaseInitTypeDeftim2init;//名字懒得改tim2init.TIM_ClockDivision=TIM_CKD_DIV1;tim2init.TIM_CounterMode=TIM_CounterMode_Up;tim2init.TIM_Period=10000-1;//周期tim2init.TIM_Prescaler=7200-1;//分频1stim2init.TIM_RepetitionCounter=0;TIM_TimeBaseInit(TIM1,&tim2init);TIM_SelectOutputTrigger(TIM1,TIM_TRGOSource_Update);TIM_ITConfig(TIM1,TIM_IT_Update,ENABLE);NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);NVIC_InitTypeDefnvictim3init;//名字懒得改nvictim3init.NVIC_IRQChannel=TIM1_UP_IRQn;nvictim3init.NVIC_IRQChannelCmd=ENABLE;nvictim3init.NVIC_IRQChannelPreemptionPriority=2;nvictim3init.NVIC_IRQChannelSubPriority=1;NVIC_Init(&nvictim3init);ADC_InitTypeDefadc0_1;//名字懒得改adc0_1.ADC_ContinuousConvMode=DISABLE;adc0_1.ADC_DataAlign=ADC_DataAlign_Right;adc0_1.ADC_ExternalTrigConv=ADC_ExternalTrigConv_None;adc0_1.ADC_Mode=ADC_Mode_Independent;adc0_1.ADC

    STM32 DMA AD dc ADC TI

    2024-12-28 4
  • 请问题这是什么原因,ST89C516的单片机,RAM不够?才191

    ***ERRORL105:PUBLICREFERSTOIGNOREDSEGMENTSYMBOL:ARR_KEY_UNITSEGMENT:?DT?KEYMODEL***ERRORL105:PUBLICREFERSTOIGNOREDSEGMENTSYMBOL:KEY_SCTSEGMENT:?DT?KEYMODELProgramSize:data=191.1xdata=0code=6432Targetnotcreated这几天被这问题弄得头大

    单片机 st89c51 RAM se RS

    2020-12-23 3