AnsweredAssumed Answered

Can not get the CAN bus functional on stm32vldiscovery

Question asked by wry.dragon on Dec 25, 2013
Latest reply on Dec 25, 2013 by Clive Two.Zero
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 !

Attachments

Outcomes