This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR6843AOP: UART to CAN-FD

Part Number: IWR6843AOP
Other Parts Discussed in Thread: UNIFLASH

Dear Team,

My customer is working on a project with the IWR6843AOP and would like to migrate from UART communication to CAN-FD. Can not find any resources how to do this.
I have couple questions concerning this topic: 


1. Is Data over CAN firmware you provide using radar toolbox same as Out of box demo except CAN communication instead of UART.
2. How can I use Data Over CAN firmware for e.g. IWR6843AOP board? Do I need to modify code using CCS and recompile it? How to modify the code?

Many thanks,

Daniel

  • Hey Daniel,

    Thanks for contacting us regarding your questions on CAN.

    1. The Object Data Over CAN demo and Out-of-Box demo are functionally the same. There are some minor differences in terms of the setup, such as OOB not initializing the CAN interface, and how certain hardware is utilized, but both demos return detected points data at a minimum. 

    2. It is possible to modify the Object Data Over CAN demo using CCS, but I would not recommend it as it can be challenging to work with, especially if you want to do more than output detected points. It may be better for your customer to start off with an existing 6843 demo that's closer to their end application and modify that to utilize CAN. They could start off with adding in a function to initialize the CAN-FD interface - see the Can_Initialize function in mss_main.c of the Object Data Over CAN in the Radar Toolbox, <RADAR_TOOLBOX_VER>\source\ti\examples\object_data_over_can\src\mss - and then replace any UART functions with relevant CAN functions. I also would recommend looking into the SDK documentation for the UART and CAN-FD drivers to see how to initialize, send, and receive data for each module to understand the differences between the two. The documentation for these drivers can be found under <SDK3_VER>\packages\ti\drivers\uart\docs\doxygen\html\index.html and <SDK3_VER>\packages\ti\drivers\canfd\docs\doxygen\html\index.html respectively. There are also a few other E2E posts that have asked similar questions that you can search through if you require some more help.

    Let me know if you have any other questions.

    Regards,

    Kristien

  • Hi Kristien,

    thanks for your reply. Regarding point 2., If I understand well, I need to manually edit OOB code to replace UART by CAN-FD, then compile whole MSS project. Although I should be able to do this, it is still little bit tricky for me to get correct result as a code compilation is not my daily job. I'm already facing a problem to compile not edited project, not know why exactly...

    Would it be possible to provide precompiled binary of OOB for IWR6843AOP including CAN-FD communication, flashable using Uniflash over UART?  Are there some others user applications requirements necessary?

    Appreciate your help, 

    Thank you,

    Adam

  • Hey Adam,

    TI cannot create and provide a new custom precompiled binary of the OOB demo with CAN-FD communication for the IWR6843AOP as that is outside of the scope of our support on E2E. If you have more specific questions or issues during development, you are free to create a new post and we can help out there. As for your other question on other user application requirements, I'm not clear on what you're asking about and was hoping you could clarify. 

    Regards,

    Kristien

  • Hi Kristien, concerning my second question, I'm just wondering why you do not provide "Data Over CAN" precompiled binaries for all the board's variants, especially those aiming real user product stage. Moreover, while CAN is presented as the primary data interface. It is quite a step from fast and easy to use of bineries you provide to code modification, validation, compilation, ...

    However, is there any documentation to follow in what it is necessary to modify to migrate from UART to CAN or do I need to go through the code finding corresponding methods to replace and hope all the dependencies will fit? 

    Regards, 

    Adam

  • Hey Adam,

    Unfortunately, while I would like to comment more on your second question, the best I can do is take your feedback and try to push for better and broader CAN support in the future for our devices. Most of the questions I answer are on CAN, so I understand where you're coming from. For now, I'll try my best to support you with our existing material and guidelines.

    Besides the previously mentioned resources, I would recommend reading over the application note linked below on adding CAN-FD support to an existing demo. This provides some code for initializing the CAN controller, interrupt callback functions and transmitting in FD mode and classic CAN mode as well as how to add the CAN-FD driver libraries to a Code Composer Studio project.

    https://www.ti.com/lit/an/spracf7/spracf7.pdf

    You can also look through the CAN-FD driver unit test code found in <SDK3_VER>\packages\ti\drivers\canfd\test\xwr68xx. Similar to the application note, this code contains most of the basic initializations and functions needed to run the CAN-FD driver, though there are some additional peripherals and functions for testing and debugging. While its not a fully complete application with a visualizer, this can be a good resource to pull from and learn about how the general code flow for our CAN-FD drivers.

    Hopefully these resources provide you with a good starting point. Let me know if you have any other questions.

    Regards,

    Kristien

  • Hi Kristien, 

    broader CAN support in the future would be fine, thank you for pushing this topic further among TI team. I'm going to follow the resources you provided, hopefully reaching desired binary. 

    Last idea, through this post, I'm asking the others forum members to share their modified binaries - at least for inspiration, validation,... Actually, is there any platform for sharing user's solution?

    Think it is resolved, thank you for your help,

    Best Regards,

    Adam

  • Hey Adam,

    Thank you for understanding regarding the CAN support. TI does not have an official workspace for user generated code, but other members are welcome to comment on this post with their solutions or other relevant information. I would ask that any future discussion is relevant to your original questions to keep this thread focused on the original topic and avoid it from becoming drawn out by other questions. If you or anyone else who stumbles across this post has any specific questions on CAN, then I would recommend opening a new thread to keep CAN discussion organized.

    Let me know if there's anything else I can help you with.

    Regards,

    Kristien

  • Hi Kristian, 

    I started modifying code in order to migrate from UART to CAN-FD according to your instructions. To be able to compare and test code, I started modifying OOB for 1642 board based on the Data Over CAN - I should be able to compare my results with prebuild binary you provide for 1642. However, as I spent some time comparing these scripts (including also driver test script), it is quite complicated task to build the project sucessfully.

    To be more specific, if I understand well:

    - modifying only mss_main

    - include can-fd driver

    - MmwDemo_transmitProcessedOutput is used only when using UART communication, could be removed 

    - find MmwDemo_mboxReadTask responsible for sending data over CAN-FD

    - need to create a task for Mailbox using Task_create somewhere

    - probably I need also MmwDemo_mboxCallback in order to trigger message processing

    - copy all CAN related stuff, hoping all variables matching

    I'm just wondering, why this is not already implemented, let say, user can select the interface and compile project. It is not easy to see all the dependancies. 

    Regards,

    Adam

  • Hey Adam,

    What you have listed for integrating CAN into the project should cover everything needed. There are a few reasons why we don't implement toggleable communication interfaces for projects. One that comes to mind is to keep project file size low. Additionally, some customers and applications will only need to target one communication or another such as LIN. Admittedly, I do think it could be worthwhile to include different communication interfaces for at least the OOB demos, so I will pass on that feedback for now.

    Regards,

    Kristien

  • Hi Kristien,

    thank you for your help, appreciate it. Hopefully it will be included in some future toolbox version. 

    Regards,

    Adam

  • Hey Adam,

    I'm glad I was able to help. 

    Regards,

    Kristien