Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

Not applicable

We are evaluting your FX2 for a company project.   
I am trying the examples on our brand new cy3684 kit and I notice that although they work, I can make trivial one line changes to the code and have unrelated functionality break. It is like the linker is moving code around based on these changes and losing alignment or putting things where there is no memory.   
What linker settings are recommended for these examples? All that comes with it out of the box is that code should be above 0x0080 and xdata is above 0x1000. Also, I see RAMSIZE at 256. Is that it? Do you set up a stack or anything?   
I can change a loop counter in a function that is never executed from WORD to DWORD and toggle the Endpoint 4 bulk transfers to work and not work. The loop counter is in code that never executes and is absolutely unrelated to this endpoint 4 stuff.   
I start with an example that has the bulk transfers working like bulkloop.c and a couple vendor commands, get chip revision and a few others.   
I add a single function to Vend_Ax.c that I don't even call. If I do call it, it makes no difference to the experiment. It is as follows:   
BOOL Init();   
BOOL Init() {   
WORD i;   
for (i = 0; i < 20; i++); // delay at least 2us   
for (i = 0; i < 1000; i++); // delay at least 5us   
// Check the status lines   
return 0;   
If you change the "WORD i;" line to "DWORD i;", then run the bulk transfer out Endpoint 4 using CyConsole, the bulk transfer will succeed, but the USB will stall with the next vendor command. You do not even have to call this function, just having it declared produces the problem. I am guessing I need better linker settings.   
0 Replies