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

Backport all CAN-related changes from upstream NuttX #186

Draft
wants to merge 43 commits into
base: px4_firmware_nuttx-10.1.0+
Choose a base branch
from

Commits on Jul 28, 2022

  1. [BACKPORT] arch/stm32h7: Add FDCAN SocketCAN driver

    Adds an FDCAN driver for STM32H7 MCUs using the SocketCAN interface
    JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    eaab3a2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c29b742 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b4b9542 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    101663f View commit details
    Browse the repository at this point in the history
  5. [BACKPORT] stm32h7: Add FDCAN3_BASE to memorymap.h

    Note that pinmap.h, irq.h, fdcan.h still need to be updated with proper
    register definitions for the FDCAN3 peripheral present in
    STM32H7[2|3][3|5] MCUs
    JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    6d7fea1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7406377 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c7d4b23 View commit details
    Browse the repository at this point in the history
  8. [BACKPORT] include: can: move error.h to apps/canutils

    This file is used by the libcanutils and can be isolated in apps
    
    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
    jerpelea authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    de18616 View commit details
    Browse the repository at this point in the history
  9. [BACKPORT] arch/arm/src/imxrt/imxrt_flexcan.c: use SW control to chec…

    …k free MBs
    
    CAN_ESR2 register was having problems of havng the correct values when
    the bus was busy (with 3 and more nods). The register bit fields were
    incorrectly indicating that there is no free MB and would not updated
    itself from this state which was causing the applications to freeze on
    write. This change relies only on a software control which should avoid
    the problems described above.
    
    Signed-off-by: Michal Lenc <michallenc@seznam.cz>
    michallenc authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    c4ceffb View commit details
    Browse the repository at this point in the history
  10. [BACKPORT] boards/arm/imxrt/teensy-4.x: add option to have CAN3 as can0

    This commit adds option for Teensy 4.x board to initialize CAN3 as can0.
    The reason of this is the CAN FD capability of CAN3. This commit also
    disables tickless mode support for pikron-bb configuration as this option
    started causing hard faults which are yet to be solved.
    
    Signed-off-by: Michal Lenc <michallenc@seznam.cz>
    michallenc authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    9e0c61b View commit details
    Browse the repository at this point in the history
  11. [BACKPORT] Fixed imxrt flexcan driver compilation error due to incorr…

    …ect scope of variable
    pbrier authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    6cd67d6 View commit details
    Browse the repository at this point in the history
  12. [BACKPORT] net/can,icmp,icmpv6,tcp,tcp_timer,udp: device should poll …

    …only those connections that are bound to the device.
    
    tcp_timer: eliminated false decrements of conn->timer in case of multiple network adapters.
    The false timer decrements sometimes provoked TCP spurious retransmissions due to premature timeouts.
    a-lunev authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    d3f889f View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    323cc48 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    42f912f View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    334e7ca View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    248efed View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    6ef0905 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    3dea2bd View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    c0b5f3e View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    5950e63 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5e41aff View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    3086179 View commit details
    Browse the repository at this point in the history
  23. [BACKPORT] stm32: add FDCAN support

    based on PR #2987
    raiden00pl authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    3a8a220 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    a406270 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    f1b5c76 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    39f09f1 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    de03f43 View commit details
    Browse the repository at this point in the history
  28. [BACKPORT] include/nuttx/can.h: rename CAN_ERR_CTRL to CAN_ERR_CRTL f…

    …or compatibility with libcanutils
    raiden00pl authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    e263e0e View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    fb88aa8 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    0889493 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    57b627f View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    c625824 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    1aa879c View commit details
    Browse the repository at this point in the history
  34. [BACKPORT] net/can: remove psock reference from can connect

    remove the psock back reference since timestamp
    has been migrated to can_conn_s
    
    Signed-off-by: chao.an <anchao@xiaomi.com>
    anchao authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    0e12b3c View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    1bf174d View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    e21e4f9 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    79a623a View commit details
    Browse the repository at this point in the history
  38. [BACKPORT] arch/arm/src/stm32f7/stm32_can.c: fix CAN3 receiving

    by fixing filter initialization.
    
    STM32F7 CAN3 works in single peripheral configuration and there is only 14 filter banks: 0-13. Previously not available 14 indexed filter (CAN_NFILTERS/2) was wrongly used for for receiving to FIFO. Now zero indexed filter is correctly used instead.
    lukegluke authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    a0c05c2 View commit details
    Browse the repository at this point in the history
  39. [BACKPORT] drivers/can: optimize can driver reader side

    Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
    pkarashchenko authored and JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    e596450 View commit details
    Browse the repository at this point in the history
  40. Revert "[BACKPORT] net/can: remove psock reference from can connect"

    This reverts commit 9ce3fab.
    
    PR reference: apache/nuttx#5467
    
    In order for this commit to be valid, the following other PRs must also
    be back-ported first:
    - apache/nuttx#5434
    
    Additional PRs that fix related bugs:
    - apache/nuttx#5462
    - apache/nuttx#5466
    JacobCrabill committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    74f1170 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    98a3962 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    67ad6ab View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2022

  1. SocketCAN: add non-blocking write

    Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
    2 people authored and JacobCrabill committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    601722d View commit details
    Browse the repository at this point in the history