Bug: Cube v4.17.0 / STM32Cube FW_F0 V1.6.0; DMA Initialisation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-10-24 12:56 AM
Posted on October 24, 2016 at 09:56
I have just updated to Cube v4.0 which I also think updated the firmware package for the chip I am using (STM32F030RCTx). There is a bug in the initialisation code for the DMA that causes the project not to be compiled at all.
Pre-update:__HAL_DMA1_REMAP(HAL_DMA1_CH3_SPI1_TX);
Post-update:
if (__HAL_DMA1_REMAP(HAL_DMA1_CH3_SPI1_TX) != HAL_OK)
{
Error_Handler();
}
The macro
__HAL_DMA1_REMAP
is defined as:#define __HAL_DMA1_REMAP(__REQUEST__) \
do { assert_param(IS_HAL_DMA1_REMAP(__REQUEST__)); \
DMA1->CSELR &= ~((uint32_t)0x0F << (uint32_t)(((__REQUEST__) >> 28) * 4)); \
DMA1->CSELR |= (uint32_t)((__REQUEST__) & 0x0FFFFFFF); \
}while(0)
It's easy to see why this will not work in an if statement. I am having to edit the code manually every time I generate the code.
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-10-24 1:45 AM
Posted on October 24, 2016 at 10:45
Hi goodman.stephen.001,
Thanks for highlighting this issue. It is reported internallySorry for any inconvenience it may bring.-Syrine-Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-10-26 4:46 AM
Posted on October 26, 2016 at 13:46
Thanks for you findings, the bug (399163) has been fixed in STM32CubeMX v4.18 that will be released W46
Best regards Daniel
​
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
