cancel
Showing results for 
Search instead for 
Did you mean: 

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

PIndr.2
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee

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

View solution in original post

3 REPLIES 3
Erwan YVIN
ST Employee

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

PIndr.2
Associate II

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
Associate II

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


_legacyfs_online_stmicro_images_0693W00000bklgdQAA.png