Post Go back to editing

ADAS1000SDZ Gang mode

Category: Software
Product Number: ADAS1000SDZ
Software Version: NA

Please Share the frame format(Like Table 22) when the ADAS1000SDZ board is used in the Gang mode, when the configuration is applied as per the example 6 of the datasheet Table 61.

i  am reading  84 bytes ( 12*4 = 48 for master and 9*4 =36 , 48+36=84), am i correct.

this is what i have received on SPI.

80 00 00 00 11 7A 5C B9 12 BB D9 9C 13 C0 A5 F8 14 67 21 73 15 64 A7 85
1A 00 00 00 1B 00 00 00 1C 00 00 00 1D 00 00 00 06 00 00 00 41 A7 16 65
B0 00 00 00 11 74 B3 E8 12 B0 08 6B 13 B9 F2 64 13 B9 F2 64 13 B9 F2 64
13 B9 F2 64 13 B9 F2 64 13 B9 F2 64

Also in my hardware i have inserted the link LK13 and LK14 but the LK12 is Open.

Parents
  • Hi,
    Example 6 will configure the master to send frame/packet of words consists of the header, five ECG words, pace, respiration magnitude, and lead-off, total of 9 32-bit data . While slave device will send frame/packet of words consist of the header, five ECG words, and lead-off which is 7 32-bit data.

    But looking at your SPI data, it looks like you were not able to write the configuration properly since the readback if following the default configuration. It will be easier to look at the data if you arrange it per 32bits. First byte will be the register address followed by 24 bits data. To understand this better, please refer at SERIAL INTERFACES section of the ADAS1000/ADAS1000-1/ADAS1000-2 (Rev. C) (analog.com)

    80 00 00 00 header
    11 7A 5C B9 ECG1
    12 BB D9 9C ECG2
    13 C0 A5 F8 ECG3
    14 67 21 73 ECG4
    15 64 A7 85 ECG5
    1A 00 00 00 pace
    1B 00 00 00 respmag
    1C 00 00 00 respph
    1D 00 00 00 LOFF
    06 00 00 00 GPIO
    41 A7 16 65 CRC
    B0 00 00 00 ??
    11 74 B3 E8 ??
    12 B0 08 6B ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??

    -Mark

Reply
  • Hi,
    Example 6 will configure the master to send frame/packet of words consists of the header, five ECG words, pace, respiration magnitude, and lead-off, total of 9 32-bit data . While slave device will send frame/packet of words consist of the header, five ECG words, and lead-off which is 7 32-bit data.

    But looking at your SPI data, it looks like you were not able to write the configuration properly since the readback if following the default configuration. It will be easier to look at the data if you arrange it per 32bits. First byte will be the register address followed by 24 bits data. To understand this better, please refer at SERIAL INTERFACES section of the ADAS1000/ADAS1000-1/ADAS1000-2 (Rev. C) (analog.com)

    80 00 00 00 header
    11 7A 5C B9 ECG1
    12 BB D9 9C ECG2
    13 C0 A5 F8 ECG3
    14 67 21 73 ECG4
    15 64 A7 85 ECG5
    1A 00 00 00 pace
    1B 00 00 00 respmag
    1C 00 00 00 respph
    1D 00 00 00 LOFF
    06 00 00 00 GPIO
    41 A7 16 65 CRC
    B0 00 00 00 ??
    11 74 B3 E8 ??
    12 B0 08 6B ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??

    -Mark

Children
  • Hello Mark, 

    I was also in impression of same that the configurations are not getting applied correctly, But I have verified it by reading back the value of registers, the values are correctly displayed.

    i am assuming that the after the CRC i will get the data of slave. is it so?

    few more details i would like to add to make it more clear.

    i am using stm32f401 at 64 Mhz, and the SPI clock is 8Mb/s.

    i am using single SPI and separate CS.

    For this i have inserted LK13 and LK14.

    LK12 is open as i have separate CS.

    Here is the code 

    while(1)

    {
    RESET_CS_1;
    RESET_CS_2;

    while(Read_DRDY == 1);

    SET_CS_1;

    aTxBuffer[0]=ADAS1000_FRMCTL + 0x80;
    aTxBuffer[1]=0x07;
    aTxBuffer[2]=0xF6;
    aTxBuffer[3]=0x10;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    aTxBuffer[0]=0x80 + ADAS1000_CMREFCTL;
    aTxBuffer[1]=0x00;
    aTxBuffer[2]=0x00;
    aTxBuffer[3]=0x04;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    aTxBuffer[0]=0x80 + ADAS1000_ECGCTL;
    aTxBuffer[1]=0xf8;
    aTxBuffer[2]=0x00;
    aTxBuffer[3]=0xDE;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    aTxBuffer[0]=ADAS1000_FRMCTL + 0x80;
    aTxBuffer[1]=0x07;
    aTxBuffer[2]=0xF6;
    aTxBuffer[3]=0x10;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    SET_CS_2;

    Data_Cnt++;

    RESET_CS_1;

    while(Read_DRDY == 1);

    aTxBuffer[0]=0x80 + ADAS1000_CMREFCTL;

    aTxBuffer[1]=0xE0;
    aTxBuffer[2]=0x00;
    aTxBuffer[3]=0x0B;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    aTxBuffer[0]=ADAS1000_FRMCTL + 0x80;
    aTxBuffer[1]=0x07;
    aTxBuffer[2]=0x96;
    aTxBuffer[3]=0x00;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    aTxBuffer[0]=0x80 + ADAS1000_ECGCTL;
    aTxBuffer[1]=0xf8;
    aTxBuffer[2]=0x04;
    aTxBuffer[3]=0xBE;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    aTxBuffer[0]=ADAS1000_FRMCTL + 0x80;
    aTxBuffer[1]=0x07;
    aTxBuffer[2]=0x80;
    aTxBuffer[3]=0x0c;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    aTxBuffer[0]=ADAS1000_FRAMES;
    aTxBuffer[1]=0x00;
    aTxBuffer[2]=0x00;
    aTxBuffer[3]=0x00;
    HAL_SPI_Transmit(&hspi1,aTxBuffer,4,50);

    while(Read_DRDY == 1);

    HAL_SPI_Receive(&hspi1,aRxBuffer,84,200);

    HAL_UART_Transmit(&huart1, aRxBuffer, 84, 0xffff);

    }

  • Hello Mark,

    B0 00 00 00 ??
    11 74 B3 E8 ??
    12 B0 08 6B ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??
    13 B9 F2 64 ??

    Is it not the data of slave device ? 

    i am assuming that in gang mode, master device will only provide the data of slave device so i am reding 84 bytes from master itself.

    out of 84 bytes 48 bytes will be of master and remaining 36 bytes of slave.

    Please correct me if i am wrong.

  • Hello Mark,

    The issue is resolved now and device is sending all the ECG data.

    Thanks & Regards,

    Utsav Suha