AnsweredAssumed Answered

FlexCAN Tx problem

Question asked by Marcell Daniel on Jul 17, 2017
Latest reply on Aug 10, 2017 by Marcell Daniel

Hello,

 

I am working on  a SPC560P Discovery Board.I have imported test application 'SPC560Pxx RLA CAN 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 =1 , PropSeg=0 , PSEG1=5 , PSEG2=7 

 

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

while (can_lld_transmit(&CAND1,txmailbox, &txmsg)==CAN_MSG_WAIT){
    }

 

Its seems like that the can_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,

   Marcell

Outcomes