cancel
Showing results for 
Search instead for 
Did you mean: 

SPI open drain config on STM32U5G9J-DK2

math_rock
Associate

Greetings to the community,

After digging around the relevant documentations and the reference manual for the chip family (STM32U5xxx), I couldn't find any relevant info on configuring SPI protocol to be in open drain config. The idea is to power the SPI protocol with 5V using the open drain configuration.

In addition, while storming through the config part of the IDE - only pull up/down alt. configs are available. Since there is one slight mention on the following page of the reference manual (2894/3637, right under figure 838), I wanted to ask if there is a bug in the IDE, or the open drain config could be manually done (eg. within the GPIO init) or for this concrete MCU this config is unavailable on SPI1?

 

Thank you all in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @math_rock ,

Thank you for rising this up. 

You are right ! SPI config should have as GPIO mode values: "Alternate Function Push Pull" and "Alternate Function Open Drain".

This was the subject of the internal ticket ID 148543: [CubeMX-SPI] Alternate function open drain not available for SPI.

Our team is very aware of this issue and working to resolve this.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

2 REPLIES 2
Imen.D
ST Employee

Hello @math_rock ,

Thank you for rising this up. 

You are right ! SPI config should have as GPIO mode values: "Alternate Function Push Pull" and "Alternate Function Open Drain".

This was the subject of the internal ticket ID 148543: [CubeMX-SPI] Alternate function open drain not available for SPI.

Our team is very aware of this issue and working to resolve this.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hi @Imen.D ,

Thank you for the reply! I understand now, good to know. But now I have a alternative question for a potential workaround. Will it be ok to manually override GPIO configs after code generation to open drain alternative function? Will this cause any potential damage to the board?

Thanks in advance :)