Changes between Version 29 and Version 30 of HardwareUsersGuides/RadioBoard_v1.4/RadioController


Ignore:
Timestamp:
Mar 20, 2007, 3:15:38 PM (17 years ago)
Author:
sgupta
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HardwareUsersGuides/RadioBoard_v1.4/RadioController

    v29 v30  
    4949 {{{radios}}}: This refers to the Radio boards that are to be affected by the function call. Each radio board can be selected by {{{RADIO1_ADDR}}} for the board in slot 1, {{{RADIO2_ADDR}}} for slot 2, etc. To call the function on multiple boards at the same time, OR (|) the values with each other. For example, {{{RADIO1_ADDR|RADIO3_ADDR}}} would affect both the radios in slot 1 and 3.
    5050
    51 The following two inputs are common to all functions in the library
     51=== Initialization ===
    5252
    53  1. {{{baseaddr}}}: This is the base address of the radio controller peripheral. The base address information of all the peripherals is located in the {{{xparameters.h}}} file. This file appears only after the hardware has been generated the first time. To access the file open the Software Application Project and expand the {{{Processor: ppc405_0}}} list. Be sure to include this file at the top of your C program as well by using the following line:
     53Initialization of the Radio boards requires one function call at the beginning of time. {{{WarpRadio_v1_Reset(...)}}}, located in {{{radio_controller_basic.h}}}, must be called at the beginning of your {{{main()}}} function so that the radio and DAC can be reset into their default states. The input argument to the the Reset function is the base address of the radio controller peripheral core. The base address information of all the peripherals is located in the {{{xparameters.h}}} file. This file appears only after the hardware has been generated the first time. To access the file open the Software Application Project and expand the {{{Processor: ppc405_0}}} list. Be sure to include this file at the top of your C program as well by using the following line:
    5454{{{
    5555 #include "xparameters.h"
    5656}}}
    57     If the project has been created with the Base System Builder, generally the base address of the radio controller is XPAR_RADIO_CONTROLLER_0_BASEADDR. Be sure to check this to be certain.
     57If the project has been created with the Base System Builder, generally the base address of the radio controller is XPAR_RADIO_CONTROLLER_0_BASEADDR. Be sure to check this to be certain. None of the other function calls require the base address as the drivers will remember it from the Reset function so make sure that before any other {{{WarpRadio_v1_}}} functions are used, {{{WarpRadio_v1_Reset(...)}}} has been called.
    5858
    59 
    60 === Initialization ===
    61 
    62 The core uses just one Serial Peripheral Interface (SPI) to control both the Maxim Radio as well DAC. Hence certain changes need to be made to the SPI core before addressing one or the other. Before calling any {{{WarpRadio_}}} functions be sure to call {{{WarpRadio_InitializeSPI}}}. This must be done before any call to the radios after just calling a function on the DACs. Similarly {{{WarpDac_InitializeSPI}}} must be called before accessing any of its functions.
    63 
    64 A good rule of thumb for intialization at the start of time is to execute the following statements in order:
     59An example of this would be:
    6560{{{
    66  WarpDac_InitializeSPI(...)
    67  WarpDac_Reset(...)
    68  WarpDac_InitializeDAC(...)
    69  <any other WarpDac_ functions>
    70 
    71  WarpRadio_InitializeSPI(...)
    72  WarpRadio_Reset(...)
    73  WarpRadio_InitializeRadio(...)
    74  <any other WarpRadio_ functions>
     61 #include "xparameters.h"
     62 #include "radio_controller_basic.h"
     63 .
     64 .
     65 .
     66 int main() {
     67    xil_printf("---Entering Main---\r\n");
     68    WarpRadio_v1_Reset((unsigned int*)XPAR_RADIO_CONTROLLER_0_BASEADDR);
     69    .
     70    .
     71    .
     72 }
    7573}}}
    76 Just to reiterate, notice how the InitializeSPI functions of both the radio and DAC are called before a function call of that type.
    7774
    7875=== Basic Usage of Radio Functions ===