STM32F302K8 CAN bus test

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
jslee
Posts: 15
Joined: Thu Jun 11, 2020 9:54 am
Has thanked: 3 times

STM32F302K8 CAN bus test

Post by jslee »

Hi, I'm trying CAN bus test on STM32F302K8(custom board).

I transmit uavcan data using 1Mbit/s(with below cancfg),

Code: Select all

    /* CAN_MCR */
    CAN_MCR_ABOM |      // Automatic Bus-Off Management
    CAN_MCR_AWUM |      // Automatic WakeUp Mode
    CAN_MCR_TXFP,       // Transmit FIFO Priority
    /* CAN_BTR */
    //CAN_BTR_LBKM |    // Loop BacK Mode
    CAN_BTR_SJW(0) |    // reSynchronization Jump Width
    CAN_BTR_TS2(1) |    // Time Segment 2
    CAN_BTR_TS1(6) |    // Time Segment 1
    CAN_BTR_BRP(1)      // Baud Rate Prescaler

but receive the data using 800kbit/s on 'PCAN View' program.
- If set 1Mbit/s on 'PCAN-View' program, I couldn't receive any data.

Can Anybody advice about difference between transmit and receive speed?

For correct result, what information I upload on this page?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F302K8 CAN bus test

Post by Giovanni »

Hi,

As far I know the STM32 CAN transmits and receives at the same speed, the driver does nothing except initialize the BTR register.

You could have a problem with your measurement setup.

Giovanni
Post Reply