Skip to main content
Dayi
Associate
December 4, 2018
Question

I can't get data from CAN

  • December 4, 2018
  • 3 replies
  • 1056 views

Hi everyone,

I'm new using ST microcontrollers and I've began using blue pill development board. My project has to read data from CAN at 250 kb/s. Also I'm using MikroC PRO for ARM to create the program but I'm unable to read any data from CAN so far. The blue pill board is connected with a MCP2551 CAN tranceiver at Pin11(RX) and Pin12(TX) and I can test with the oscilloscope that it is getting the proper CAN bus signal. My question is: Is it necessary to do some configurations before to program the blue pill board?

Any help will be appreciated.

Thanks

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    December 4, 2018

    USB and CAN can not operate concurrently on an F103 based design

    The pins would need to be correctly configured, to associate with the CAN peripheral, the clocks for the GPIO and CAN would need to be enabled.

    I would perhaps REMAP USART1 so there is no conflict there or

    Use PD0/PD1 for CAN1 remapped onto those pins.

    See STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\CAN\Networking

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Dayi
    DayiAuthor
    Associate
    December 4, 2018

    Thank you Clive for your answer. I'll see the examples with STM32F10x_StdPeriph_Lib_V3.5.0 lib.

    Also I want to ask you, which board or microcontroller ARM based do you recommend to work with CAN friendly or more easy than blue pill development board?

    Thanks in advance.

    Tesla DeLorean
    Guru
    December 4, 2018

    ST has their EVAL series boards, perhaps on the opposite end of the market to the minimalist board. All their examples are built around the boards they sell with the hardware support already present. For others you'd need to replicate the hardware and port the code.

    The F1 is a bit antiquated. I used the RedDragon 407 several years back. I think OLIMEX used to have an assortment of boards with CAN, haven't looked recently, nor aware of software support thereof.

    I'd expect the NUCLEO-144 series to provide several pin escape means for CAN to a transceiver.

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