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.

IWR6843: Mult radar CAN bus arbitration

Part Number: IWR6843

Tool/software:

Hi,

I am using IWR6843 radar module. I have connected multiple radars (6 radars) on CAN bus. All radars are sending packets at 200ms time interval. I have observed few things mentioned below,

1. When I power on all radars at a time then I am not able to receive data from all the radars. Out of 6 sometime only 4 will work or 2 or sometimes all radars will work properly.

2. If I power on radars one by one then I am able to receive the data from all radars properly.

3. If I power on all radars and if I observe that I am not able to get the data properly from all the radars then I press on board reset button simultaneously and then it started receiving data from all the radars.

So is there any CAN bus arbitration issue that is affecting here in this case? Is it okay if I keep different packet transmitting rate of each radar like 200ms, 201ms, 202ms and so on? Or is there any CAN settting that I have to set in radar firmware?

Thanks,

Manoj

  • Hi

    Thanks for your query. Please allow us a couple of days to respond.

    Regards

  • Hello Manoj.

    s it okay if I keep different packet transmitting rate of each radar like 200ms, 201ms, 202ms and so on?

    I think this would be ok; if you do this are you seeing it work consistently every time?  Or are you still only seeing the correct behavior sporadic behavior.

    I am using IWR6843 radar module. I have connected multiple radars (6 radars) on CAN bus. All radars are sending packets at 200ms time interval. I have observed few things mentioned below,

    Have you tried probing the the CAN bus with two or three devices to see if there are any delays being generated by the power-on that you are performing?

    Sincerely,

    Santosh

  • Hi Santosh,

    With different packet transmitting rate I have tested it with 4 radars first. It was working consistently every time. But later I have added 2 more radars in that case after startup it will work properly till some random time like 15 mins or half an hour or sometimes more than that. Then out of these 6 radars few radars stop responding. And when I press reset button of the one which has stopped sending data then it starts sending data properly. So, if I add more radars this behavior may be different every time. Could you please suggest me something to work all, or number of radars connected in a CAN network consistently.

    Delay while power on I need to check how much delay is there.

    Thanks,
    Manoj

  • Hey Manoj,

    Good to hear from you again! Just to verify, have you also confirmed no errors have occurred on any of the devices when they stop sending data? Additionally, please check if powering on the device creates some unintended delay.

    Regards,

    Kristien

  • Hi Kristine,

    I am here again with CAN query. Nice to see you again.

    No errors have occurred on any of the devices when they stop sending data. And also if I press reset button they start sending data again.

    I will check the delay. How will delay in powering on sequence affect the CAN communication? 

    Thanks,

    Manoj

  • Hey Manoj,

    I want to verify on your CAN system if there is a priority issue that is linked to CAN age, specifically the longer a device has been active, the higher its priority on the bus. This shouldn't be the case, but I believe I've seen a similar issue before

    Regards,

    Kristien

  • Hi Kristien,

    There is no priority issue that is linked to CAN age, because the one which turned ON first in the power sequence it may stops working. 

    Thanks,
    Manoj

  • Hey Manoj,

    How did you confirm that no errors have occurred on any of the halted devices? There should be some signs of failure either in software - e.g., CPU fault, CAN buffer error - or hardware - e.g., Tx and Rx pins failing to communicate with CAN transceiver or CAN transceiver failing - that is preventing normal CAN operation.

    Would it be possible for you to keep one or more of your radar CAN devices connected up to the CCS debugger, so you can check the state of the application and CPU after failure? I understand you don't have a means of replicating the error on demand, so it will likely have to be a waiting game.

    Finally, are you using your own custom board or an existing TI EVM? If its a TI EVM, which one is it?

    Regards,

    Kristien

  • Hi Kristien,

    I have checked this on CAN analyzer. On startup each node starts communicating that I could see on CAN analyzer and after some random time duration one of them stops sending data which again I observed on CAN analyzer.

    I don't have debugging tool to connect and see what exactly happening to radars in CCS debugger. 

    I am using TI EVM IWR6843ISK.

    Thanks,
    Manoj

  • Hey Manoj,

    Thank you for clarifying on your test setup. Three more questions here. Could you share the code you are using for configuring and communicating with the other CAN nodes? I would recommend copying it into a text file and attaching it, so that its easier to view.

    Additionally, would it be possible for you to add a periodic task or operation that would indicate the device is still active and executing properly? For example, toggling an onboard LED whenever a CAN transmission is completed or adding in UART output to with CAN status register information. The latter option may affect timing versus the simpler LED toggle.

    Finally, whenever a node fails, is the transmission, receival, or both failing to operate properly? For example, if you configure each node to receive only one unique ID, when it fails, does it fail to acknowledge messages that are addressed with its specific ID or does it only fail to send out CAN messages?

    Regards,

    Kristien

  • Hi Kristien,

    I have interfaced radars with microcontroller board. You want microcontroller side code?

    I have added periodic tasks where I found if no data sent by radar, then that periodic task will not work. And if I press reset button on radar then it starts working again.

    Currently I am looking for receiving the data from radar. Configurations happens at startup only. Once they are configured, I don't send any command or configuration to radar.

    Thanks,
    Manoj

  • Hey Manoj,

    I have interfaced radars with microcontroller board. You want microcontroller side code?

    I did not realize you were using a separate microcontroller board to interface with the IWR6843ISK EVM. What microcontroller are you using to interface with the IWR6843ISK EVM? How are you communicating between the two boards? What is being communicated between each board - e.g., only used to configure CAN transceiver?

    I have added periodic tasks where I found if no data sent by radar, then that periodic task will not work. And if I press reset button on radar then it starts working again.

    Currently I am looking for receiving the data from radar. Configurations happens at startup only. Once they are configured, I don't send any command or configuration to radar.

    I understand that the devices are only configured once, but I think there might be some confusion on my side and your side here. My main goal with these two suggestions was to determine if this failure is affecting the entire device, the CAN peripheral, or a part of the CAN peripheral. Based on these replies, it seems like the conclusion is that at some point, the entire device fails since the periodic task is no longer responding assuming the periodic task you defined is not directly tied into the CAN timing.

    I should've better described what sort of task I was looking for here, so to clarify, is the periodic task you defined directly related to the CAN transceiver's operation or just a general task that should occur independently of the transceiver? If the latter, I think that should give more credence to the idea that the device is failing entirely, though it can - and is likely still to - be CAN related.

    You also mentioned here that you are looking for receiving the data from the radar. I think it would helpful if you describe a bit more of what each CAN node is attempting to transmit and receive, so that I can better understand your setup. For example, CAN0: Tx Standard ID - 0x76F, Rx Standard ID - 0x348 | CAN1: Tx Standard ID - 0x348, Rx Standard ID - 0x76F.

    Regards,

    Kristien

  • Hi Kristien,

    1. I am using STM32 microcontroller. I have interfaced IWR6843 with STM32. Radars and controller communicating over CAN interface. The object detection data sent by radar I am interpreting it in STM32 like range, azimuth, elevation data. 

    2. As I said I have interfaced multiple radar on a CAN bus with STM32 microcontroller so each radar having their unique ids while sending data packets. For example, Radar 1 having id 0xD01, Radar 2 having id 0xD11, Radar 3 having id 0xD21 and so on. I have written a task to print the radar number when it receives data from particular radar. For example, if I receive data from Radar 1 with id 0xD01 then I will print "Radar 1\r\n" on serial. I am printing this serial messages independently for individual radars when I receive data from that particular radar. So, this kind of task I have written. If any of these radar stops sending data, then I don't get serial message for that particular radar. But rest radars keep working properly. And if I press reset button for that particular radar which stops sending data then I will start getting data as well as print message for that radar.

    Sorry for the confusion. I hope this will give you clear idea. If not, then please let me know will try to brief you again.

    Thanks,
    Manoj

  • Hey Manoj,

    Thank you for the clarification on the setup! I think this clears up my understanding of the system quite a bit. To further clarify, the IWR6843's and STM32 are communicating on one bus where the radar devices are sending unique ID messages containing the object detection data that are then received by the STM32, correct? If possible, could you share the code you are running on the IWR6843ISKs? Again, I would recommend copying it into a text file and attaching it, so that its easier for me to view. 

    Regards,

    Kristien

  • Hi Kristien,

    Your understanding is correct.

    Do you want any specific code file? I am attaching here "mss_main.c" file copied into text file. Let me know if you need any other file.

    Thanks,
    Manoj


    mss_main.txt

  • Hey Manoj,

    The mss_main.c file should be enough, unless you've made some major changes to other files that were originally in the LRPD demo. A few questions and suggestions here after looking over the code:

    1. You mentioned in your previous message that each radar has its own unique ID, but I don't quite see how that's implemented here in the code. You pointed out ID 0xD01 as one of the unique IDs which does show up as the CAN_MESSAGE_IDENTIFIER and is sent once during CAN initialization, but it is also the ID for CAN_MESSAGE_DETECTED_POINTS. Therefore, I'm a bit confused how the STM32 is supposed to differentiate these two different types.

    2. In the TrackerDemo_transmitProcessedOutput function, the CAN_MESSAGE_DETECTED_POINTS ID is reused for the target list and target index output. Do you plan on replacing these with their own IDs in the future?

    I have also tested on my side your code with a PCAN and found no issues in transmitting and receiving all messages. While I haven't been able to verify the performance with multiple radar devices, this does make me think that this is likely an issue from arbitration which may rarely affect the timing of the application leading to an application failure. 

    Regards,

    Kristien

  • Hi Kristien,

    No other changes made apart from mss_main.c file.

    1. Just for now simplicity I am hardcoding unique id and generating binary. Separate binaries for 0xD01, 0xD11, 0xD21 and so on.

    2. Yes, I am planning to replace it in future.

    Yes, with single radar I have never faced any issue. But with multiple radars I am facing issue.

    Thanks,
    Manoj

  • Hey Manoj,

    I would like to discuss this issue with some other CAN experts on my side. I will get back to you tomorrow.

    Regards,

    Kristien

  • Sure Kristien.

    Thanks,
    Manoj

  • Hey Manoj,

    I cannot provide an update today. I will update you on Monday instead.

    Thank you for your patience,

    Kristien

  • Hey Manoj,

    After some discussions with other engineers, I don't have much to share besides what's been said before, but there are a few things I'd recommend. First of all, would it be possible for you share a scope shot of the bus when the radar nodes are transmitting (during arbitration if possible)? Have you also attempted to hook up a CAN analyzer to the bus and track activity through that? If so, is there any data you could share on from that?

    Additionally, what configuration have you been using? If its your own, could you please share it?

    Regards,

    Kristien

  • Hi Kristien,

    I am attaching CAN analyzer data which I have captured for 6 radars. Also, I am attaching configuration file which I am using for radars.

    In configuration file I have kept different frame periodicity rate for all radar. For example, if radar 1 then it is 200ms, if radar 2 then it is 202ms, if radar 3 then it is 204ms and so on. I am operating radars at 61GHz frequency. I have disabled clutter removal. I have enabled peak grouping.

    Please find the attachments.

    Thanks,

    Manoj

    	"sensorStop\n",
        "flushCfg\n",
        "dfeDataOutputMode 1\n",
        "channelCfg 15 7 0\n",
        "adcCfg 2 1\n",
        "adcbufCfg -1 0 1 1 1\n",
        "profileCfg 0 61 35 6 43.0 0 0 8.241 1 125 3433 0 0 48\n",
        "chirpCfg 0 0 0 0 0 0 0 1\n",
        "chirpCfg 1 1 0 0 0 0 0 4\n",
        "frameCfg 0 1 128 0 200 1 0\n",
        "lowPower 0 0\n",
        "guiMonitor -1 1 0 0 0 0 0\n",
        "cfarCfg -1 0 2 8 4 3 0 10 1\n",
        "cfarCfg -1 1 0 4 2 3 1 10 1\n",
        "multiObjBeamForming -1 1 0.5\n",
        "clutterRemoval -1 0\n",
        "calibDcRangeSig -1 0 -5 8 256\n",
        "extendedMaxVelocity -1 0\n",
        "bpmCfg -1 0 0 1\n",
        "lvdsStreamCfg -1 0 0 0\n",
        "compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0\n",
        "measureRangeBiasAndRxChanPhase 0 1.5 0.2\n",
        "CQRxSatMonitor 0 3 4 63 0\n",
        "CQSigImgMonitor 0 127 4\n",
        "analogMonitor 0 0\n",
        "aoaFovCfg -1 -45 45 -17 17\n",
        "cfarFovCfg -1 0 0 49.99\n",
        "cfarFovCfg -1 1 -30 30.00\n",
        "%SceneryParam -50 50 0.5 60 -6 6\n",
        "staticBoundaryBox -50 50 0.5 60 -0.5 6\n",
        "boundaryBox -50 50 0.5 60 -0.5 6\n",
        "gatingParam 4 6 6 6 10\n",
        "stateParam 4 10 60 600 20 600\n",
        "allocationParam 30 30 0.5 3 2 2\n",
        "maxAcceleration 0.1 0.1 0.1\n",
        "trackingCfg 1 2 250 20 78 121 99\n",
        "sensorPosition 2 0 0\n",
        "presenceBoundaryBox -3 3 2 6 0.5 2.5\n",
        "sensorStart\r\n",

    CAN_Analyzer_radar_data.csv

  • Hey Manoj,

    Thanks for sending these over! Two quick questions before I take a deeper look through the data: what CAN analyzer was used to log this data? Were there any errors encountered during this data collection? Based off a quick skim, it doesn't look like there were any errors, but I just want to verify before going further. 

    Also, as a heads up, I will be unavailable next Monday and Tuesday, but I'll try to let you know my thoughts on all this by tomorrow. 

    Regards,

    Kristien

  • Hi Kristien,

    I have PCAN as well as USB to CAN analyzer by ixxat. Log which I have shared that I have captured using USB to CAN analyzer by ixxat.

    There were no errors encountered during this data collection. All 6 radars were working properly. But sometimes I don't see data coming from one or two radars. 

    Sure, Kristien as per your availability you can share your suggestions.

    Thanks,
    Manoj

  • Hey Manoj,

    Thank you for answering my questions. I have not had the chance to review your results, so please give me until next Wednesday to reply.

    Thank you for your patience,

    Kristien

  • Hi Kristien,

    Any update on this?

    Thanks,
    Manoj

  • Hey Manoj,

    I apologize for the delay in getting around to this. I will look into this tomorrow, as there is another project that is taking my priority.

    Regards,

    Kristien

  • Hi Kristien,

    I hope you are doing well. 

    Any further updates on this?

    Thanks,
    Manoj

  • Hey Manoj,

    I apologize for the delay in response here. I did have the chance to look over your results and configuration file and have found no issues with either. Unfortunately, unless you can connect to the one of the radar devices and debug it or there have been any debugging updates on your side, I have no other suggestions. If you'd like to debug the device, you'll need a MMWAVEICBOOST to allow CCS to connect to the device via the XDS110. 

    Regards,

    Kristien

  • Hi Kristien,

    Thank you so much for your support. I will try debugging it and will let you know.

    Regards,
    Manoj

  • Hey Manoj,

    If you have any new questions, I'd recommend opening up a new thread as this one has run on quite a bit, and I plan on closing it. You can create a related question to help keep the new post linked to this one to help others who might've tracked along with this debugging progress.

    Regards,

    Kristien