My Background with Kinetis: I have used Processor Expert in the past to setup the CAN component of the KE06Z controller and found it easy to use and customize (transmit buffers, ID filter masks, baud-rates, etc.). My current development is for the FRDM-KEAZ128 dev board. This board isn't preconfigured in any of KDS, CW, or S32 IDE's so I'm having a hard time setting it up for CAN.
My issue: I am having a real difficult time configuring the CAN component to send frames on this board.
I have added the component and configured it as follows:
I'm using CANAlyzer to monitor frames and configured it at the same bit-rate, no frames are seen on the bus. I tried with and without 120ohm terminating resistor. From reading this NXP thread https://community.nxp.com/thread/386975 , I learned that PE actually forgets to add the interrupt enable mask for transmitting frames. That explains why the debugger doesn't reach the event CAN1_OnFreeTxBuffer(). After adding the missing line to the end of the CAN1_Init() routine, the debugger shows that the MCU is stuck in the PE_ISR(CAN1_TxInterrupt) loop. This happens during PE_low_level_init() before any of my code is executed (actually setting up a data frame).
I have tried disabling autoinitialize components--so I call the CAN1_Init() function myself and then CAN_Enable() to see what's going on. I tried adding the highlighted line just before setting up the CAN frame doesn't work either. I'm not sure what to do here, I have also tried removing the line (no frames sent, no OnFreeTxBuffer event triggered). When I use loop-back mode, the event gets triggered and the MCU doesn't get stuck in the ISR function.
Can someone take a look at my attached CodeWarrior 10.6 project and look at the PE code as to why it wont send CAN frames? I'm not exactly sure where to go from here.
PS. I have tried Kinetis Design studio and the new S32 design studio, to my luck, the MSCAN LDD component is not included!!
Any help is greatly appreciated!
Original Attachment has been moved to: frdm-keaz128-can-test.zip
Hi
Please check below thread about KEA128 MSCAN demo based on KDS Processor Expert:
https://community.nxp.com/thread/379133?commentID=583263#comment-583263
I also attached a CodeWarrior Processor Expert demo for your reference.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you very much for the response. I downloaded the KDS example and programmed the FRDM-KEAZ128. Tomorrow I will test it on a real CAN bus with other nodes and CANAlyzer, then I will respond with the results.
michaeljwilson, do you tell us if u could to transmit via CAN on KEAZ128?