cancel
Showing results for 
Search instead for 
Did you mean: 

CAN controller not receiving messages

simon13
Associate II
Posted on August 21, 2009 at 06:06

CAN controller not receiving messages

4 REPLIES 4
miles
Associate II
Posted on May 17, 2011 at 13:21

It sounds like everything is working properly. The CAN controller needs to see the data on the Rx pin (to detect for collisions, and decide to stop transmitting), but the messages you send do *not* get put in your receive FIFO. You'll need to send a message from another device (PC based CAN bus analyzer hardware) to get it to show up in the STM32's receive FIFO.

simon13
Associate II
Posted on May 17, 2011 at 13:21

Hi

I'm trying to get the CAN controller working on the STM32F10X-128K-EVAL board, but I'm not receiving real messages.

I first tried transmitting CAN messages with the CAN test loopback mode and I can see the received same messages that I have sent and that all works OK. I also have a PC based CAN bus analyser hardware and software and I can see my valid transmitted message on that.

Using an oscilloscope I can also see my transmitted CAN messages appearing on the STM32 RX pin as you would expect but the CAN controller is ignoring them.

As I can see the messages with loopback mode I assume the bit timing, filters etc are all correct. When I remove the loopback mode, I expect to receive real messages but I don't.

The STM32F10X-128K-EVAL board requires the CAN pins to be remapped to PD0 (Rx) and PD1 (Tx) so I believe it could be a alternate pin setup problem.

PDO has been set to input pull up/down. Perhaps I'm missing somthing really obvious, any suggestions please?

Is my assumption correct that transmitted CAN messages should also appear on the receive pin of the same STM32 controller? i.e. you can receive your own transmitted messages.

Thanks in advance for any suggestions.

[ This message was edited by: simon8 on 20-08-2009 18:42 ]

simon13
Associate II
Posted on May 17, 2011 at 13:21

Thanks for your quick reply.

I'll try what you suggest tomorrow and try to filter and detect PC sent message.

I assumed that my sent messages go onto the CAN bus and then the Rx pin can see them (as I can see on the oscilloscope). I thought CAN controllers are supposed to be able to receive their own transmitted messages as this is part of the standard when processing broadcast messages.

Is there something in the STM32 hardware documentation which ignores the RX pin whilst transmitting?

simon13
Associate II
Posted on May 17, 2011 at 13:21

Thanks miles.gazic, everything is working now.

You were right, I can receive all the incoming messages except the one I was transmitting.

Thanks for your help.