cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405RGT6 + SDIO + CAN + USB_OTG_FS + I2C + UART + SPI

CKerr.1
Associate II

Hello,

I’m designing a board with the STM32F405RGT6 MCU.

I will be connecting the board to multiple sensors; therefore, 

I will need all of the following ports enabled: 

CAN, SDIO, USB_OTG_FS, UART, I2C, and SPI.

I was configuring the board in STM32CubeMX.

I first enabled USB_OTG_FS as "Device_Only" with its pin defaults.

Then I enabled SDIO and it defaulted to its respective pins in CubeMX.

I then enabled CAN, which also defaulted to its respective pins.

However, when CAN and USB_OTG_FS was enabled, the SDIO indicator in the “Connectivity�? section got a caution icon to its left. When I move my mouse over the caution icon, the tool-tip message appears with text as follows:

   

   Partly disabled conflict with:

   CAN1: Master Mode

I wasn’t able to find any information describing the conflict.

1. Is it possible to enable both CAN and SDIO for this MCU?

(I’m assuming YES.)

2. What is this conflict? How can the conflict be mitigated?

3. What must I do to enable both CAN and SDIO on this MCU?

4. Is there a good source of documentation for configuring CAN and SDIO?

Thanks

7 REPLIES 7
KnarfB
Principal III

If you hold Ctrl key while clicking on a already assigned (green) pin, CubeDE/MX shows you alternative pins (blue) where you can reassign the pin function by drag&drop. But, in your case, it worked for me without any reassignments, maybe I'm missing some constraints:

0693W000004IswMQAS.png

If you don't like clicking, there are tables in the data sheet where you can play an "8 queens" like pin assignment game.

CKerr.1
Associate II

Yes, I forgot to mention one more piece of data: I also have USB_OTG_FS selected as "Device_Only".

(I updated my initial post to include USB_OTG_FS.)

If I deselect it, then my SDIO is OK with no yellow icon beside it.

Is it truly due to pin assignments or something else?

I first thought that it was because of pin assignments.

However, when selecting only USB_OTG_FS as "Device_Only", and disabling SDIO, only PA11 and PA12 pins are set.

When selecting only SDIO as "SD 4 bits Wide bus", and disabling USB_OTG_FS, the pins that are set are:

PC8, PC9, PC10, PC11, PC12, and PD2.

Therefore, it doesn't look like there are pin conflicts?

If I have SDIO selected with CAN, I2C, and UART, but without USB_OTG_FS, everything is fine.

When I add USB_OTG_FS, then the warning icon comes beside SDIO.

When I move my mouse over the caution icon, the tool-tip message appears with text as follows:

   

   Partly disabled conflict with:

   CAN1: Master Mode

But again, CAN is using different pins--PB8 and PB9.

The following is my screen shot:

 0693W000004J31VQAS.jpg

Please assist.

MM..1
Chief

Warning is not problem only report that some function here SDIO is impossible,

for your config was in conflict MMC8bits mode SDIO

0693W000004J2V5QAK.jpg

Hello,

I'm not sure that I understand this response?

1. Is it possible to enable USB_OTG_FS, CAN and SDIO for this MCU?

(I’m assuming YES.)

2. What is this conflict? How can the conflict be mitigated?

3. What must I do to enable USB_OTG_FS, CAN and SDIO on this MCU?

4. Is there a good source of documentation for configuring USB_OTG_FS, CAN and SDIO?

Thanks

> 1. Is it possible to enable USB_OTG_FS, CAN and SDIO for this MCU? (I’m assuming YES.)

As of your last screen dump: yes

> 2. What is this conflict? How can the conflict be mitigated?

Yellow means that there are some configurations of SDIO which conflict. As @MM..1​  said and showed: if you drop down the list of possible SDIO configurations, some, but not all, are red. In this particular case only one SDIO config conflicts: SDIO using as MMIO with 8-bit wide data bus.

Mitigation: dont use SDIO in MMIO with 8-bit wide data bus mode (I think you never wanted that mode).

There is no conflict if you select SD 4 bits wide mode for example.

> 3. What must I do to enable USB_OTG_FS, CAN and SDIO on this MCU?

Screen dumps look okay, generated your C code from that.

> 4. Is there a good source of documentation for configuring USB_OTG_FS, CAN and SDIO?

For the tool in general: UM1718 User manual STM32CubeMX for STM32 configuration and initialization C code generation.

KnarfB,

Thank you for your direct answers. I think that I now understand. The yellow, caution sign is for potential problems that may arise depending upon specific configurations. Since I don't have those configurations, SDIO MMC 8 bits wide bus, then the hardware as configured is good for code generation.

Your response has been very, very helpful!!

Thank You!

Thank you MM..1.

I now understand what you were trying to say.