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

s32k14x canbootloader:Change autobaud to ACK and range high to low #22247

Merged
merged 10 commits into from
Oct 27, 2023

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Oct 19, 2023

When only this device was on bus not ACK's would be sent and device could not autobaud.

94ee6d3 Solves #22068

But there is still an issue with APP not taking the boot baudrate and Node ID. from the bootloader.

  • The s32k bootloader was not actually writing the Node ID and bit rate.
    s32k14x:Make use of boot_app_shared shared_[un]lock] cc31daa Solves this.

  • Once the Node ID and bit rate was written, the Nuttx SocketCAN driver was wiping out the values.
    This is solved with:
    boot_app_shared:Add optional board_app_shared_read f8fe64b
    UavcanNode:Support optional board_app_shared_read 5e9624e
    nxp_ucans32k146:Provide board_app_shared_read 33afff4

  • The node was changing addreses.
    s32k14x:canbootloader board_identity Return the same word ordering as the s32k1xx/version/board_identity is solved by abef56d

  • Then SocketCAN was broken by 3d61ab8
    SocketCAN uses FDs. FD's are per task/thread Run() is not on the same thread as init().

@AlexKlimaj Please test this branch with your use cases.

  • added rgbled_ncp5623b

  • Nuttx's s32k1cc_lpi2c driver Needed to not allow 0 delays

~~@vincentpoont2 I will need the current application source code for DroneCan F9P ~~

I will need to round trip the nuttx change and repoint this.

Nuttx Backports added

@davids5 davids5 force-pushed the pr-s32k14x-canbootloader branch from ff6af07 to 8f2c2ee Compare October 25, 2023 12:44
@davids5
Copy link
Member Author

davids5 commented Oct 25, 2023

Rebased on current main. Nuttx Updated to tip with backports

@davids5
Copy link
Member Author

davids5 commented Oct 25, 2023

@dagar, @AlexKlimaj Please have a look

Copy link
Member

@AlexKlimaj AlexKlimaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the bootloader and app on the ARK Cannode with an ARKV6X and the Dronecan gui as the node ID server. Looks like its working.

@davids5 davids5 merged commit d3d5b58 into main Oct 27, 2023
@davids5 davids5 deleted the pr-s32k14x-canbootloader branch October 27, 2023 07:57
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

Successfully merging this pull request may close these issues.

2 participants