Part Number: MSP430F5529
Other Parts Discussed in Thread: MSP430WARE
Hi everyone,
I'm using MSP430F5529 with SDK msp430ware 3.80.09.03 and encounter a situation where the USB connection is suspended unintentionally.
It happens due to a specific action of the user: the system may receive various commands via CLI (a few dozens), and regardless of which commands are sent or by which order - at some point the USB driver will be suspended (a few sec or ms after a command is sent). I can see that when using a breakpoint inside Usblsr.c in line 144 - the USB interrupt receives the event USBVECINT_SUSR.
After doing some reading, I found that the USB suspensions "is characterized by 3ms of inactivity on the data signals", as mentioned here in page 42.
I'll mention that running in a loop the code which the CLI commands initiate, without using the CLI commands themselves, results in a normal behavior of the system. Namely, it seems that the issue lies in the USB connection and not in the logic which the commands initiate. After a USB disconnection, due to an unintended suspension, the system's logic continues running properly and everything is fine except for the USB. When disconnecting the physical cable and connecting it back again, the CLI connection restores and it's possible to send commands again (until the next unintended suspension).
In addidtion, I've noticed that the problem worsens when the code size is larger, regardless of which code is added (such as system logic that has nothing to do with the CLI communication). The code size is pretty close to the limits of both flash and RAM (around 97% usage).
I was also wondering about the USB interrupt priority - how do I make sure it is set to the highest?
I would truely appreciate your help!
Thanks,
Dekel