2014-04-01 03:38 AM
STM32CubeMx generate code for STM32F407VGTx
I chek box '' DMA2 Stream0 global interrupt'' in '' NVIC Configuration'' STM32CubeMx not add in stm32f4xx_hal_msp.c - HAL_NVIC_EnableIRQ:void
HAL_ADC_MspInit(ADC_HandleTypeDef* hadc){
GPIO_InitTypeDef GPIO_InitStruct;
if
(hadc->Instance==ADC1)
{
...
HAL_NVIC_EnableIRQ(DMA2_Stream0_IRQn);
// No Add
}
}
#stm32cubemx-dma-interrupt-nvic
2014-04-02 01:50 AM
Hello Alex,
Can you please describe what you want to do. You are showing ADC related initialization code below. Thanks.2014-04-02 02:47 AM
Hello,
This is fixed in the latest available release of STM32CubeMX.The initialization code of interrupt for DMA will be generated into the void MX_DMA_Init(void) as bellow:void MX_DMA_Init(void) { /* DMA controller clock enable */ __DMA2_CLK_ENABLE(); /* DMA interrupt init */ /* Sets the priority grouping field */ HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0); HAL_NVIC_SetPriority(DMA2_Stream0_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA2_Stream0_IRQn);}2014-04-02 06:22 AM
All right. It works. Question 2. Why DMA Continuous Requests only available when Independent mode?
2014-04-03 12:42 AM
If you switch to a multiple mode (dual or triple), and if it is possible to use the DMA transfer, you have to use the ''DMA Access Mode'' parameter that will be available in the common settings section.
Best regards,Amel.2014-04-03 01:13 AM
STM32Cube_FW_F4_V1.1.0\Projects\STM324x9I_EVAL\Examples\ADC\ADC_DualModeInterleaved\Src\main.c
If AdcHandle1.Init.DMAContinuousRequests = ENABLE; is removed, the DMA interrupt is not activated. STM32CubeMx does not add this line.2014-04-03 07:54 AM
2014-04-08 03:55 AM
In version 4.1.0 you broke change ADC channels, changes are not saved. (saved, but they differ sorce code.)