CAN Bus Transceivers problem

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
asdasd
Posts: 18
Joined: Wed May 01, 2019 8:54 am
Has thanked: 9 times

CAN Bus Transceivers problem

Post by asdasd »

Hi ,
I have connect cjmcu-230(SN65HVD23x) with stm32f103cb with flowing connection
Image
then I modified the can test hal example to disable CAN_BTR_LBKM and change the baud-rate

Code: Select all

static const CANConfig cancfg = {
  CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP,
   CAN_BTR_SJW(0) | CAN_BTR_TS2(1) |        //CAN_BTR_LBKM |
  CAN_BTR_TS1(8) | CAN_BTR_BRP(35)
};


Then i set :
-GPIOA12 ---->Alternate_pushpull .
-GPIOA11 ---->input _pullup .

But when I test the signal on CTX there is available packet output but it is disappear in CANH,CANL.
can any body advice me what to do ?

best regard,
asd
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: CAN Bus Transceivers problem

Post by Giovanni »

Hi,

Is the transceiver actually powered up? do you have termination resistors?

Giovanni
asdasd
Posts: 18
Joined: Wed May 01, 2019 8:54 am
Has thanked: 9 times

Re: CAN Bus Transceivers problem

Post by asdasd »

Giovanni wrote:Hi,

Is the transceiver actually powered up? do you have termination resistors?

Giovanni


yes the transceiver is powered on(3.3v) . and the termination resistors is in the schematic:
Image
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: CAN Bus Transceivers problem

Post by steved »

a) Managed to avoid the STM32F1xx series, but on other ST devices both GPIO pins would need to be set to an alternate mode. (That seems to force the direction, but not necessarily output type, pullups etc).
b) Does the 3.3V supply on your processor card have enough spare to power the CAN card? Bear in mind that the CAN driver will take short spikes of current (3.3V across 60 ohms is >50mA, if both ends of the line are terminated), even though the average current may only be a few mA. And it bothers me that there's no decoupling on the CAN transceiver power supply.
c) How are you checking for signal on the CANH and CANL Lines?
d) Have you tried checking your software in CAN loopback mode to see what's happening?
e) Have others used the hardware combination successfuly?
Post Reply