Post Go back to editing

No function for writing values to destination address using SPI

Category: Software
Product Number: ADF5904
Software Version: cross core 2.12.1

Hi Team,

I'm trying the configure ADF5902 4channel receiver chip using DSP702 blackfin processor where my SPI lines are externally connected to ADF5902 chip in which I tried to configure with initialization sequency which is mentioned in datasheet but I'm unable to see any function in which I can set the value and address in which configures the receiver, as per I have seen only devce_id and if their values have been sent to function there is no way to send data and destination address in direct memory write using SPI lines, is there any project based on direct memory write using SPI lines. if so can you please share it would be helpful. or we have use DMA lib for setting the values to chip if so can you send a reference.



Regards,
ES

  • Hi ES, 

    The 5 LSB bit of the register value set the register address. Datasheet mentions about them as control bits. Each register has different control bits value. You need to change these control bit values according to register value / address you would like to write. 

    An example for R0, R1, R2 and R4:

    Thanks,

    Emrecan

  • Hi Emrecan,

    I understand what you're mentioning but If I write code in bare-metal direct register address matrix that would be fine with your solution, but if I want to go with functions provided by blackfin where for writing and reading they're using adi_submitBuffer as a it uses Ptransmit, Preceiver, TransmitBytes, ReceviverBytes, etc where if I try to initilize a register 

    uint8_t *writePointer = (uint8_t*)0x00
    uint8_t *readPointer = (uint8_t*)0x01

    and tried to read it by getBuffer and adi_submitBuffer function by initilizing transceiver
    Ptransmit = writePointer
    Preceiver = readPointer
    and TxBytes and RxBytes as 1 due to ID read for example I want to read the ID of ADC chip AD8285 using SPI lines with BF-702 functions.


    So, can you help me out on this, I know how to configure using control bits and other cfg of ADF5902 and 5904 so just send me a example link in which I can set 

    read_ID = 0x01

    and readback it's value in which like wise for other register too. to put it in simple I want to know How to get ADC by using SPI functions of blackfin and read ADC data from it.

    Regards,
    ES


  • Hi Emrecan,

    I have also attached the code what I'm trying to configure. please check and update in which I'm making it wrong to read the ID of the ADC chip AD8285.
    8686.spi_lib.zip

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.