Friday, March 28, 2014

A plea to the PSOC professionals!

Disclaimer: This is the first time I am putting embedded ICs on a board and programming them. I have some basic knowlege, but please be patient and benevolent with your replies. :) Thank you.  

Problem statement: 

I have peripheral analog ICs which have digital programmable registers who follow SPI/I2C protocols. Now the CYUSB3014 is connected to these peripherals through its GPIOs and not through the GPIF configurations. The connections are not made to the specified SPI/I2C pins in the datasheet of CYUSB3014, but just the GPIO basic configurations. My goal is to program the registers in those Analog IC peripherals to tune the ICs in some required configuration. 

Problem approach: 

1. I tried to figure out using Psoc Creator- but it doesnt have this IC. I downloaded the latest version of Creator in vain.
2. Dont the cypress guys have something as cool as GPIF 2 for the 32 GPIF pins fro the FX3, but to program all the GPIOs in the FX3 IC?
3. I guess if I have to use some of the jargons- its like I want to do a "slave Fifo" in psoc creator using FX3. possible? 

Help:
1. Can anyone help with any direction to start learning for this application.
2. I have seen the videos for Psoc Creator so I know what to do. But can you tell me if I can intergrate FX3 some how?
3. Its a very simple problem in analog tunability - can I have simple video tutorial on how to do this? Teach me- and Ill create one soon and post it here. :) 

Regards,
Akshay. 

NA: Reading the programmers manual...?

Question: 
What is the concept of thread in my scenario? How do I define them ?

Question:
 How do I define any GPIO in the required serial transfer protocol? How can I write my own protocol?

Question:
What are build registers in my transfer protocols? Do I need to touch them? 

Mr. Ties syncfifo.c file explained here... This forms the basic USB protocol.

http://www.cypress.com/index.cfm?docID=47451

Its chapter 8 in programmers manual. called application structure. 

Important C codes from Run's computer.

Here are the links to the important files:

1. RAM code: https://www.dropbox.com/s/p1d1j94q0rilknw/cyfxslfifosync.c
2. Mex callback files: https://www.dropbox.com/sh/k0r8cu1t883y5cf/mjH8o05mtf
3. Other files in Run's folder: https://www.dropbox.com/sh/m3sg3dc5qz9lbb6/4dXdW-mGYS

Wednesday, March 26, 2014

Understand the MEX- Matlab file.

Try USC students working on the USB3.0... maybe they know an easier way?

Hi, 

My name is Akshay Mahajan- and I am a Mixed signal/ RF circuit design masters student at USC. 
 
I found your contact over your research website, and was hoping you could help us with a problem in developing our embedded data acquisition system board. 

Problem: I have to interface a USB3.0 Cypress EZ FX3 IC to multiple analog ICs on the board. Being a circuit designer, its a little musty for me to get things going in programming of USB3.0, do you think you can provide any help in any of the following ways: 

1. can you send me a contact who can meet up and help. 
2. can you send me an example for SPI/I2C or  user defined peripheral interface?
3. Is there an easy way to do all this from a non-embedded expert so I can just have higher level commands that can program my usb3.0 chip? 
4. Do you know any research team which is working with USB 3.0 ? 

If you can help us in any way, we would be very great full. 

Hope you have a wonderful day.  

Happy Thinking,
Akshay. 

Extracting and reorganizing form Run's past research on verification done by Mr.Tie

Taking the codes from Run's laptop and setting up the files... (And you forgot your research book :/ ). 

Need more organized approach to the verification idea...

While driving back from the HSC campus and having a talk with Run, I could picture myself making a more reusable documentation and software for all the members in PHHs team to they call could make their own interfaces! You need to talk to more students eventually and collect their requirements.

But right now... "Baby Steps". :) 

Tasks: one week to program one IC! lets do this!

So Run has given me a week to work on the interface after which his board will be ready for testing :) Lets get to work. (Landry/cooking/financial management pending... ) 

Meeting with Mr.T (HSC Campus):: Tie Yi / tie811@gmail.com


The diagram is self explanatory... explains the conclusions from the meeting with Mr. Tie


PS: You need to check the paths for the Matlab and cypress imports in:
1. C/c++ general> include directories>
2. Linker> write>write dds> debug

COnvert blog to book! WOW!

Tuesday, March 25, 2014

The technical manual might be of some use...

You need to understand the overview of how the SPI and I2C are used in terms of the programming and the pin connections in the technical document! 

NA: Is the programming for I2c different?

hmm.. shouldnt be much of a difference... 

NA: what does the serial interface block do? why are the pins dedicated?

How can you program them? 

NA: What are P-ports on the FX3?

whats this? Are they different from what the GPIF II. ?? Hang on, whats happening? who is where?
If the serial ports are different - then are the pins connected to the correct serial interface pins?


NA: HANG ON! GPIF and Serial interface ports are different?

Looking at the block diagram on 3/39 pg of the CYUSB3014 datasheet-

GPIF II block is shown separate from the serial interfaces blocks! And somewhere else in the UG of the GPIF II designer I read about the reduction in number of pins based on the whether a SPI/I2C or other interfaces have been connected to the FX3.

Also, when I check the check box for SPI in the Designer Tool, there wasn't any evident change in the schematics on the screen. ... what could that mean? 

NA: How do you configure any unused pin to GPIO in GPFI?

UG (user guide) says:

You can configure any pins that are unused by the GPIF II block as GPIOs that are controlled by the firmware application.
how does one do this? 

NA: How does the EZ FX3 IC decide the clock frequen cy for SPI/I2c protocol- or do they have a fixed frequency of clock which is generated inside the FX3 IC?

Check Schematics Page: USB FX Core.

Pin numbers: GPIO53.

The user guide says:
3.1.2.4  Multiplexing of Address/Data
A GPIF II interface  gives  a maximum of 32 bidirectional data lines, which can be split into,  or time multiplexed with,
address lines. In the case of multiplexed operation, the address bus will have the same width as the data bus. 
Wonder if has any solution to my question.



NA: In GPIF: Why are the pins only from 16-29?

Run's schematics shows upto GPIO057...?? How do I configure those pins?? 

Run needs to send me his previous board schematics...

Remind him if he forgets. For now you can get the hang of how to use GPIF II. 

NA: AD9913: DDS IC, whats the serial protocol?

  1. This IC datasheet page 22/32 says that the serial interface for this chip is flexible and can be integrated with any of the standards. SDIO is one single line! But SPI has unidirectional lines provided for each of the master and slave combinations! What can I call such a format?
  2. How do you simulate a non periodic clock? By non periodic clock I mean, how do you pause the clock in between as shown on 22/32 and simulate the same on GPIF 2 interface? 

Reading the Quick Start guide?

Was a good quick overview of what I wanted. Seems that the coding for all this has be reduced to nothing! Very impressive interface. A must read before you dive into deeper waters. 

Idea: for matlab interface!

Why not make all your ICs a button, and make the schematics of DAQ using these buttons. Easy to choose what you want to edit. :) 

what is DMA?

Direct memory access (DMA) is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory independently of the central processing unit (CPU).
Without DMA, when the CPU is using programmed input/output, it is typically fully occupied for the entire duration of the read or write operation, and is thus unavailable to perform other work. With DMA, the CPU initiates the transfer, does other operations while the transfer is in progress, and receives an interrupt from the DMA controller when the operation is done. This feature is useful any time the CPU cannot keep up with the rate of data transfer, or where the CPU needs to perform useful work while waiting for a relatively slow I/O data transfer.

Getting hands on with the USB3.0 EZ FX3 firmware...


The main website can be found @ http://www.cypress.com/?id=3526&tabID=60939



Note: Step 3 takes a simple registration process and it does not come with the SDK. GPIF 2 designer is like the smartest thing done by Cypress as a great tool to reduce the effort in interfacing the EZFX3.

You can download it from :
Other References: 


Grazing through the data sheets...

Grazing through the datasheets (my first time looking at them from an application POV) gave me an overview of what the ICs could be doing in Run's design.

NOTE: To mark/highlight the datasheet, mark out only those things which answer "What can be done" and not "How it can be done"- cause the later always follows the former and is always almost never going to be memorized.

Getting an overview of all the chips except the ADCs (since I havent really been with an ADC before), I think I should be diving into programming one chip just to get the hang of the USB FX3 interface.

Run's old is available to work on. He has suggested to try and program the DDS using the USB3.0 because one can directly pick out the output of the DDS without connecting the input signal.

He says there might be some error in the amplitude of the DDS output, but the frequency should manifest the functionality of the firmware interface. 

Saturday, March 22, 2014

HRCircuits...?

prof.Hashemi - Run - circuits :) plus it adds the "RC" element to it. :p

My wall is painted in new colors!

Got up the circuit on my wall/ so I can mark out various connections and keep them in my head everyday :)


Thursday, March 20, 2014

First tutorial from Run!

Getting to know the architecture!

I have printed out all the required data sheets and I am onto reading whatever I can :)

I am expected to get the hang of his circuit in a couple of hours!! Okay, lets get to work. 

My first task!


My first task is something like this:

SDR Test Project Files
Inbox
x

Run Chen

Mar 18 (2 days ago)
to Akshay
Hi Akshay,
It was great to talk with you about my work and I am glad that you are interested in this project. The attached is the related material. Here are several things I suggest as a starting point.
1. Folder "TestSchematics" include the receiver RF board and DAQ board block diagram and the schematic for the DAQ board. Please understand how the whole receiver system works. Highlight all parts that need be programmed/controlled by the USB FX3 chip.
2. Print out the data sheet of all IC components (you can come to the lab and use our printers) and make a folder for it. Read the data sheet and get familiar with the functionality and performance. Highlight the digital programming part (waveform) of the IC components that need be programmed (e.g. AD8333, etc). You need this information for the programming.
          3. Learn and get familiar with the EZ-USB FX3 interface. More details are here:http://www.cypress.com/?              id=3526&tabID=60939
I suggest download and install all possible develop kits. Play with it. If you need the development kit let me know. Learn how to use C++ to realize the programming and compile to matlab files. If you have any question on this part, let me know what time is good for you next week. I can find someone to help in more details. 
The DAQ and RF boards are designs that have not been published yet, so please keep them confidential. Let me know if you have any question.
Thank you very much and have a wonderful holiday.
Best,
Run



This is the genesis...

This is where it begins... 

We are building a SDR Test USB 3.0 interface for Run Chen's Receiver.

I am super excited about this, esp. getting to work with PHH's Phd. Student and in his lab!

This is where it all started:

After completing the Analog Verification project for PHH's course (who's report is still pending), I receive
this email after from Run Chen:


Run Chen runchen@usc.edu

Mar 14 (6 days ago)
to akshay.mahajanHossein
Hi Akshay,
My name is Run Chen. I am a Phd student working with Prof. Hashemi and my research is the development of Software Defined Radio (SDR) for wireless communications.
We are going to measure our SDR systems soon and we are looking for someone who is interested to develop the software control part. The hardware (IC chip and PCB boards) is ready for measure. The project includes developing control codes for IC components and possibly a GUI which controls the entire SDR receiver. It might take one or two weeks. Some USB interface programming will be required.
Professor Hashemi recommends that you might be a good candidate. So please let me know if you are interested. Thanks.
Best,
========================
Run Chen
PhD Student
Department of Electrical Engineering - Electrophysics
University of Southern California
Powell Hall of Engineering 426
Los Angeles, CA 90089
Phone: 213-740-4422

Pretty cool huh. So I go and meet him on the next day of my Marvell interview and he shows me his work and tells me what I have to work on! Awesome!