Xilinx ISE Board, trying to make two clocks (ZYBO FPGA) - clock

In the reference manual for the ZYBO board that I am using, it informs me that I have up to four clocks I can use. However, when I look through the UCF file, I can only find one of them.
Considering that the ISE tools might know where it is, I used the Timing Analyzer to try to get the system to generate a pin LOC that I could use, this was a fialure though.
Then I had the idea to use the PlanAhead tools to try and see if the tools would again generate a UCF file with the needed clock pin locations. Again this failed.
Have I misunderstood the manual? Is there only one clock pin available to me?
Here is the excerpt in question (12 Clock Sources):
The ZYBO provides
a 50 MHz clock to the Zynq PS_CLK input, which is used to generate the
clocks for each of the PS subsystems. The 50 MHz input allows the
processor to operate at a maximum frequency of 650 MHz and the DDR3
memory controller to operate at a maximum of 525 MHz (1050 Mbps). The
ZYBO Base System Design configures the PS to work properly with this
input clock, and should be used as a reference when creating custom
designs.
The PS has a dedicated PLL capable of generating up to four reference
clocks, each with settable frequencies, that can be used to clock
custom logic implemented in the PL. Additionally, The ZYBO provides an
external 125 MHz reference clock directly to pin L16 of the PL. The
external reference clock allows the PL to be used completely in
dependently of the PS, which can be useful for simple applications
that do not require the processor.
The PL of the Zynq-Z7010 also includes two MMCM’s and two PLL’s that
can be used to generate clocks with precise frequencies and phase
relationships. Any of the four PS reference clocks or the 125 MHz
external reference clock can be used as an input to the MMCMs and
PLLs. For a full description of the capabilities of the Zynq PL
clocking resources, refer to the “7 Series FPGAs Clocking Resources
User Guide” available from Xilinx.
Figure 13 outlines the clocking scheme used on the ZYBO. Note that the reference clock output from the Ethernet
PHY is used as the 125 MHz reference clock to the PL, in order to cut the cost of including a dedicated oscillator for
this purpose. Keep in mind that CLK125 will be disabled when the Ethernet PHY (IC1) is held in hardware reset by
driving the PHYRSTB signal low.

Regarding your descrption:
There is one external reference clock (125 MHz) and 4 internal reference clocks from the ARM part. These 4 clocks are not accessable as a real pin but via the ARM-FPGA bridge. If I'm right this component in called PS7.
Additional resources;
- UG585 - Zynq-7000 - Technical Reference Manual chap. 25.7 PL Clocks -> schematic for PL clocks
Additionally, you can use the clock modifing blocks (MMCM or PLL) to derive new clocks from these 5 'inputs'.

Related

what is the best way to design a shift register with stm32

I am using a STM32F031K6, clocked at 40MHz, and I want to design a program which acts as a looping shift register - an external trigger is used to clock it, the values in the shift register left shift every time a rising/falling edge is received. the output is one pin either high or low.
I need to make the time between the clocking edge and the output less than 0.5uS, or failing that as quick as possible. The values of the shift register can be changed and the length can also be changed, but for now I'm just starting with a byte like 11000010 .
I initially thought to implement this with an external interrupt but it was suggested there may be a better way to implement it
any help much appreciated
You might use the SPI peripheral of the STM32F0 for your task. When configured in slave mode, each time an external clock edge is detected on the SCK signal, the MISO will be set to the next bit of a value loaded into an internal shift register via the SPI data register.
Check out the chapter on the Serial peripheral interface (SPI) in STM32F0 reference manual.
Especially have a look at the sections addressing the following keywords:
General description: SPI block diagram
Slave Mode (Master selection: Slave configuration)
Simplex communication: Transmit-only mode (RXONLY=0)
Slave select (NSS) pin management: Software NSS management (SSM = 1)
Data frame format (data size can be set from 4-bit up to 16-bit length)
Configuration of SPI
The SPI unit is highly configurable, e.g. regarding the polarity of clock signal. Since it is an independent hardware unit, it should be able to handle your 0.5us reaction time requirement. The MCU firmware needs to set up the SPI unit and then provide new data to the SPI unit, each time the Tx buffer empty flag (TXE) is set. This can also be done by interrupt (TXEIE) or even using a DMA channel (TXDMAEN) with a circular buffer. In the latter case the "shift register functionality" runs completely independent of the MCU core (after setup).

SWD programming adapter

Are ARM-JTAG-20-10 and J-LINK 9-PIN CORTEX-M ADAPTER pin compatible? Why such a big price difference?
Apart from the price levels and policies of two different manufacturers ("Why is a fiat cheaper than a porsche if both allow you to cruise at the same max speed of your home country?"), the quality of the electronic hardware may differ notably, which can impact the maximum baudrate you can run with a given target PCB.
Furthermore, some JTAG pinout adapters include additional features like galvanic isolation (I haven't checked whether this applies to the Segger piece you mention.).

GNU Radio and labview

I am using a set of 4 N210 devices with SBX daughter boards where I need to perform a beamforming application. As I understood, the mentioned resync feature in the fractional PLL used is accessed through the UHD driver
Do Gnuradio or Labview support "resync feature"?
Both use UHD, and both have access to the functionality necessary to synchronize the LO frontends in all four SBXes:
First, you will need to sync the N210's reference clocks – for that, you will need an external clock divider (e.g. an Octoclock) or GPSDOs.
Then, you set a common device time relative to a common PPS signal. That can also come from four GPSDOs, or be sourced from a single device and split with a clock divider (Octoclock etc)
Then, you can use timed commands to tune the frontends of the SBXes at exactly the same time, leading to a constant relative phase
For more information, the UHD manual's page on LO synchronization will be of help!
Notice that you should use a recent version of UHD, i.e. keep your software as fresh as possible.

Crystal core MPU Clock rate differences

I have a embedded system which on boot up shows as below:
Clocking rate (Crystal/Core/MPU): 12.0/400/1000 MHz
Can anybody explain me on differences between these three clock rate.
Processor is ARMv7, OMAP3xxx
As Clement mentioned, the 12.0 is the frequency in MHz of the external oscillator. Core and MPU are the frequencies of the internal PLL's.
The MPU is the Microprocessor Unit Subsystem. This is the actual Cortex-A8 core as well as some closely related peripherals. So your MPU is running at 1000 MHz or 1GHz. This is similar to the CPU frequency in your computer.
In the AM335x, the Core PLL is responsible for the following subsystems: SGX, EMAC, L3S, L3F, L4F, L4_PER, L4_WKUP, PRUSS IEP, Debugss. The subsystems may differ slightly based on the particular chip you are working with. Yours is running at 400MHz. This can be thought of as similar to the Front Side Bus (FSB) frequency in your computer though the analogy isn't exact.
12 Mhz is the frequency of the crystal oscillator present on the board to give a time reference.
A TI OMAP contains 2 cores : an ARM and a DSP. The terminology used here is not clear but it may be the frequencies of these cores. Check you datasheet to be sure.

Why are GPIOs used?

I have been searching around [in vain] for some good links/sources to help understand GPIOs and why they are used in embedded systems. Can anyone please point me to some ?
In any useful system, the CPU has to have some way to interact with the outside world - be it lights or sounds presented to the user or electrical signals used to communicate with other parts of the system. A GPIO (general purpose input/output) pin lets you either get input for your program from outside the CPU or to provide output to the user.
Some uses for GPIOs as inputs:
detect button presses
receive interrupt requests from external devices
Some uses for GPIOs as outputs:
blink an LED
sound a buzzer
control power for external devices
A good case for a bidirectional GPIO or a set of GPIOs can be to "bit-bang" a protocol that your SoC doesn't provide natively. You could roll your own SPI or I2C interface, for example.
The reason you cannot find an answer is probably because if you know what an embedded system is and does, or indeed anything about digital electronic systems, then the answer is rather too obvious to write down! That is to say that if you get as far a s actually implementing a working embedded system, you should already know what they are.
GPIO pins are as a minimum, two state digital logic I/O. In most cases some or all of them may also be interrupt sources. These interrupts may have options for be rising, falling, dual edge, or level triggering.
On some targets GPIO pins may have configurable output circuitry to allow, for example, external pull-ups to be omitted, or to allow connection to devices that require open-collector outputs, and in some cases even to provide filtering of high frequency noise and glitches.
In most embedded systems, a processor will be ultimately responsible for sensing the state of various devices which translate external stimuli to digital-level logic voltages (e.g. when a button is pushed, a pin will go low; otherwise it will sit high), and controlling devices which translate logic-level voltages directly into action (e.g. when a pin is high, a light will go on; when low, it will go off). It used to be that processors did not have general-purpose I/O, but would instead have to use a shared bus communicate with devices that could process I/O requests and set or report the state of the external circuits. Although this approach was not entirely without advantages (one processor could monitor or control thousands of circuits on a shared bus) it was inconvenient in many real-world applications.
While it is possible for a processor to control any number of inputs and outputs using a four-wire SPI bus or even a two-wire I2C bus, in many cases the number of signals a processor will need to monitor or control is sufficiently small that it's easier to simply include the circuitry to monitor or control some signals directly on the chip itself. Although dedicated interfacing hardware will frequently have output-only or input-only pins (the person choosing the hardware interface chips will know how many signals need to be monitored, and how many need to be controlled), a particular family of processor may be used in some applications that require e.g. 4 inputs and 28 outputs, and other applications that require 28 inputs and 4 outputs. Instead of requiring that different parts be used in applications with different balances between inputs and outputs, it's simpler to just have one part with inputs that can be configured as inputs or outputs, as needed.
I think you have it backwards. GPIO is the default in electronics. It's a pin, a signal, that can be programmed. Everything is made up of these. For a processor, dedicated peripherals are a special case, they're extras for when you know you want a more limited function.
From a chip manufacturers perspective, you often don't know exactly what the user needs so you can't make the exact peripherals on your chip. You make generic ones instead. Many applications are so rare that there's no market for a specific chip. Only thing you can do is use GPIO or make specific hardware yourself. Also, all (unused or potentially unused) pins are worth turning into GPIO because that makes the part even more generic and reusable. Generic and reusable is very nearly the whole point of programmable chips, otherwise you would just make ASICs.
Some particularly suitable applications:
Reset parts (chips) in a system
Interface to switches, keypads, lights (all they have is one pin/signal!)
Controlling loads with relays or semicondctor switches (on-off)
Solenoid, motor, heater, valve...
Get interrupts from single signals
Thermostats, limit switches, level detectors, alarm devices...
BTW, the Parallax Propeller has practically nothing but GPIO pins. Peripherals are made in software. It works very well for many uses.