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.

TM4C1294KCPDT: USB0 device mode interrupted

Guru 55913 points
Part Number: TM4C1294KCPDT
Other Parts Discussed in Thread: LM94022

Device mode works great on EK launch pad with +VBUS/ID input signals. Disconnects windows device client after PWM0/ADC0 start to run full out with duty cycle updates and interrupts occurring.

Changing USB device host buffer 2048kb up to 32kb did not stop client disconnects but one time only. Note +VBUS/ID are being forced high via USB0 GPCS register. Note too there is no USB disconnect status returned when +VBUS/ID are being forced high by software. Lowering the USB0 INT priority has no effect either way to stop client disconnects that occur when PWM0 starts up. Re-establishing the USB device endpoint while PWM0/ADC0 are crunching only lasts a few cycles then disconnects the client.  

Any thoughts what could be disconnecting the bulk device client in the above scenario? USB0 shell/shield are connected to PCB edge frame ground via 1Meg/3300pf in parallel. Frame ground is connected to electrical panel bonded ground, located 2' away from PCB and analog ground plane ties into frame ground via similar RC network. USB0 RX/TX differential pair are same length traces located within 1" to MCU inputs and connector has no ground plane foil as TM4C129x design guidelines suggest.

 

  • This must be the oddest USB interruption tracked down to ADC1 sequencer 1 samples of two LM94022 temperature sensors. They both were very stable at idle reporting into the USB device client. When PWM0 was crunching the DC inverter one sensor was rolling values more frequently.

    ADC1 hardware averaging was already 2x on posting thus later changed to 4x and again 8x to get that one sensor to slow down. LM94022 powers from 3v3 LDO regulator independent of MCU, VDD from another 3v3 LDO. Both LM94022 have 0.1uf on +3v3 and 1nf on analog signal to ground near MCU pin. Both LM94022 share VDD traces from 1 VIA off the a 3v3 trunk line and use AIN16/AIN8, digital ground pin next to AIN16 of rolling sensor values. Oddly AIN9 monitors DC bus voltage, a very noisy analog line does not seem to affect ANI8 analog temperature readings like AIN16 next to digital ground pin.

    The sequencers sample interrupt had low pass filter (sample value*8/9) for both steps of SS1, dedicated separate arrays. Apparently changing both filter (sample value*3/4) stopped USB0 cutting off bulk device client transfers of data from the buffer to the client endpoint.

  • As for the LM94022 sensor rolling analog sample:

    Any thoughts why step 1 sample would have more analog roll than step 2 as explained above? Have noticed this same behavior on other sequencers reading a DC voltage from the same ANIX channel may produce a +1 to +3 volt variance over another steps samples.

    The analog sample value changes when the step varies in the sequencers end and interrupt times. So a step near the end has less time in sample window prior to the sample end interrupt thus produces higher digital values than a lower step number. It would seem the SAR ADC has some limitations in the step to end interrupt aspect.
  • This case seems the rolling value LM94022 output resistance was 2.7k and the other varied 896K, 27k, 586k but never 2.7k. Changing the rolling value sensors filter capacitor value from 1nf to 200pf produced false triggering of analog comparator C2- input.

    No matter C0+ threshold voltage pot was toped 2.8v the C2- input would trip but the 1nf stopped false tripping when pot 2.5v. So the AIN16 low resistance 2.7k from LM94022 was some how inflicting the analog comparator C2- internally in the MCU.
  • BP101 said:
    Device mode works great on EK launch pad with +VBUS/ID input signals

    Now recall the two LM94022 were not installed so the ADC value was a digital number derived from the ADC sequencer just for showing in GUI.  

    So there is still random USB device client disconnects when even a single sensor value might vary under high voltage being present on the PCB. Oddly the LM94022 suggest to use a look up table available for down load. Yet the LM 94022 sensors analog voltage can produce 10th's of a degree between 1 degree samples not found in the datasheet temperature table. Oddly the temperature value starts to drift up/down as do other GPTM's/ADC sequencers when the PWM0 module is crunching numbers. So much for the SAR ADC producing exact sample measures when PWM0 is creating any kind of DC noise at all.