Skip to main content
PIndr.2
Associate II
May 23, 2023
Solved

I would like to know how to add the CAN receive function for CAN_6 in SPC582B Discovery Board.

  • May 23, 2023
  • 3 replies
  • 1706 views

In the SPC582B Discovery Board (QFP64 package), I need to use CAN_6_RX and CAN_6_TX which are in the uC pin 63 and 64. But when I used the CAN Test Application, I cannot find the CAN Driver related to the CAN_6. How would I program the CAN_6 protocol receive function? I have already done the complete and error-free code for CAN_2 and CAN_1. Hope to hear from you soon.

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

Hello ,

You can configure your CAN_6 by using the Pinmap

I think that CAN_6 is configurable from MCAN3 Subsystem 1

cf screenshot


_legacyfs_online_stmicro_images_0693W00000bkkfAQAQ.png
_legacyfs_online_stmicro_images_0693W00000bkkfFQAQ.png 

Best regards

Erwan

3 replies

Erwan YVIN
Erwan YVINBest answer
ST Technical Moderator
May 24, 2023

Hello ,

You can configure your CAN_6 by using the Pinmap

I think that CAN_6 is configurable from MCAN3 Subsystem 1

cf screenshot


_legacyfs_online_stmicro_images_0693W00000bkkfAQAQ.png
_legacyfs_online_stmicro_images_0693W00000bkkfFQAQ.png 

Best regards

Erwan

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
PIndr.2
PIndr.2Author
Associate II
May 24, 2023

Dear Erwan,

Thank you for the help. I have already done this part and now I'm stuck at the CAN test code. When I test the internal loopback code it's working as the reference manual. But when I try the CAN_2 and CAN_6, CAN_2 is working (receiving and transmitting) finely with the uC pin 52 and 53 with FIFO0 (as the CAN test code). When when I change the rxreceive function (void mcanconf1_rxreceive(uint32_t msgbuf, CANRxFrame crfp)) to the CAN_6 it does not work with the PF2 and PF3 pins in the board. CAN_6 does not give me any CAN frames. But CAN_2 does. I put 250 Kbps as the speed and gave a standard CAN ID and data. Hope you can help me with that.

PIndr.2
PIndr.2Author
Associate II
May 24, 2023

Can you also tell me how to enable the following CAND10-CAND20 in the can_lld.c?


_legacyfs_online_stmicro_images_0693W00000bklgdQAA.png