Page 1 of 1

STM32F302K8 CAN bus test

Posted: Mon Feb 07, 2022 6:52 am
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?

Re: STM32F302K8 CAN bus test

Posted: Mon Feb 07, 2022 7:02 am
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