Hello! I'm working with several digital servomotors and I need to deal with overload situation. In case when my servomotor stays in overload state for too long I need to turn off the servomotor. I don't want to power off them so I'm looking for a function to turn off PWM signal.
Currently, I'm using mcpwm_gpio_init() and mcpwm_init() functions. But i cant find deinit functions.
I've searched deeper and find out, that there are functions gpio_matrix_out and gpio_matrix_in which, on my thoughts, do the mapping of MCPWM unit to certain GPIO. But I've bumped into some signalIdx parameter which I do not understand.
Can you help me please not to burn all my servomotors? ))
How to remove PWM signal from the pin?
Re: How to remove PWM signal from the pin?
you dont need to de-init the pin. just set the PWM to 0.
Re: How to remove PWM signal from the pin?
Thanks for answering, username!
I was trying to do this also, but functions mcpwm_set_duty_in_us, mcpwm_set_signal_low and several others do not work properly. PWM signal still present on GPIO. Can you show me the function to switch it off?
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: How to remove PWM signal from the pin?
It may be useful to figure out why the mcpwm functions don't do what you expect, but to answer your initial question: you can use gpio_reset_pin() to disconnect a GPIO from a peripheral.
Re: How to remove PWM signal from the pin?
Thanx for helping!
Who is online
Users browsing this forum: No registered users and 126 guests