Hello!
First, I know that MMB0 platform is not supposed for being used with custom firmware, but this is exactly I am doing now. My goal is to evaluate the performance of digital feedback loop (and some other things) which include ADS1282/ADS131E08 converters, DSP with some signal processing and DAC/PWM output. Since MMB0 platform seems to suite perfectly for this purpose I decided to create the custom firmware and client program.
As a base I took the source codes for ADS1271EVM board and LabView client program, that are included in a software package and are free to download from TI website. Then, roughly speaking, I replaced almost everything with my own code except the part that corresponds to communication via USB and MMB0 board configuration functions.
This USB communication "subsystem" works perfectly, including firmware download procedure, control commands and bulk data transfer.
Except one thing.
At random time, when the data transfer is active, the device suddenly receives bus suspend event from host, and that's it! No activity on the bus, no bus resume events, just silence. The only way to restore the communication is to reconnect device, either by physically unplug and plug the USB cable or by device reset.
I added some logging in USB ISR function to see what happens before bus suspends - nothing special. Just normal DMA events, no control/setup commands are received before. However there is a time interval between the last DMA event and bus suspend event of about several milliseconds - maybe host decides to suspend the bus because no activity happens there. This is unlikely, but maybe for some reason the device is blocked for a long time with other interrupt. But why then host doesn't resume after a while? And why this is not happening at idle time? There are several bus suspend events occurs during the enumeration procedure, but they are always followed by corresponding resume events.
The other observations are:
- The issue occurs respectively rarely. It can happen after several hours of normal data transmission. But the moment of time seems to be quite random.
- The frequency of the bug seems to be dependent of data flow speed. The more bitrate - the more often it happens.
- Bad usb cable is not a point. I tried several cables, no changes.
- I also tested three different MMB0 boards - both behave the same way.
- Different PCs - seems that on some PCs issue happens more frequently. Dependence on host controller? By the way, all PCs I've tried were with Windows 7.
I made no changes in porus USB stack source code except I replaced MEM_alloc() function in usbhw_activate_ep() with function that returns statically initialized memory address. I made this because I don't want to use dynamic memory allocations in my code and this particular function is used only once (during usb enumeration) and allocates only 4 bytes.
I am using CCS5 and DSB/BIOS 5.42.1.09. I did not migrate from the old CCS3 project. Just created the new project and moved necessary source files. The old LabView project runs on LabView 2014 with almost no changes.
Since MMB0 driver included in ADS1271EVM package supports only XP, I took the new MMBO driver from latest ADCPro package.
So, do you have any consideration why this can happen?