2018-05-24 11:54 PM
2018-05-25 12:42 AM
Hello
sumitgrover97
,There is no CAN example available for STM32F103C8 with the STM32CubeF1 firmware package, but you canget inspired or re-use the sections available in the application within the Eval board:
STM32Cube_FW_F1_V1.6.1\Projects\STM3210E_EVAL\Examples\CAN\CAN_Networking
Best Regards
Imen
2018-05-25 02:40 AM
your circuit is odd but looks ok.
if you are not using a transceiver chip, then the Rx pins need a pull up, good work there.
ABOM should be enabled,
I think, Filter high should have some bits set, or you wont receive any frames
Filter number 14, I think is not correct.
It is always going to be faster to use an external USB CanDo or similar to check your receiver is working before you attempt to transmit.
2018-05-25 05:00 AM
Hi Imen
Thanks for your kind reply.This is helpful
Thanks
2018-05-25 05:04 AM
Hi T J
Thanks for your kind reply.
I don't have CanDo.
These changes I have to make in both transmitter and receiver code. Right?
sFilterConfig.FilterMaskIdHigh=0 should have some value. Right? and what can be the correct value?
what can be the correct filter number?
Regards
Sumit
2018-05-25 06:46 AM
Hi T J
One thing more the Filter number I have chosen is 0 and the bank number I have chosen is 14.
sFilterConfig.FilterNumber=0;
sFilterConfig.BankNumber=14;I am little confused that whether you talking about Filter number or Bank number.
Please clear me for that also.
Thanks
2018-05-25 01:18 PM
2018-05-28 02:44 AM
Hi T J
Sorry to disturb you again
canRxpointerIN = 0;
canRxMsgIN = 0; canRxMsgOUT = 0; canRxMsgTableEMPTY = true; canRxMsgTableFULL = false;canTxMsgIN = 0;
canTxMsgOUT = 0; canTxMsgTableEMPTY = true; canTxMsgTableFULL = false; canTxMsgTableOverflow = false; canTxMsgOverrun = false; blockCanTx = false;All these variable are giving error.
Do I have to declare these variables or is there any header file which I have to include in my code to remove those errors?
Thanks
2018-05-28 04:19 AM
I am sure most of them are here :
//// CAN ///////////////
uint8_t canRxpointerIN;char canRxMsgIN, canRxMsgOUT, canRxMsgTableEMPTY, canRxMsgTableFULL;char canTxMsgIN, canTxMsgOUT;char canTxMsgTableEMPTY, canTxMsgTableFULL, canTxMsgTableOverflow;char canTxMsgOverrun, blockCanTx;char schedule_SendCanTxString;char canRxMsgTableOverflow;int canRxStringLength, canRxStringCounter, canRxStringSegmentNumber;char expectingCanSegments;char canRxhasStringComing, expectingCanString, haveCanSegments;char canRxStringSegmentID, canRxStringCompleted, RxCanIO_update;char haveCanString, showRxCanFrames, showRxCanSlaveADCs, showRxCanStrings, showLocalADCs;char IOUnitNumber;char ThisUnitIsUpdated;char TerminalisConnected, CheckTerminalConnection;sorry for the other stuff, I have a lot going on in parallel state machines.