Thank you very much for your reply, Paul, first of all sorry from my side I didn't think some official will reply to me because there are a lot of threads and that's why I posted under many threads in panic hoping someone might help me. I will discuss the problem with you.
Now first of all yes, the sensor is not IWR6843AOP (it's just a chip), its
IWR6843AOPEVM and here is the link:
https://www.ti.com/tool/IWR6843AOPEVM
When I just plug the sensor directly with my PC it shows 2 Com port as I discussed earlier, one COM port is used to upload the configuration (the settings used to tune the sensor according to your requirement) and the other COM Port is used to read the data coming from the sensor, previously I was using python to upload the configuration file and reading the data from the sensor and it was working perfectly fine, but the big issue was the involvement of PC because now my goal is to make standalone project of the task I have done. I don't want to go to the raspberry pi boards because firsts python is really slow than C/C++ and also those boards have more awakening time and other stuff because it's basically a whole computer. And in my case the timing is very crucial.
Now among different MCU's I only found teensy that allowed me to upload the code from the PC to the teensy, along with integrating the sensor with it, which was perfect! The logic in python was initializing both the COMPORTS first:
CLI_COM_PORT = "COM3"
DATA_COM_PORT = "COM4"
CLI_BAUD = 115200
DATA_BAUD = 921600
and upload the configuration file. After it finished uploading, the sensor automatically starts sending data and python starts reading it.
But when I implement the same logic on teensy 4.1, it does well in the first half and uploads the configuration file to the IWR6843AOPEVM sensor but then stops and nothing happens (I was printing every step output on the serial monitor). It didn't read the data coming from the sensor and on debugging I found out it was unable to detect the DATA COMPORT (the second com port in my case). It is failing to enumerate both the COMPORTs coming from a single device and seems like it just only detects the COMPORT it sees first. I found out this by writing a small code and enabling the debugging options, the output of that code was:
port change: 10001803
connect
port change: 1C001002
disconnect
port change: 10001803
connect
port change: 1C001002
disconnect
port change: 10001803
connect
port change: 1C001002
disconnect
port change: 10001803
connect
begin reset
port change: 10001005
port enabled
end recovery
new_Device: 12 Mbit/sec
new_Pipe
enumeration_transmit, state 0
enumeration_receive, state 0
enumeration_transmit, state 1
enumeration_receive, state 1
queuing get device descriptor
enumeration_transmit, state 2
queuing get device descriptor
enumeration_receive, state 2
Device Descriptor:
12 01 00 02 00 00 00 40 C4 10 70 EA 00 01 01 02 05 01
VendorID = 10C4, ProductID = EA70, Version = 0100
Class/Subclass/Protocol = 0 / 0 / 0
Number of Configurations = 1
enumeration_transmit, state 3
enumeration_receive, state 3
enumeration_transmit, state 4
enumeration_receive, state 4
Manufacturer: Silicon Labs
enumeration_transmit, state 5
enumeration_receive, state 5
Product: CP2105 Dual USB to UART Bridge Controller
enumeration_transmit, state 6
enumeration_receive, state 6
Serial Number: 010BCEB1
enumeration_transmit, state 7
enumeration_receive, state 7
Config data length = 55
enumeration_transmit, state 8
enumeration_receive, state 8
Configuration Descriptor:
09 02 37 00 02 01 00 80 32
NumInterfaces = 2
ConfigurationValue = 1
09 04 00 00 02 FF 00 00 03
Interface = 0
Number of endpoints = 2
Class/Subclass/Protocol = 255 / 0 / 0
07 05 81 02 40 00 00
Endpoint = 1 IN
Type = Bulk
Max Size = 64
Polling Interval = 0
07 05 01 02 40 00 00
Endpoint = 1 OUT
Type = Bulk
Max Size = 64
Polling Interval = 0
09 04 01 00 02 FF 00 00 04
Interface = 1
Number of endpoints = 2
Class/Subclass/Protocol = 255 / 0 / 0
07 05 82 02 20 00 00
Endpoint = 2 IN
Type = Bulk
Max Size = 32
Polling Interval = 0
07 05 02 02 20 00 00
Endpoint = 2 OUT
Type = Bulk
Max Size = 32
Polling Interval = 0
enumeration_transmit, state 9
enumeration_receive, state 9
USBHub memory usage = 992
USBHub claim_device this=20004220
USBHub memory usage = 992
USBHub claim_device this=20004600
USBSerial(512)claim this=20004AE0
vid=10C4, pid=EA70, bDeviceClass = 0, bDeviceSubClass = 0, bDeviceProtocol = 0
09 04 00 00 02 FF 00 00 03 07 05 81 02 40 00 00 07 05 01 02 40 00 00 09 04 01 00 02 FF 00 00 04 07 05 82 02 20 00 00 07 05 02 02 20 00 00
len = 46
USBSerial, rxep=1(64), txep=1(64)
rx buffer size:1920
tx buffer size:1920
new_Pipe
new_Pipe
CP210X: 0x41, 0x11, 0, 0, 0 - reset port
control callback (serial) F
CP210x setup, 0x41, 3, cp210x_format 800
control callback (serial) E
CP210x Set Baud 0x40, 0x1e
control callback (serial) C
CP210x 0x41, 0, 1
control callback (serial) 8
CP210x 0x41, 7, 0x0303
control callback (serial) 0
Now by seeing this output I tried to understand this and with some help from Claude I found out that the teensy is actually seeing both the COMPORTS but the problem is it is only claiming one COMPORT.
Now tell me is it a common thing? is it the limitation of teensy board or the USB HOST library that it can only detect one COMPORT and that one will be the first one they see or its just the problem on my side and it can actually enumerate both the comports simultaneously? And yes, I have also tried to detect CLI COM ports first, upload the cfg file first, then close it and then detect the DATA_COM but still it didn't work and it still detected the first one the CLI com port. How can I claim both the interfaces from the single device and is it the library limitation or its the limitation of the USBHost pins itself? I am confused a little I dont actually know if I am asking the right question
