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

Assigning Pins to CAN controller #65

Open
hjoertel opened this issue Jun 17, 2016 · 1 comment
Open

Assigning Pins to CAN controller #65

hjoertel opened this issue Jun 17, 2016 · 1 comment

Comments

@hjoertel
Copy link

I'm on the way to write a CAN controller driver for the LiteBSD PIC32MZ on the Olimex PIC32-EMZ64.
May main problem at the moment is assigning the CAN signals CAN-RX and CAN-TX to the correct pins which are according to the schematic RC13 and RC14. I have added the lines in sys/mips/conf/EMZ64.pic32:

# CAN1 C1RX=RC13, C1TX=RC14
device      can1    pins RC13, RC14 # pins rx tx

But the difficulty is the code required in canprobe(). I like to use the code as in mips/dev/uart.c but have problems understanding it.
Someone interested in it and can help?

Heinz

@hjoertel
Copy link
Author

Studied the manual and found a solution, but still the simple CAN send code doesn't work.
Is it enough doing:

/* RX */
 C1RXR = 0x07;
/* TX */
RPC14R = 0x0F;

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

No branches or pull requests

1 participant