cancel
Showing results for 
Search instead for 
Did you mean: 

CAN RX Example

Bryan M
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee

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

View solution in original post

1 REPLY 1
Erwan YVIN
ST Employee

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