cancel
Showing results for 
Search instead for 
Did you mean: 

Flex CAN tx problem

Saravanan_Mari
Associate III

Hello,

I am working on a SPC560P Discovery Board.

I have imported test application 'SPC560Pxx RLACAN Test Application for Discovery' for FlexCAN testing. In this FlexCAN0 is used in loop back mode and it is working.

But after disabling loop back mode,I cant see any data on the CAN_TX pin with scope.

I configured the:

  • b[0] as CAN0TXD output and b[1] as CAN0RXD input in the pinmap wizard
  • Disable loopback mode
  • Enable FlexCAN0 Use External Clock
  • Set: PressDive =3 , PropSeg=2 , PSEG1=4 , PSEG2=7

After i start the application the program gets stuck in the transmit while loop:

  1. while (can_lld_transmit(&CAND1,txmailbox, &txmsg)==CAN_MSG_WAIT){
  2. }�?�?�?�?�?�?

Its seems like that thecan_lld_is_tx_empty function returns FALSE and it breaks the can_lld_transmit function.

Is the mailbox needs any additional configuration or I configured the CAN clock incorrectly?

Thanks for your help and sorry for the the lot questions but I am new to 32bit controller programming.

Regards,

Saravanan Mariyappan

21 REPLIES 21

Thanks a lot!!

MAli.6
Associate II

Hi @Saravanan_Mari​,

Did you manage to solve this problem since I am also facing the same problem. Already spent weeks trying to solve the issue but CAN0TXD pin remains high and no data out.

Regards,

Mian