Problem creating usb task with twrk60d100m kds3.0.0 ksdk 1.3.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem creating usb task with twrk60d100m kds3.0.0 ksdk 1.3.0

Jump to solution
561 Views
yorknh
Contributor IV

I am using the mqx "hello" example as a starting point. It compiled and works fine. I then tried to use the guidance provided in How do I setup the debug console to use the Virtual COM port (USB CDC driver)? to have the debug console set to use the USB interface. In addition to what is referenced there I defined BSPCFG_ENABLE_IO_SUBSYSTEM to be 0 which is what triggers DbgConsole_Init() to be called. This leads to USB_Class_CDC_Init() to be called which tries to create a usb task. I have been using TAD to see if there is a stack allocation problem, and what I noticed is that MQX Stack usage window shows data right up to the the point that the usb task gets inserted into the list of tasks. I've narrowed it down to the specific assembly instruction that seems to screw up the MQX Stack usage window. Beyond that, ultimately the usb task never executes.

 

Here's a screen shot before executing the instruction:

99677_99677.JPGbefore.JPG

And after:

99678_99678.JPGafter.JPG

 

I can get the virtual com demo project to work correctly, but I can't seem to integrate the virtual com functionality into another example.

Labels (1)
0 Kudos
1 Solution
349 Views
yorknh
Contributor IV

I still have no idea why the TAD information goes away as soon as the USB task is created, but I've found that making the USB task a higher priority than the other tasks allows things to work. I don't understand why it can't be the same priority but if I figure that out I'll post another reply in case it's useful for someone else.

View solution in original post

0 Kudos
2 Replies
350 Views
yorknh
Contributor IV

I still have no idea why the TAD information goes away as soon as the USB task is created, but I've found that making the USB task a higher priority than the other tasks allows things to work. I don't understand why it can't be the same priority but if I figure that out I'll post another reply in case it's useful for someone else.

0 Kudos
349 Views
yorknh
Contributor IV

I've dug in a little further, and while I still don't have any idea what's going on with TAD, the USB task does execute, but blocks waiting on OS_MsgQ_recv. I don't have the answer to that yet either since the isr associate with the interface gets called and I see it post a message to what I think is the correct queue...

0 Kudos