cancel
Showing results for 
Search instead for 
Did you mean: 

CAN status pending

mic
Associate II
Posted on August 08, 2011 at 11:55

I wanted to run the CAN Interface of a  STM32F105RB with the examplefile of ST (Can Network). The function  CAN_TransmitStatus( CANx, 0x0) tells me that the status of transmission is pending. Do you have any idea's for this behaviour. I'm not able to send messages.

The PHY levels are 2.1 V for CAN-Low and CAN-High.
4 REPLIES 4
Posted on August 08, 2011 at 14:52

The most typical failures are people failing to enable clocks or GPIOS's correctly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mic
Associate II
Posted on August 08, 2011 at 16:36

Posted on August 08, 2011 at 17:24

I didn't change the GPIO setting. I used one of the can examples of st. So the settings should be ok. I used exactly the same.

 

So it should be working fine, right, but it's not. So perhaps you need to examine what you're doing more critically.

Examples are often tied to specific boards and implementation. Check the readme.txt or definitions in the files.  Get a schematic for the eval board the example is built for. Provide complete details of the code (ie paste code) and board you are using.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
donald2
Associate II
Posted on August 09, 2011 at 18:53

Are familiar with CAN bus?

For a frame to successfully transmit there must be a working bus with correct termination and at least least one active peer running at the same speed.

If you don't have an active peer you never get an ACK bit and the frame gets ''stuck'' waiting to transmit while the controller retransmits and the error count increase.

Can you receive frames from the network?  If not, suspect your clock rate.  The clock tree takes a bit of thought to configure.  Given that you didn't list your crystal frequency, the clock tree configuration or the CAN bus TQ allocation, I'm guessing that you expected the timing to all ''just work''.