This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DMA1 channel problem

Hi guys,

i have a problem about selection of DMA1 channels. i'm using an example application. and i did some changes on it. Application uses DMA1_Channel3. i have changed channel as DMA1_Channel1. But compiler give this error message:

..\source\main.c(112): error: #20: identifier "DMA1_Channel1" is undefined

if i use DMA1_Channel3, there is no problem. i opened _map.h and i comfirmed that DMA1_Channel1 and DMA1_Channel3 are defined.

my DMA code is here:

  DMA_InitStructure.DMA_PeripheralBaseAddr = (u32)bellek1;
  DMA_InitStructure.DMA_MemoryBaseAddr = (u32)bellek2;
  DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
  DMA_InitStructure.DMA_BufferSize = 512;
  DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Enable;
  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_Normal;
  DMA_InitStructure.DMA_Priority = DMA_Priority_VeryHigh;
  DMA_InitStructure.DMA_M2M = DMA_M2M_Enable;
  DMA_Init(DMA1_Channel1, &DMA_InitStructure);

  //DMA_ITConfig(DMA1_Channel1, DMA_IT_TC | DMA_IT_HT | DMA_IT_TE, ENABLE);
  DMA_Cmd(DMA1_Channel1, ENABLE);
 </pre|


please help me.
best regards


0