DMA macro doesn't exist in Chibios 3.0

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
User avatar
ADI-mistrzu
Posts: 12
Joined: Mon Jun 29, 2015 8:37 am

DMA macro doesn't exist in Chibios 3.0

Post by ADI-mistrzu »

Hi,

I try use new Chibios 3.0, but when I try run some peripheral, then I stuck in:

Code: Select all

DMAv1/stm32_dma.c:69:40: error: 'STM32_DMA1_STREAM1_EVENT_NUMBER' undeclared here (not in a function)

It's look that:

Code: Select all

/*===========================================================================*/
/* Driver exported variables.                                                */
/*===========================================================================*/

/**
 * @brief   DMA streams descriptors.
 * @details This table keeps the association between an unique stream
 *          identifier and the involved physical registers.
 * @note    Don't use this array directly, use the appropriate wrapper macros
 *          instead: @p STM32_DMA1_STREAM1, @p STM32_DMA1_STREAM2 etc.
 */
const stm32_dma_stream_t __stm32_dma_streams[STM32_DMA_STREAMS] = {
  {DMA1_Channel1, &DMA1->IFCR, 0,   0, STM32_DMA1_STREAM1_EVENT_NUMBER},
  {DMA1_Channel2, &DMA1->IFCR, 4,   1, STM32_DMA1_STREAM2_EVENT_NUMBER},
  {DMA1_Channel3, &DMA1->IFCR, 8,   2, STM32_DMA1_STREAM3_EVENT_NUMBER},
  {DMA1_Channel4, &DMA1->IFCR, 12,  3, STM32_DMA1_STREAM4_EVENT_NUMBER},
  {DMA1_Channel5, &DMA1->IFCR, 16,  4, STM32_DMA1_STREAM5_EVENT_NUMBER},
#if STM32_DMA_STREAMS > 5
  {DMA1_Channel6, &DMA1->IFCR, 20,  5, STM32_DMA1_STREAM6_EVENT_NUMBER},
  {DMA1_Channel7, &DMA1->IFCR, 24,  6, STM32_DMA1_STREAM7_EVENT_NUMBER},
#endif
#if STM32_DMA_STREAMS > 7
  {DMA2_Channel1, &DMA2->IFCR, 0,   7, STM32_DMA2_STREAM1_EVENT_NUMBER},
  {DMA2_Channel2, &DMA2->IFCR, 4,   8, STM32_DMA2_STREAM2_EVENT_NUMBER},
  {DMA2_Channel3, &DMA2->IFCR, 8,   9, STM32_DMA2_STREAM3_EVENT_NUMBER},
  {DMA2_Channel4, &DMA2->IFCR, 12, 10, STM32_DMA2_STREAM4_EVENT_NUMBER},
  {DMA2_Channel5, &DMA2->IFCR, 16, 11, STM32_DMA2_STREAM5_EVENT_NUMBER},
#endif
};


I try found that, but its nowhere, probobly it's shut be STM32_DMA1_STREAM1 not STM32_DMA1_STREAM1_EVENT_NUMBER?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: DMA macro doesn't exist in Chibios 3.0

Post by Giovanni »

Hi,

You are using the wrong DMA driver, the one under \ChibiOS\os\hal\ports\STM32\LLD\DMAv1 is not yet complete. Please use the DMA driver under the various STM32 directories, for example \ChibiOS\os\hal\ports\STM32\STM32F4xx\stm32_dma.c.

Giovanni
Post Reply