LiteBSD
LiteBSD copied to clipboard
Assigning Pins to CAN controller
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
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;