2017-02-21 02:10 PM
Hi.
I am trying to generate code via STMcubeMX for UART via DMA. I have configured the UART and DMA correctly to my liking, but when I press generate source code the only code for the DMA is:
/**
* Enable DMA controller clock */static void MX_DMA_Init(void) { /* DMA controller clock enable */ __HAL_RCC_DMA1_CLK_ENABLE();}
When I look into the logfile for
STMcubeMX I can see when it is trying to generate the code for the DMA it gives these errors:
[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (Channel) has Id (UART5_RX) currently not set
[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (PeriphDataAlignment) has Id (UART5_RX) currently not setINFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (MemDataAlignment) has Id (UART5_RX) currently not set[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (Mode) has Id (UART5_RX) currently not set[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (FIFOMode) has Id (UART5_RX) currently not set[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (FIFOThreshold) has Id (UART5_RX) currently not set[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (FIFOThreshold) has invalid value (null)[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (MemBurst) has Id (UART5_RX) currently not set[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (MemBurst) has invalid value (null)[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (PeriphBurst) has Id (UART5_RX) currently not set[INFO] ImportTextPane:147 - (OptionalMessage_ERROR) IP (DMA) : Parameter (PeriphBurst) has invalid value (null)When i look at the parameters it throws an error for I can see that it is set.
Do anyone have a solution so I can generate code for the DMA?
Attached is the log-file and the IOC-file
#dma #stmcubemx #optionalmessage_error2017-02-21 03:21 PM
I have no trouble with CubeMX, for the DMA on Usarts... on the '091
are you using 1.7.0 ?
which processor is it ?
2017-02-22 01:36 AM
My STMcubeMX is on version 4.1.9, i am using STM32F446ZETx.
2017-02-22 02:34 AM
Hello
,Which version of HAL are you using ?
I created new project with your same configuration and I have
MX_DMA_Init() function as below
:/** * Enable DMA controller clock */static void MX_DMA_Init(void){ /* DMA controller clock enable */ __HAL_RCC_DMA1_CLK_ENABLE();/* DMA interrupt init */ /* DMA1_Stream0_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Stream0_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Stream0_IRQn); /* DMA1_Stream1_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Stream1_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Stream1_IRQn);}�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
Try creating new project in proper/new folder, thenkeep me informed about your updates.
Regards
Imen
2017-02-22 03:31 AM
My STMcubeMX is on version 4.1.9
You should use the last version of STM32CubeMX 4.19.0
2017-02-22 03:52 AM
When I generated a new file I got the correct code and no errors in the log-file. Weird that it didn't work on my original project. I used version 1.6.0 of HAL.
2017-02-22 04:33 AM
Oh, sorry, I meant 4.19.0,