Hello, how are you guys?
In my previous questions I was asking about how to work with my board as a CAN device.
For now looks its working as a Loopback mode, but my real intention is to integrate this board into a CAN network.
So, a general question,
¿is there a Guide or reference of how to Setup, Synchronize a CAN network and how to watch (sent and received) Frames?
Very specific questions
Gateway(TRK-KEA128) ------------------ECU CAN Tx----------->------CAN Rx Console<--------CANRx----------<--------CAN Tx
http://mcuoneclipse.com/2013/02/07/tutorial-printf-with-and-without-processor-expert/
This is what I have:
Hardware:
- 2 SAINT2 devices, harness, and USB cables, these devices are sending and receiving frames into the CAN bus--OK
-1 TRK KEA 128 - MCU PKEAZ128MLK, working in Loopback mode--OK
Software:
-SAINT Bus Engine, to control the ports (open/close) on the guest PC.
-SAINT Bus monitor, to watch the frames on the bus
-Codewarrior 10.6.4
Also I attached a CAN project that I´m using.
Original Attachment has been moved to: KEAZ128_CAN_Network.zip
Solved! Go to Solution.
Add, after you add the code i mentioned , please select the "Don't write generated component modules", or when you click the generate code button, the code
will be disappear .
Hope it helps
Alice
Thanks, now is working!
Omar What did you do to make it work? I used the attachment she uploaded but I cannot step after the "PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_CAN1_ID, DeviceDataPrv);" the code gets stuck, and I havent changed anything in here code. but does not run, loop mode already worked for me
Hi Hugo,
Have you made the project work? I am facing the same codition as you, can you give me some advice?
Hello omar,
1. One method you can use a can-usb convetor , then check the data which CAN send on the PC terminal ;
Another method you can use the logic analyzer , or simple oscilloscope ( this only can check whether it can signal).
2. There is the option that disable or enable the loopback mode :
you also can use the register :
3. Configure the baud rate at here :
4. which post ?
5. If you use the TRK-KEA128 board, please select the UART2, not UART0.
Hope it helps
Have a great day,
Alice Yang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello again.
4.- This is the post where I saw this: Gateway(TRK-KEA128) ------------------ECU CAN Tx----------->------CAN Rx Console<--------CANRx----------<--------CAN Tx
CAN loop back not working in TRK KEA 128
I was trying to debug my project with no success, I change some few things according to the help Components for CAN_LDD, like Loopmode=NO and Bit Rate.
Could you please review my attached project to see if it is really sending/receiving a Frame for NOT Loop mode mode?
Nice day.
Hello omar,
I have not received your new project , so i change it on the first project
your attached.
First change the loop mode to"no" , then i can see the transmit data from the oscilloscope:
you can also test it on your side . while at this time it not run to the Tx interrupt.
Second , there is a bug on the PE code , it have not enable the CAN Tx interrupt , please add
this code at the CAN1_Init() function:
then you can see it can run to the interrupt function of TX .
I attach the project , hope it helps
Have a great day,
Alice Yang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Add, after you add the code i mentioned , please select the "Don't write generated component modules", or when you click the generate code button, the code
will be disappear .
Hope it helps
Alice
Hello Alice, I was trying to run your example code, but the implementation does not continue "PE_LLDD_RegisterDeviceStructure( PE_LDD_COMPONENT_CAN1_ID, DeviceDataPrv);