Skip to content

Comparison operator wrong #1

@WebDust21

Description

@WebDust21

// Enter CAN module into normal mode
CANCON = 0x00;
while(CANSTATbits.OPMODE==0x00);

This needs to be:

while (CANSTATbits.OPMODE != 0x00);

The only reason it doesn't lock up the processor indefinitely as written, is because the mode switch doesn't happen instantly.

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