STM32 DMA Macro Exporting

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

Moderator: RoccoMarco

Post Reply
meatball
Posts: 32
Joined: Thu May 19, 2016 4:39 pm
Has thanked: 9 times
Been thanked: 2 times

STM32 DMA Macro Exporting

Post by meatball »

The notes in the STM32 -> LLD -> DMAv1 -> notes.txt say's the following:


The file registry must export:

STM32_ADVANCED_DMA - TRUE not used by the DMA drivers but other
drivers use it to enable checks on DMA
channels. Probably will be removed in the
future.
STM32_DMA_SUPPORTS_CSELR - TRUE if the DMA have a CSELR register.
STM32_DMAn_NUM_CHANNELS - Number of channels in DMAs "n" (1..2).
STM32_DMAn_CHx_HANDLER - Vector name for IRQ "x" (1..7). If the macro
is not exported then the ISR is not declared.
STM32_DMAn_CHx_NUMBER - Vector number for IRQ "x" (1..7).


I can't get my port to Embitz IDE to build because of these HAL DMA definitions. They do not appear to be defined anywhere, but are checked for and used by loads of macros. I suppose I need to define these somewhere. Is that what the note means by "export"? Where should I define these things?

The file registry must export:


Registry? Does it mean to define these in stm32_registry.h?

Any advice on where to put these, and what to set them as? It is just not clear enough for me to feel comfortable moving forward without breaking the configuration.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32 DMA Macro Exporting

Post by Giovanni »

Hi,

Yes, it is stm32_registry.h. You don't need to define anything, the provided registry files already contain those definitions.

Giovanni
meatball
Posts: 32
Joined: Thu May 19, 2016 4:39 pm
Has thanked: 9 times
Been thanked: 2 times

Re: STM32 DMA Macro Exporting

Post by meatball »

Thanks. I think STM32F4 should use the DMAv2 module, not v1. This must have changed between ChibiOS 3 and 16.1.4.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32 DMA Macro Exporting

Post by Giovanni »

Hi,

Yes, it changed, now DMA drivers are "unified". It is a good practice to make sure to take all the material from the same version, everything progresses as a whole.

Giovanni
Post Reply