This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I require to use CAN communication, my setup is a custom f28035 board with a IXXAT USB-to-CAN device and monitoring in the PC.
So was trying to use the sample code, ecan_back2back available in Controlsuite. I am not receiving any packets though there is a clock in both pins.
Verified the connection up to the CAN transceiver by setting GPIO30 & GPOI31 as output, toggled, all fine.
I need 250KBPS, but now trying 1MBPS as available in the sample.
1. The sample program, does it transmit anything out to the pin or (as the name suggests back2back,) internal only?
2. How to change the baudrate to 250KBPS?
/* The following block is only for 60 MHz SYSCLKOUT. (30 MHz CAN module clock Bit rate = 1 Mbps See Note at end of file. */
ECanaShadow.CANBTC.bit.BRPREG = 1;
ECanaShadow.CANBTC.bit.TSEG2REG = 2;
ECanaShadow.CANBTC.bit.TSEG1REG = 10;
ECanaShadow.CANBTC.bit.BRPREG = 7; // (1+1)*4 -1 for 250kBPS?
Tried STM = 0 and 1,
ECanaShadow.CANMC.bit.STM = 0;//1;
Still nothing on transmit.
Please help me to make it working.
Thanks
Joy
Both changes are correct, Count for 250KBPS baudrate is 7 only.
The same project worked for me, definitely you should re-check the setup/ test method.
regards
Thanks, it is transmitting at 250KBPS now, there was a problem in the CAN transceiver to connector, the common mode filter pins.
How to configure it for standard ID? Now it is extended ID.
Cheers
Joy
You don't have to "connect the mailboxes" to GPIO30 /GPIO31. In a certain sense, all the mailboxes are already "connected" to those pins. Any time data has to be transmitted from (or received into ) a mailbox, those pins will be automatically used.