Skip to main content
Associate
March 21, 2024
Question

The pwm is generating ramp signals when using sensor with i2c interface

  • March 21, 2024
  • 3 replies
  • 1181 views

hello everyone, I am trying to combine a H-bridge-based motor controller and a sensor connected by i2c with stm32g032k8txx. They both work when i run on different microcontrollers, but when I combine them, the sensor is working fine but the PWM of the STM32 gets abnormal, like the output is something like a ramp signal (the motor initially starts at a slow speed and gradually increases to a high speed and stops. After some time, it starts again). Please help me if anyone knows about this problem.

This topic has been closed for replies.

3 replies

mƎALLEm
ST Technical Moderator
March 21, 2024

Hello,

You need to provide more details about your HW/Schematics it could be a conflicting HW ressources. If you're using CubeMx share your .ioc file.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Associate
March 22, 2024

@mƎALLEm i have attached the ioc file of the project so please check

mƎALLEm
ST Technical Moderator
March 22, 2024

You need to check your HW before going to check the Software.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.