Hi to everyone.
I have this semester project where we have to design a box which can be set from matlab and it has to process a generated signal (generated in the micro controller) and we have to see these measurements in Matlab (real time, like data acquisition) for both signals (generated input and obtained output).
I have this block diagram:
I want to use a MSP430F5529 microcontroller (this uC already has USB controller inside it) and I have some questions:
1) MSP430 USB does not support Isochronous transfer type, so I though it would be possible to use bulk transfer types to transmit this kind of information. The input signal generated on the MSP430 is a 16bit signal which is sent to the DAC by I2C, SPI interface or similar. Then the converted signal (analog) is filtered by the plant which poles and zeros are set by K (root locus) prior to the generation of the input signal. The output is feed to an ADC which converts back the signal to the digital domain and this result we have to send it continuously to the host (PC - Matlab) through USB. Each sample has 16 bits => 2Bytes, USP 2.0 full speed supports speeds up to 1.5MBytes per second, even though the real bandwidth is below this value, I have enough bandwidth budget to build this application (I guess). My question is:
1a) Bulks transfer types are suitable for this kind of application? I thought that a good idea would be to define a basic packet or frame (information and size) and send it over USB to the host every "T" seconds.
1b) in order to do so, Is it mandatory to create buffers on the MSP which holds the information until it is sent over the USB port? Which kind of constraints do I have to take care about? I mean, obviously there is a flow of information (rate) in and out the buffer, and I would like to know which parameter or values can help me to solve this.
2) So far, I tried TI USB examples from the USB dev pack but I'm not sure if I am allowed to use the USB descriptor tool, that is why I want to write a simple but functional usb code (from scratch) in order to get this thing done. I have read some documentation like: