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.

MMWCAS-RF-EVM: MMWCAS-RF-EVM: Problem connecting to TDA from mmWaveLink_Cascade_Example

Part Number: MMWCAS-RF-EVM

The problem is that the application can not connect to the TDA and gives the following output:

================= mmWaveLink Example Application ====================

INFO: Registered Async event handler with TDA

Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0

ERROR: Connecting to TDA failed with error 1. Check whether the capture card is connected to the network!

ERROR: Failed to Connect with TDA

Trace File output:
[16:45:27:893]: # INFO: Network: Connecting to the server 192.168.33.180:5001 ...
[16:45:27:924]: # NETWORK: Connected to Server (192.168.33.180:5001)!!!
[16:45:27:926]: [GN]0xC8 0xA5 0x12 0x00 0x00 0x00 0x0C 0x00 0x20 0x10 0x00 0x00 0x00 0x00 0xA6 0x95
[16:45:27:926]: # INFO: Sending trace file name : Trace_TDA_[06_12_2021_16.45].txt , Length : 32
[16:45:27:926]: [GN]0xC8 0xA5 0x16 0x00 0x00 0x00 0x2C 0x00 0x20 0x01 0x00 0x00 0x00 0x00 0x54 0x72 0x61 0x63 0x65 0x5F 0x54 0x44 0x41 0x5F 0x5B 0x30 0x36 0x5F 0x31 0x32 0x5F 0x32 0x30 0x32 0x31 0x5F 0x31 0x36 0x2E 0x34 0x35 0x5D 0x2E 0x74 0x78 0x74 0x02 0xD0
[16:45:27:927]: # ERROR: Unknown command received from device 5
[16:45:27:932]: [GN]0xC8 0xA5 0x13 0x00 0x00 0x00 0x0C 0x00 0x20 0x01 0x00 0x00 0x00 0x00 0xD8 0x38
[16:45:27:932]: ERROR: recv failed in Network_read!
[16:45:27:932]: # ERROR: Could not receive data
[16:45:27:932]: # ERROR: CRC did not match. Received CRC : 0
[16:45:27:933]: ERROR: recv failed in Network_read!
[16:45:27:933]: # ERROR: Could not receive data
[16:45:27:933]: # ERROR: Received wrong sync byte 13
[16:45:33:632]: # ERROR: No ACK received for TDA version command

My setup::
MMWCAS-RF-EVM, ASW2243

Visual Studio 2017 - version 15.9.40
Release Build
C:\ti\mmwave_dfp_02_02_03_01\ti\example\mmWaveLink_Cascade_Example

ethernet lib path
C:\ti\mmwave_dfp_02_02_03_01\ti\example\platform\mmwl_ethernet

I rebuild the ethernet library -> mmwl_port_ethernet.lib,
using the projectd file here: C:\ti\mmwave_studio_03_00_00_14\mmWaveStudio\ReferenceCode\EthernetLib\SourceCode\vs

Rebuilding the ethernet lib did not fix te eissue with MMWL_TDAInit() failing to connect

Where, ethernetConnection(...)  fails inside of  MMWL_TDAInit()

int MMWL_TDAInit()
{
...
retVal = ethernetConnect(mmwl_TDA_IPAddress, mmwl_TDA_ConfigPort, mmwl_TDA_DeviceMapCascadedAll);

----------------------------------------

This failure seems to be connected to additional code I inserted in main() to printout debug data
If I added more than a certain amount of code, the MMWL_TDAInit() fails.....

If I remove a small amount of code, it runs again,  and fails when I add a small amount of code back in.  
It does not seem to matter what the added/removed code does.....

Is there a code size limitation or other configuration issue that could be causing this issue?

I appreciate you help

Regards 
Eddie

  • Hi Eddie,

    Could you try mmwave studio with your setup to confirm it connection is proper?

    https://www.ti.com/tool/download/MMWAVE-STUDIO-2G

    Regards,

    Jitendra

  • Thanks for the reply

    The radar works with MMWWAVE-STUDIO with respect to initializing the TDA ethernet

    Also, the mmWave_Cascade_Example works as long as I don't put "too" much of my own new code in the application.

    The way I have been getting it to work, is by removing existing debug code and replacing it with "new" debug code.

    Sometimes I get a Read Access Violation as seen below.  

    Are there any limitations on code size?

    This failure occurs before my new code is called.  Just having the code in the app, causes this "connect to the TDA" to happen.

    Regards
    Eddie

  • More info to report related to the issue ->  "ERROR: Failed to Connect with TDA"

    ================= mmWaveLink Example Application ====================
    INFO: Registered Async event handler with TDA
    Device map 32 : CAPTURE_RESPONSE_ACK Async event recieved with status 0
    ERROR: Connecting to TDA failed with error 1. Check whether the capture card is connected to the network!

    sequence leading up to failure is:

    1) MMWL_TDAInit() Called
    2)     ethernetConnect()  Called
                  ethernetConnect() fails with a ret code of (1),
                  which is "SYSTEM_LINK_STATUS_EFAIL"

    This failure due to "TDA_StartTraceACK" not getting set to 1 by some call back...

    How could adding more code in an unrelated part of mmw_example.c, which is executed AFTER the MMWL_TDAInit() is called, cause this side-effect in TDA_Init() ?

    regards
    Eddie

  • Hi Eddie,

    Are you trying to add code in computeCrc function? this function is being used by the mmwavelink library for CRC calculation.

    You may need to check the program or Task stack to find the cause of this .

    Regards,

    Jitendra

  • Thanks for the response.

    I added code to mmw_example.c.  Also, I added a new C file to the project for a few new functions. I did not add code to computeCrc function.
    This type of issue does seem like it could be stack related.  

    I added:   /STACK:4000000
    to the mmwavellink_example property pages:  Command Line, additional options.  
    But, this did not help.

    Are there other stack options besides the /STACK for the linker I could try?

    Regards
    Eddie

  • One of the engineers on out team had a similar issue connecting with the TDA as mentioned at to of this thread:
    He observed the following and made the following change, which so far, has resolved our issue with TDA Connections

    Observation:

    MMWL_TDAInit registers the callback and typecasts the callback to TDA_EVENT_HANDLER, which is defined as follows in mmwl_port_ethernet.h

     

    which requires a function to have __stdcall signature, but in properties (C/C++ advanced) for the project, calling convention is "__cdecl"

    The fix for us is to cast this function to __syscall
    in mmwave_example.c (cascade example)



    I will mark this as resolved.  
    Thanks for your help

    regards Eddie