Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support stepper with TLE8888 #1120

Closed
rusefi opened this issue Feb 2, 2020 · 9 comments
Closed

Support stepper with TLE8888 #1120

rusefi opened this issue Feb 2, 2020 · 9 comments

Comments

@rusefi
Copy link
Collaborator

rusefi commented Feb 2, 2020

looks like microRusEfi hardware is set to use two H-bridges for stepper control already. Maybe it would be possible for TLE8888 to control stepper IAC?

This task probably consists of TLE8888 initialization part and generic #1088

@rusefi
Copy link
Collaborator Author

rusefi commented Feb 2, 2020

@dron0gus would you be interested to implement the TLE8888 initialization part or the whole change?

@mck1117
Copy link
Member

mck1117 commented Feb 2, 2020

Hmm, this may actually be zero additional work once #1121 goes in. The tle8888 outputs just need to get configured as DC motors (which you'll be able to do with #1121, since they're just normal GPIO), so this may just work.

@dron0gus
Copy link
Member

dron0gus commented Feb 2, 2020

@mck1117 I agree.
We can just hack/modify tle8888 driver, so OUT21..OUT24 will be initialized as Push-Pulls.
Or
We can use ->setPadMode gpio-driver hook to set OD or PP mode. This is not implemented yet, I can do it.
But, in #1121 you are using DcMotor which is using SimplePwm which is initializing OutputPin with simple initPin(msg, brainPin) without special mode... So gpio-driver hook will be called with OM_DEFAULT mode. As it is done for all other pins used in Open-Drain mode.
There is some mess with output pin modes. For example for Injector pins we shouls use OD mode when using external gpio-chip. And push-pull when MOSFET is driven directly from MCU pin.
Also there is some mess with logic levels. We pass '1' to gpio-chip to open MOSFET and actually output '0'. Same question for Push-Pulls output of TLE8888. What value should be set on output when output is PP and tle8888_writePad(data, pin, 1) is called?
Sorry for offtopic.

@mck1117
Copy link
Member

mck1117 commented Feb 5, 2020

I think for now we could just make those tle8888 outputs permanently pushpull, and come back around to setting them properly later.

re: polarity, for a stepper it actually doesn't matter. So for this particular use case nobody will notice if it's inverted or not, since the stepper will still work fine. We should open a separate issue for figuring out what to do about tle8888 (and similar gpiochip) outputs with a configurable mode.

@dron0gus
Copy link
Member

413839f and 342c624

@rusefillc
Copy link
Contributor

rusefillc commented Nov 11, 2020

Next step: need to be tested in US

See #1936
See #1125

@rusefillc
Copy link
Contributor

JRD McLAREN 4:58 AM
(IDLE stepper coil 2+) are twice on https://rusefi.com/docs/pinouts/microrusefi/ on PIN33 and PIN43 ..
4:58
one of them seems to be "minus" ...

@dron0gus
Copy link
Member

dron0gus commented Jan 7, 2022

TLE8888 fix #3748
Settings #3749
Code #3751

@dron0gus
Copy link
Member

dron0gus commented May 7, 2023

@rusefillc done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants