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

AS5048A encoder issue #478

Closed
Zhaotianzheng opened this issue Sep 2, 2020 · 6 comments
Closed

AS5048A encoder issue #478

Zhaotianzheng opened this issue Sep 2, 2020 · 6 comments

Comments

@Zhaotianzheng
Copy link

Zhaotianzheng commented Sep 2, 2020

1.When I am using the SPI, I find that it will make drv8301 can not be configured and hault in motor configuration stage. I am currently make the cs pin to be high before moter configuration but I don't think this is a good idea. So I want to know if there is a better way to use SPI?
2. After it can use, I find I have to configure the cpr to 2^14 - 1 to make it work, otherwise it will give a strange vel_esitimate and get the overspeed error. So I think maybe the cpr should be 2^14 -1 or just something I did is not right.

Thank you for your helping.

@ionelanton
Copy link

ionelanton commented Sep 2, 2020

Hi!
I have the same problem. When I run requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE nothing happens.
I followed the instructions here: https://github.com/madcowswe/ODrive/blob/rc-v0.5.1/docs/encoders.md

How do you make the CS pin to be high?

@Zhaotianzheng
Copy link
Author

In the Axis::setup() function I add the CS pin configuration code to make it to high. Just configure the GPIO and write high to it.

@PAJohnson
Copy link
Collaborator

Hi Zhaotianzheng. Which firmware branch are you using? Devel, Master, rc-v0.5.1?

@Wetmelon
Copy link
Collaborator

Wetmelon commented Sep 3, 2020

A hotfix has been applied to devel and rc-v0.5.1 branches. There is a setup procedure required:

  • Disconnect absolute encoders
  • Configure encoders in odrivetool with correct CS pins & mode
  • Save config
  • Turn off power to the ODrive
  • Plug in absolute encoders
  • Turn power on

This should only be necessary for the first time, because we don't drive the GPIOs high unless the axis is configured for absolute SPI.

@Zhaotianzheng
Copy link
Author

Hi Zhaotianzheng. Which firmware branch are you using? Devel, Master, rc-v0.5.1?

I used the old version, now with the rc-v0.5.1 I have no problem. Thanks.

@Zhaotianzheng Zhaotianzheng reopened this Sep 3, 2020
@Zhaotianzheng
Copy link
Author

A hotfix has been applied to devel and rc-v0.5.1 branches. There is a setup procedure required:

Disconnect absolute encoders
Configure encoders in odrivetool with correct CS pins & mode
Save config
Turn off power to the ODrive
Plug in absolute encoders
Turn power on

This should only be necessary for the first time, because we don't drive the GPIOs high unless the axis is configured for absolute SPI.

Thank you, I didn't use the rc-v0.5.1. Now I have no lock up problem with the new version.

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

4 participants