Post Go back to editing

ADE9000 - Streaming Waveform Buffer in Fixed Rate Mode

Hi,

I am trying to stream back 1024 samples from the ade9000 using the continuous mode. I can read the resampled data just fine, and also the fixed data fine as long as it is in "Stop when Buffer is Full Mode". I am using a raspberry pi 4 connected via spi. When I stream back continuous samples the data appears disjoint. I have tried just using the burst read to read 1024 samples worth (all channels). this is the out put.

 

I have also tried  setting WFB_PG_IRQEN to 0x8000 in order to indicate that the page 15 has been filled. I then set the CS pin low and poll STATUS0 until bit 17 is set. I reset STATUS0 bit 17 then finish by putting CS High. I start a burst read of the buffer for all of its points. Then loop back to polling the STATUS0 and repeat until I have 4 buffers worth. I get similar looking data. I am not sure what I am doing wrong here but I know this is possible with the tabview code. Could anyone explain how this is meant to be done with sudo code?

Parents
  • I setup 


    ADE_SPI_WRITE(ADDR_WFB_PG_IRQEN,0x8080,0x2); //set irq for half full and full
    ADE_SPI_WRITE(ADDR_MASK0,0x20000,0x4); //enable wfb_pg_irq
    ADE_SPI_WRITE(ADDR_WFB_CFG,0x03F0,0x2); //set dready to 8khz after pf continuous fill fixed samples no neutral

    void IRQ0_irq(){

    ADE_SPI_WRITE(ADDR_STATUS0,ADE_SPI_READ(ADDR_STATUS0,0x04),0x4); // clr page irq in stats0

    //determine if 1st half or second half is to be read.

    // make sure you can get all data out before next IRQ 


    if (ADE_SPI_READ(ADDR_WFB_TRG_STAT,0x04) && 0xf000000 == 0x70000000)
    get_1st_half_buffer();  // 0x800 to 0xBFF


    if (ADE_SPI_READ(ADDR_WFB_TRG_STAT,0x04) && 0xf000000 == 0xf0000000){
    get_2nd_half_buffer(); //0xC00 to 0xFFF

    }

  • Hello mr. dave.smith

    would you please explain what causes the discontinuity in the waveform from the Fixed waveform configuration. I followed example 1 which Rev. 0 | Page 41 of 86
    Example 1: Fixed Data Rate Data, Seven Channel Samples but still I face the same issue. 

  • 1st you need to make sure you are reading the right buffer either the first half or last half.  You also need to read them fast enough to get all the data out before it gets over written.

    2nd  I think I recall that the spare locations do exist in memory but are skipped in the busts mode. the samples are streamed IA,VA,IB,VB,IC,VC,IN(if enabled) then IA,VA......

    try parsing your data based on this and see if it helps. 

    Dave

      

Reply
  • 1st you need to make sure you are reading the right buffer either the first half or last half.  You also need to read them fast enough to get all the data out before it gets over written.

    2nd  I think I recall that the spare locations do exist in memory but are skipped in the busts mode. the samples are streamed IA,VA,IB,VB,IC,VC,IN(if enabled) then IA,VA......

    try parsing your data based on this and see if it helps. 

    Dave

      

Children
  • Hi,

    in this day  I had the same problem and I try to solve with this setting:
    ADDR_WFB_PG_IRQEN,  0x00008888   // interrupt page 0, 4, 8, 12
    ADDR_MASK0,                   0x00020000
    ADDR_WFB_CFG,             0x000013F0

    I read 448 bytes each interrupt (7 measures * 64 points); the samples are consecutive from IA, VA, IB, VB, IC, VC, IN, IA, IB, etc (without empty space)

    After the interrupt the next 4 pages contain another 64 samples (second part of wave)

    In this way it seems that the waveform read is correct (without interruptions)

    Michelangelo