cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE MX USART2 -> "no available dma requests for this peripheral"

Robmar
Senior III

STM32F407VG: USART2 DMA for TX is working fine, but CubeIDE MX is reporting "no available dma requests for this peripheral" when I try to add DMA for RX.

I have DMA set for SPI TX only, and two ADCs, so why would there be a limitation?

Can't easily swap to another UART given the IO setup, any ideas would be welcome.

6 REPLIES 6
Robmar
Senior III

The issue is about DMA1 Stream 5 needed by USART2 as per Table 42 DMA 1 request mapping (man 090), and I2S, which uses SPI3 on the same Stream 5 or Stream 7. I have SPI3 on Stream 7, but MX configurator is getting in a twist, its logic seems to fail, and it won't accept SPI3 on Stream 7 to free Stream5 for USART2! Anyone come across this with the MX tool?

I guess I could code it manually, see if that works.

Semer CHERNI
ST Employee

Hello @Robmar​ 

First let me thank you for posting.

Could you provide the CubeMx version you are using.

Because in my case using the CubeMX 6.7.0 I am not able to reproduce the described behavior.

I am able to set the USART2_TX on DMA1 Stream 5  and SPI3_TX on DMA1 Stream 7.

KR,

Semer.

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.

Robmar
Senior III

Hi, I´m using the following:

STM32CubeIDE Version: 1.11.2 Build: 14494_20230119_0724 (UTC)

I can't find anywhere details of the MX configurator version.

To solve the problem I manually changed SPI3 to use DMA1 Stream 7, then added the code manually using DMA1 Stream5 for RX on USART2.

Maybe if MX could be changed to give more details of the assignment restrictions, and at least suggest that users refer to the table in the 090 manual, rather than just stating that there are no available "requests", unless STM managers can allocate the time to make it capable of handling resource remapping.

Semer CHERNI
ST Employee

Hello @Robmar​ 

The weird thing here is that CubeMx should resolve those conflict and that's the case for me.

This is the scenario that I have followed and it works fine using STM32CubeIDE Version: 1.11.2

  • Activate SPI and add SPI3_TX DMA request and select the DMA1 Stream 5

0693W00000YAN2BQAX.png

  • Activate USART2 and add USART2_RX request

==> The USART2_RX request will be affected automatically to the DMA1 Stream 5

0693W00000YAN2pQAH.png==> The SPI3_TX stream settings will be changed to DMA1 Stream 7

0693W00000YAN34QAH.pngI also attached the *.ioc file which contains my configuration for reference.

KR,

Semer.

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.

Robmar
Senior III

As I imported an .ioc from 2016, maybe this makes a difference and produced errors in the imported project data.

I also have the weirdest thing going on with files in the project, it lets me view and double click the files listed for the project, but at compile time it uses headers from a parallel directory that is not even listed in the view, so I have to copy duplicates across.

Running the code in debug it starts downloading then shows an execution point that is the current old code running, was very confusing, but if I wait another minute it reboots to the correct location with the new code.

Its also impossible to change the MCU selection, which is a pain if users want to update the project to another chip. I had to edit the project files text and binary, replacing about 15 references to the 32F411 and replacing with the correct 32F407 string, took about half an hour to figure it out, but much quicker than creating a new project and importing around 500 files!

There are several other wierd things it does, qwirks, but knowing them now I can work around them.

hi Romber

I'm not mean to bother you,but could you tell me how you fix the problem?

it seems that i meet the same situation

thanks again.屏幕截图 2024-03-18 185526.png