Skip to main content
Bryan M
Associate II
June 5, 2019
Solved

CAN RX Example

  • June 5, 2019
  • 1 reply
  • 959 views

I'm having difficulty setting up an SPC560P50L project for CAN. The given example (OS-less CAN) seems to due internal loopback which is not very useful for my application. (pinouts arent even automatically set)

I'm using the discovery board

https://www.digikey.com/product-detail/en/stmicroelectronics/SPC560P-DISP/497-14706-ND/4866312

I need to transmit and receive data at 250Kbps. I was able get transmission working by changing Time quanta (TQ) bits and read it on a PC application and by enabling the PB0 pin.

I'm having difficulty receiving data on the RX line. My breakpoints do not trigger for "RX==OK".

I've tried variations of disabling bits in the MCR like LPB and SRX_DIS (the bits I believe are responsible for the "virtual/internal" bus they use in the example.) but have had no luck.

Are there any sample projects that transmit out out the board to an external node and receive from an external node?

Let me know if there is more information I can provide

    This topic has been closed for replies.
    Best answer by Erwan YVIN

    Hello Bryan ,

    There are some others example in AppWizard (RLA)

    RLA means Register Level Access

    0690X000009XhAfQAK.png

    In SPC5Studio , you can configure your CAN Driver (HAL or RLA)

    In order to set you can use the Pinmap editor , the code will be automatically generated.

    Best regards

    Erwan

    1 reply

    Erwan YVIN
    Erwan YVINBest answer
    ST Employee
    June 28, 2019

    Hello Bryan ,

    There are some others example in AppWizard (RLA)

    RLA means Register Level Access

    0690X000009XhAfQAK.png

    In SPC5Studio , you can configure your CAN Driver (HAL or RLA)

    In order to set you can use the Pinmap editor , the code will be automatically generated.

    Best regards

    Erwan