-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add SOFTSERIAL support on RX4/TX4 for MATEKF405 target #2842
Add SOFTSERIAL support on RX4/TX4 for MATEKF405 target #2842
Conversation
Where are PA0 and PA1 on the board? @MATEKSYS ? |
//#define SOFTSERIAL_1_TX_PIN PA0 //TX4 | ||
#define USE_SOFTSERIAL1 | ||
#define SOFTSERIAL_1_RX_PIN PA1 //RX4 | ||
#define SOFTSERIAL_1_TX_PIN PA0 //TX4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a clash between USE_SOFTSERIAL1
and USE_UART4
- they use the same pins. If softserial is enabled UART4 should be removed from the list of UARTs on this target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the goal was to keep the possibility to use one or the other. Can't the two coexist meaning if nothing is configured on UART4 enabling SS1 and using it instead would work ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried about the scenario when user will configure both. This needs to be prevented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A solution could be to add targets replacing UART4 with softserial. MATEKF405_1SS and MATEKF405OSD_1SS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Use one or the other. UART4 can work as normal UART if users don't choose "Enable CPU based serial ports" in configurator. Tested it already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shellixyz I think no need to add more targets. Now it is a good solution. . 5xUarts are still available for non-Frsky users. 4xUarts+1xSoftserial for Frsky users after enable softserial. We will add this guide in our FC page. in BF there are some targets use this type of hack on UART pins also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, F4 telemetry_inversion = OFF by default. F722 telemetry_inversion = OFF default also. Need to set them = ON to get Frsky telemetry working. can telemetry_inversion be defined as ON by default in firmware.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
I have tried getting telemetry to work on UART4 (TX4) to no avail.
I have tried D4R-II and X8R.
Attached is the dump.
Can someone help me figure out what I didnt do right?
INAV.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ogocology Since you want to use soft serial for smartport I guess you connected your receiver without the uninversion hack so your issue is probably that you need telemetry_inverted = OFF
. It means normal expected inversion. So for smartport it means inverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its working now with telemetry_inverted = OFF.
I also got servo working on s6 pad for camera tilt servo.
I remain grateful to all who consistently strive to make this level of support available (and FREE).
Cheers!
Another vote of approval for this PR from Olivier_C https://www.rcgroups.com/forums/showpost.php?p=39441097&postcount=18845 @digitalentity if you could kindly offer some guidance on the naming resolution for #2954 please, then the board documentation can be updated and both PRs merged. |
I'm ok with merging this PR. My internet connection is flaky at best (in China now), so please, merge this and ServoS6 PR as you deem both ready. |
merging per @digitalentity's advice |
Thank you, sir.It works! There is an information on Matek product page saying telemetry_inverted = OFF should be turned on.
I remain grateful for all the work already done and in progress to keep us flying safely.
Thank you.
Regards,Okoye (Nigeria)
On Sunday, May 6, 2018, 10:00:39 PM GMT+1, Michel Pastor <[email protected]> wrote:
@shellixyz commented on this pull request.
In src/main/target/MATEKF405/target.h:
@@ -118,11 +118,11 @@
#define UART5_RX_PIN PD2
#define UART5_TX_PIN PC12
-//#define USE_SOFTSERIAL1
-//#define SOFTSERIAL_1_RX_PIN PA1 //RX4
-//#define SOFTSERIAL_1_TX_PIN PA0 //TX4
+#define USE_SOFTSERIAL1
+#define SOFTSERIAL_1_RX_PIN PA1 //RX4
+#define SOFTSERIAL_1_TX_PIN PA0 //TX4
@Ogocology Since you want to use soft serial for smartport I guess you connected your receiver without the uninversion hack so your issue is probably that you need telemetry_inverted = OFF. It means normal expected inversion. So for smartport it means inverted.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@Ogocology Great ! The behavior of |
@Ogocology if you can post the link to the incorrect information, that'd be great. I'm sure @MATEKSYS is interested in fixing the doc error. |
@fiam My bad. I have read so much on the issue i wasn't sure where i got that information. I apologise for the mixup. |
Pull request for the softserial mod provided by @MATEKSYS in #2841.
Closes #2426 and #2841.