Skip to content

Configure Filters to default values #2

@nopnop2002

Description

@nopnop2002

Hello.

Your code will be very helpful.
Thank you.

Configure Filters to default values is not correct.

Your code:

    // Configure Filters to default values
    CAN1->FM1R |= 0x1C << 8;              // Assign all filters to CAN1
    CAN1->FMR  |=   0x1UL;                // Set to filter initialization mode
    CAN1->FA1R &= ~(0x1UL);               // Deactivate filter 0
    CAN1->FS1R |=   0x1UL;                // Set first filter to single 32 bit configuration

My code:

    // Configure Filters to default values
    CAN1->FMR  |=   0x1UL;                // Set to filter initialization mode
    CAN1->FMR  &= 0xFFFFC0FF;             // Clear CAN2 start bank
    CAN1->FMR  |= 0x1C << 8;              // Assign all filters to CAN1
    CAN1->FA1R &= ~(0x1UL);               // Deactivate filter 0
    CAN1->FS1R |=   0x1UL;                // Set first filter to single 32 bit configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions