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

MATEK F772 STD - NO OUTPUT ON S6 PAD. #2872

Closed
ghost opened this issue Mar 5, 2018 · 16 comments
Closed

MATEK F772 STD - NO OUTPUT ON S6 PAD. #2872

ghost opened this issue Mar 5, 2018 · 16 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Mar 5, 2018

There is no output on the S6 pad for motor 6 on a Hex copter.
Board seems OK as it works in Betaflight.
Similarly, no servo output on this pad when configured for AIRPLANE.

@shellixyz
Copy link
Collaborator

shellixyz commented Mar 6, 2018

I can reproduce this issue. On my board the S6 pad is not connected directly to any pin of the MCU so it would explain the issue...

EDIT: There is 200ohm resistors between MCU pins and outputs on this board that's why the continuity tester couldn't find the pin. S6 is connected to PA8 as expected. So this is not the cause of the issue.

@digitalentity
Copy link
Member

@MATEKSYS - hardware issue?

@shellixyz
Copy link
Collaborator

Scratch that it looks like there is a resistor between the MCU pins and the output pads.

@shellixyz
Copy link
Collaborator

shellixyz commented Mar 6, 2018

S6 is connected to PA8 via a 200ohm resistor. So the output definition in target.c looks good. Timer 1 channel 1 is the right timer definition too. No other timer can be used with this pin.

@ghost
Copy link
Author

ghost commented Mar 6, 2018

As a work around, I have edited target.c and used a customairplane mix to route the rudder output to pad 5 instead of 6..
It works on the bench but is it safe?

@shellixyz
Copy link
Collaborator

You can do that it is safe. The only thing is that with this mod basically you can't use a different PWM frequency for the ESC and servos. Just use standard 50Hz PWM frequency for the ESC and servo and everything will be alright.

@ghost
Copy link
Author

ghost commented Mar 6, 2018

Thanks for that. I assume that this is because it is sharing Timer 3 with M1?
This is my first foray into FW so I am taking my time with it.
Hopefully by the time I am ready to fly, this problem will have been fixed.
Thanks again.

@shellixyz
Copy link
Collaborator

Yes it is because timer 3 is shared

@ghost
Copy link
Author

ghost commented Mar 7, 2018

Just noticed that there is a pad 8 on the board.
So, would using the normal target.c (M2 enabled) but using a custom mix to route the elevator to pad 8 be a better work around.

Sorry meant pad 7, PB8

@shellixyz
Copy link
Collaborator

shellixyz commented Mar 7, 2018

Yes it uses a different timer from the others pins so you wouldn't have the sync ESC/servos PWM frequency limitation.

@digitalentity
Copy link
Member

Interesting findings. @shellixyz any clue why this output doesn't work then?

@shellixyz
Copy link
Collaborator

@digitalentity No idea yet unfortunately. Could it be something special about F7 MCUs ?

@digitalentity
Copy link
Member

It's definitely related to timer driver implementation on F7. Might take a while to figure out.

@MATEKSYS
Copy link
Contributor

MATEKSYS commented Mar 7, 2018

Tested 1.9.0_RC1 & final release just now, no servo signal on S6
Tested 1.8.1 built on Jan.18. It works

inav_1.8.1_MATEKF722_0118.zip

@digitalentity
Copy link
Member

Found a bug. Good old memory corruption. Not fun to track without SWD.
@MATEKSYS please consider adding SWD pads on your boards 😉

@digitalentity
Copy link
Member

Fixed by #2891. Closing

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

No branches or pull requests

3 participants