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

Portenta H7 doesn't work with MKR Shield Dynamixel #389

Closed
Matt93-00 opened this issue Jan 21, 2022 · 6 comments
Closed

Portenta H7 doesn't work with MKR Shield Dynamixel #389

Matt93-00 opened this issue Jan 21, 2022 · 6 comments
Labels
bug Something isn't working Portenta

Comments

@Matt93-00
Copy link

Matt93-00 commented Jan 21, 2022

Hi people, I found this problem during my tests. I am working on a system made from portenta h7+ mkr shield dynamixel+dynamixel. I bought the mkr shield because from the documentation https://emanual.robotis.com/docs/en/parts/interface/mkr_shield/ it is said that it is compatible with portenta, but if I run any sketch coming from DYNAMIXEL2Arduino and DYNAMIXEL Shield library, no one dynamixel is found. This is the unique and similar problem that I found searching for a solution https://githubmemory.com/repo/ROBOTIS-GIT/DynamixelShield/issues/31?fbclid=IwAR0T3lvZX-R11zobuTbJ3CPwBFTTqHOCh5MW5lqRpuiRkYLMZkPwRuK9psc
Note that I know the id, baud rate, and protocol, so I can't be wrong on that. Also, the connection and the charge are good. In the end, if I use another board, for example, OpenCR, OpenCm, or Arduino Uno with the proper shield, I can drive the servo. Thus, the problem is directly the portenta I guess.
Thank you for the support.

@facchinm
Copy link
Member

Hi @Matt93-00 ,
the issue may be related with Serial.write() returning before the last byte has been actually sent. This breaks the RS485 communication since the last byte doesn't actually "go through" the bus.
We tried getting this fixed on mbed level via ARMmbed/mbed-os#14600 but it has not been merged yet.
A possible solution might be adding a delay after all the calls to port_.flush(); in this file, but I can't test it since I don't have a shield.
The delay should be consistent with the baud rate, so if baud == 57600 the delay becomes more or less
delayMicroseconds(180)

@facchinm facchinm added bug Something isn't working Portenta labels Jan 21, 2022
@Matt93-00
Copy link
Author

Hi @facchinm,
Thank You for the interest and the tip firstly. I could test it only now, and unfortunately, it doesn't work, but I can test again other solutions if you have some other ideas. I would like to say you that I have some idea but no.
Thank you again.

@Matt93-00
Copy link
Author

Hi again @facchinm I write you only to ask you if you can advise me as soon as you have some news. Thank You

@adityakamath
Copy link

Wondering if there is any progress on this, I have the same issue. All the documentation about the MKR shield seem to indicate that it works with the Portenta H7, but it does not

@ROBOTIS-Will
Copy link

I've temporarily appended a TX delay in DYNAMIXEL2Arduino library as the TX Enable(TX_EN or A6) become high too early before the TX packet is transmitted completely.
The delay has been tested under 9600, 57600, 115200, 1M, 2M, 3M, 4M baudrates.
Thanks!

@facchinm
Copy link
Member

Closing as patched at library level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Portenta
Projects
None yet
Development

No branches or pull requests

4 participants