Jump to content


  • Content count

  • Joined

  • Last visited

  1. How to send 1MSPS 12bit ADC samples via USB FS

    @Lyon: Could you let me know how this can be done ? If we do 100 samples then when we try to reconstruct the signal, it will be very bad - right ? Or do you mean that at out of 1MSPS take only 100 samples and send it to PC ? But this method will definitly have some data lost. Am I correct ?
  2. I want to implement a USB oscilloscope using my TIVA launchpad http://www.ti.com/tool/ek-tm4c123gxl It has a 12bit ADC with sampling rate of 1million samples per second(MSPS). It also has a full speed (FS) USB. If I set my sampling rate of ADC to 1MSPS with 12bit resolution, one second will have 1MSPS * 12 bits = 12 million bits (12 mega bits) But USB full speed only has a transfer rate of 12Mbps(12 mega bits per second). So transferring these ADC samples via USB is not possible. My questions 1) Other than using high speed (HS) USB, is there a way send these ADC samples? (i.e are there any compression techniques or any other methods to send data via USB ?) 2) Is my above calculation wrong ?
  3. I am writing a simple task scheduler for my MSP430F5529 USB launchpad. I need to update stack pointer(SP), then enable interrupts and then update program counter (PC). But I am getting an error with my inline asmebly code. void start_scheduler(void) { asm volatile("mov.w task1stack, SP \n" "EINT \n" "mov.w func1, PC \n" ); } - task1stack is the stack area for the task execution. It is an array. - func1 is a function - instead of uppercase for 'SP' and 'PC', I tried lowercase also. But the error was present. But with the above code, compiler is showing the below error kernel.c:(.text+0x8e): undefined reference to `SP' kernel.c:(.text+0x96): undefined reference to `PC' Questions: 1. How to update SP and PC ? 2. Can "mov.w task1stack, SP \n" copy array address to SP ? Is my syntax correct ? 3. Can "mov.w func1, PC \n" copy the func1 address to PC? Is my syntax correct ?
  4. While I was reading through the MSP430's User's guide, I came to know that its stack pointer is alligned to even address. (Read Pg.189 of http://www.ti.com/lit/ug/slau208m/slau208m.pdf) Question 1: Why is it so ? Why is the stack pointer alligned to even address? Using msp430-gcc, I wrote a C program which contained a global 'char'(8 bits) array and which will print on UART the address location of each array element. What I found was that each array element was at '+1' from the previous address i.e Address of a[0] is 2400 Address of a[1] is 2401 Address of a[2] is 2402 Address of a[3] is 2403 Question 2: Here I can see that all array element's are not alligned to even address i.e a[1], a[3] are at odd address. Arrays are stored in RAM and are accessed via stack pointer. How did the stack pointer store an odd address ? As per my understanding, each address location in RAM can store 16bits of data(since MSP430) irrespective of even or odd address location. If I write the same above program with 'int'(16 bits) instead of 'char'(8 bits), then I get the array address '+2' i.e Address of a[0] is 3400 Address of a[1] is 3402 Address of a[2] is 3404 Address of a[3] is 3406 Question 3: But my above experimentes showed that each address can store only 8 bits instead of 16. Why ?
  5. Hi, I am planning to build a logic analyser using my Tiva-C launchpad. I have seen a logic analyser using the SUMP protocol but it uses the USB CDC (serail port) to transfer data. http://www.fischl.de...aris_launchpad/ I need a better sampling rate for my GPIO. My plan is to copy the contents of GPIO data register using DMA into the USB FIFO. Then use some custome device driver in USB to transfer data to PC instead of using USB CDC class drivers.There is a similar example for STM32(but for a different application) http://www.st.com/st.../CD00256689.pdf How to find out the sampling rate for a GPIO ? If I use DMA to copy the data from GPIO, will the performance(i.e sampling rate) of the logic analyser increase ? Could anyone let me know how fast DMA can copy data from GPIO and write to USB FIFO ? How fast can USB CDC then transfer data to the PC ? Do I have to implement USB "BULK" mode(or some custom driver) to transfer data? I found that Saleae logic analyser uses this same concept(copy data from GPIO directly to USB) http://www.saleae.com/logic There is a open source driver for this device to understand the implementation http://sigrok.org/wiki/Fx2lafw Is it worth to design a logic analyser using GPIO <-> DMA <-> USB concept if there wont be much improvement in the performance since there already exist one based on the SUMP protocol(the first link that I have shared). Thanks!
  6. Hello All, Currently I am learning about USB protocol. I need to implement some real examples on my STM32F4Discovery board. The only example I can find is the virtual serial port using USB. I want to understand how to use the control, interrupt, bulk and isochronous data transfer types. But I can't find implementation examples for this. Could anyone of you point me some links to some USB implemantations ? I also need to know the host side implementations on libusb. If any code for that also would be a great help. The example which I am searching for is an USB to ADC interface which can transfer ADC samples at very fast rate to computer so that I can get a good quality signal view. Thanks, Jayfree