cancel
Showing results for 
Search instead for 
Did you mean: 

Can not get the CAN bus functional on stm32vldiscovery

jlsilicon
Associate II
Posted on December 25, 2013 at 13:57

I have been spending days trying to get the CAN bus functional on the stm32vldiscovery board.  But it always fails on initialization.  I am quite familiar with using the Stm32 chips, but the CAN is completely eluding my debugging. I do not see any signals on the CAN pins.  I have tried remapping to the alternate pins.  but, to no avail. I also ported the Keil code over, but it locks up with the CAN Interrupt enabling. 

Attached is one of the sample codes that I tried and modified.

In debugging it fails here :

    uint8_t CAN_Init(CAN_TypeDef* CANx, CAN_InitTypeDef* CAN_InitStruct)

    {

        ..

        /* Check acknowledge */

        if ((CANx->MSR & CAN_MSR_INAK) != CAN_MSR_INAK)

        ..

Notice that the code is in Loopback mode.  I also tried cross connecting the CAN TX and RX pins, also attaching a Mcp2551 chip - still no luck ..

Any help - Thanks !

#can-bus
1 REPLY 1
Posted on December 25, 2013 at 14:11

No doubt because the VL (Value Line) series has neither CAN nor USB support.

http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1031/LN775/PF216844

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00251732.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..