2025-11-11 4:46 AM - last edited on 2025-11-11 4:51 AM by Andrew Neil
Hello STM32 community,
I am working with the Infineon TLE9879QxA40 BLDC Shield designed for Arduino Uno (5V logic) and trying to control it using STM32F407 (3.3V logic). Although the SPI communication setup matches the Arduino example, the motor does not respond.
Key points to note:
The TLE9879 shield’s digital I/O and SPI interface operate at 5V logic levels, powered by an internal 5V regulator, as specified in the datasheet and official shield hardware design.
Arduino Uno outputs 5V signals natively, so it communicates directly with the TLE9879 without issues.
STM32F407 GPIOs operate at 3.3V logic levels and cannot be configured to output 5V signals internally.
Without external level shifting on MOSI, SCLK, and CS lines, the 3.3V signals are insufficient to reliably trigger the TLE9879 inputs, resulting in failed communication.
Additionally, 5V outputs from the TLE9879 can damage STM32 inputs if those pins are not 5V tolerant.
Proper operation requires implementing level shifting circuits to convert between STM32’s 3.3V and TLE9879’s 5V digital logic levels for bidirectional SPI lines.
If you’ve encountered similar issues or have recommendations for reliable level shifting techniques for this interface, please share.
Thank you!
2025-11-11 5:46 AM - edited 2025-11-11 7:02 AM
@Ash1 wrote:
The TLE9879 shield’s digital I/O and SPI interface operate at 5V logic levels, powered by an internal 5V regulator, as specified in the datasheet and official shield hardware design.
Arduino Uno outputs 5V signals natively, so it communicates directly with the TLE9879 without issues.
STM32F407 GPIOs operate at 3.3V logic levels and cannot be configured to output 5V signals internally.
Without external level shifting on MOSI, SCLK, and CS lines, the 3.3V signals are insufficient to reliably trigger the TLE9879 inputs, resulting in failed communication.
Indeed, based on TLE9879 datasheet, VIH min = 0.7*VDDP = 0.7*5V = 3.5V > VDD MCU:
So the levels of STM32 output high level is not seen as high level from TLE9879.
@Ash1 wrote:
Proper operation requires implementing level shifting circuits to convert between STM32’s 3.3V and TLE9879’s 5V digital logic levels for bidirectional SPI lines.
Indeed you need to implement level shifting circuit. There are many methods to implement that by hardware either by transistors or by a dedicated circuit level shifter, example TXS0108E IC. Watch this video.
I can also suggest 74LVC1T45:
@Ash1 wrote:
- Additionally, 5V outputs from the TLE9879 can damage STM32 inputs if those pins are not 5V tolerant.
Most of the IOs are FT. So you need to select the ones with FT label.
Hope that helps.