- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been working with the BulkLoop sample application from your website. I am trying to get it to work with the firmware
settings from AN56377 project 1. Currently I am having an issue with the ConstructEndpoints() function. What I am seeing
is that the lines:
outEndpoint = loopDevice.EndPointOf(addrOut) as CyBulkEndPoint; | |
inEndpoint = loopDevice.EndPointOf(addrIn) as CyBulkEndPoint; |
produce null outputs for inputs of
addrOut = 0x04
addrIn = 0x83
which are the settings for the AN56377 project 1. So the question is why is the function returning a null value ?
Any ideas ?
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Basically what I changed in the AN56377 firmware was:
1. I moved the bulk endpoints to the first configuration spots and the Int endpoints to the second configuration spots.
2. I removed the isochronous endpoints.
My belief was that the bulk loopback sample application was not able to find the bulk endpoints for some reason.
And I was not going to use the isochronous endpoints.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Randy,
Please mention which board are you using? Is it FX3 or PSOC? Could you please share the snippet of code of Host application where these instructions are mentioned.
Thanks & Regards
Abhinav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This board is a PSOC 5LP Prototyping Kit.
private void ConstructEndpoints() | |
{ | |
if (loopDevice != null && cboOutEndPoint.Items.Count > 0 && cboINEndpoint.Items.Count > 0) | |
{ | |
string sAltOut = cboOutEndPoint.Text.Substring(4, 1); | |
byte outAltInferface = Convert.ToByte(sAltOut); |
string sAltIn = cboINEndpoint.Text.Substring(4, 1); | |
byte inAltInferface = Convert.ToByte(sAltIn); |
if (outAltInferface != inAltInferface) | |
{ | |
Text = "Output Endpoint and Input Endpoint should present in the same ALT interface"; | |
StartBtn.Enabled = false; | |
return; | |
} |
// Get the endpoint | |
int aX = cboINEndpoint.Text.LastIndexOf("0x"); | |
string sAddr = cboINEndpoint.Text.Substring(aX, 4); | |
byte addrIn = (byte)Util.HexToInt(sAddr); |
aX = cboOutEndPoint.Text.LastIndexOf("0x"); | |
sAddr = cboOutEndPoint.Text.Substring(aX, 4); | |
byte addrOut = (byte)Util.HexToInt(sAddr); | |
// OUT endpoint to be 0x02 and IN endpoint to be 0x86 | |
outEndpoint = loopDevice.EndPointOf(addrOut) as CyBulkEndPoint; | |
inEndpoint = loopDevice.EndPointOf(addrIn) as CyBulkEndPoint; | |
if ((outEndpoint != null) && (inEndpoint != null)) | |
{ | |
//make sure that the device configuration doesn't contain the other than bulk endpoint | |
if ((outEndpoint.Attributes & 0x03/*0,1 bit for type of transfer*/) != 0x02/*Bulk endpoint*/) | |
{ | |
Text = "Device Configuration mismatch"; | |
StartBtn.Enabled = false; | |
return; |
} | |
if ((inEndpoint.Attributes & 0x03) != 0x02) | |
{ | |
Text = "Device Configuration mismatch"; | |
StartBtn.Enabled = false; | |
return; | |
} | |
outEndpoint.TimeOut = 1000; | |
inEndpoint.TimeOut = 1000; | |
} | |
else | |
{ |
Text = "Device Configuration mismatch"; | |
StartBtn.Enabled = false; | |
return; | |
} |
} | |
} |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check the device manager if the device is enumerating properly. Also share the screen shot of it.
Thanks & Regards
Abhinav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The device driver appears to be operating properly.
Randy
PS: I wondered if the order of the endpoints would make any difference ? The bulk endpoints are after
the interrupt endpoints.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Randy Seedle,
Are you able to see the device in control center? Also tell me what is the driver version it is binding to?
Thanks & Regards
Abhinav Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I rewrote the the firmware and this problem went away. So now we are on to
the next bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Randy,
Could you please mention what changes you made in new firmware?
Thanks & Regards
Abhinav Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Basically what I changed in the AN56377 firmware was:
1. I moved the bulk endpoints to the first configuration spots and the Int endpoints to the second configuration spots.
2. I removed the isochronous endpoints.
My belief was that the bulk loopback sample application was not able to find the bulk endpoints for some reason.
And I was not going to use the isochronous endpoints.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, Thanks for sharing.