-
Notifications
You must be signed in to change notification settings - Fork 1.7k
NEXUSX: fix UART3/I2C2 resource conflict #11127
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
NEXUSX: fix UART3/I2C2 resource conflict #11127
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Fixes resource conflict discussed in #11120 and #11082 (comment)
The "C" port exposes pins PB10 and PB11, which can be used for UART3 and I2C2. Previously, an initialization order quirk caused UART3 to only be usable for serial rx. For other functions such as GPS the pins would be initialized as I2C2.
This PR adds the
#define I2C_DEVICE_2_SHARES_UART3directive totarget.h, which enables deconflicting logic infc_init.c.Using the resource command, i have tested:
I have also attached a physical GPS module to UART3 and it works.
With this PR, UART3 can now be used without any limitations
PR Type
Bug fix
Description
Add
I2C_DEVICE_2_SHARES_UART3directive to enable resource conflict resolutionRemove redundant
NEXUSXpreprocessor check around UART1 definitionAllows UART3 to be fully functional for GPS and other applications
Diagram Walkthrough
File Walkthrough
target.h
Add I2C/UART3 conflict resolution and cleanupsrc/main/target/NEXUSX/target.h
I2C_DEVICE_2_SHARES_UART3define to enable resource conflictresolution logic
#ifdef NEXUSXand#endifpreprocessor directivesaround UART1 definition
handling