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

NUVOTON: CAN: Fix Rx interrupt and filter mask #15509

Merged
merged 4 commits into from
Apr 23, 2024

Commits on Apr 18, 2024

  1. NUVOTON: CAN: Fix filter mask

    NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467).
    NOTE: NUC472 CAN doesn't support filter.
    ccli8 committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    63bdb26 View commit details
    Browse the repository at this point in the history
  2. NUVOTON: CAN: Fix Rx interrupt doesn't work

    Major modifications:
    1. Handle Rx interrupt based on Message Object interrupt (CAN_IIDR=0x0001~0x0020) instead of CAN_STATUS.RxOK
    2. Also handle Tx interrupt following above for consistency
    
    Other related modifications:
    1. Fix signature type error in CAN_CLR_INT_PENDING_BIT()
    2. Add CAN_CLR_INT_PENDING_ONLY_BIT() which doesn't clear NewDat flag so that user can fetch received message in thread context
    
    NOTE: This fix only targets CAN (NUC472/M453/M487), not CAN-FD (M467).
    ccli8 committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    bfd4ceb View commit details
    Browse the repository at this point in the history
  3. NUVOTON: CAN: Fix Message Object number for Tx and recognition of Rx …

    …interrupt
    
    1.  The same Message Object number cannot use for both Tx and Rx simultaneously.
        For Tx, Message Object number 31 is reserved instead of 0.
        For Rx, Message Object numbers 0~30 are used and for filters.
    2.  NewDat bit (CAN_IsNewDataReceived()) isn't exclusive to Rx.
        Recognize Rx interrupt by Message Object number other than 31.
    
    NOTE: This fix only targets CAN (NUC472/M453/M487), not CAN-FD (M467).
    ccli8 committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    989a694 View commit details
    Browse the repository at this point in the history
  4. NUVOTON: CAN: Fix filter mask being zero

    On mask being zero, it means any match, not exact match.
    
    NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467).
    NOTE: NUC472 CAN doesn't support filter.
    ccli8 committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    c1c9550 View commit details
    Browse the repository at this point in the history