@OP
1. Let us try to read the default content of CFG_AUD Register, which is 0001011010001100b (0x168C, P100-101 of data sheets). This is to ensure that the SPI-Host (the Arduino) is communicating well with the slave device (the GS2972). The CFG-AUD Register is located at address 0x0400 (400h).
2. The slave device has a pin named JTAG/HOST which must be pulled down to LOW to enable the GSPI Interface. I have no idea if you are using a breakout board or the bare chip. I also don't have access to the device; however, I am making an experimental set up for you based on my readings of the data sheets/application notes and my experience with SPI Protocol.
3. Codes (untested): Connect DPin-10 of UNO with JTAG/HOST Pin of GS2972 device
#include<SPI.h> //contains meanings of symbolic names of SS (SS/), MOSI, MISO, SCK etc.
void setup()
{
Serial.begin(9600); ////enable Serial Monitor
SPI.begin(); ////DPin-10, 11, 12, 13 are SS (Output), MOSI (OUTPUT), MISO (Input), SCK (Output
SPI.setClockDivider(SPI_CLOCK_DIV16); //speed: 16MHz/16 --> 1 = MBits/sec
digitalWrite(SS, LOW); //GS2972 is selected
}
void loop()
{
uint16_t y = SPI.transfer16(0x8400); //(0x1400); ////configure CFG_AUD Register for read mode; no auto inc.
delayMicroseconds(30); //transmission delay ~= 30 us (1 usx16 = 16 is theoretical)
uint16_t z = SPI.transfer16(0xFFFF); //create 16 SCK pulses to bring out 16-bit data from CFG_AUD Reg.
delayMicroseconds(30);
for (int i = 15; i >= 0; i--)
{
bool n = bitRead(z, i); //read bit-15, 14, ..., 0
Serial.print(n, BIN); //Serial Monitor must show: 0001011010001100 (check data sheets)
}
Serial.println();
delay(2000); //read CFG_AUD at every 2-sec interval and show its content on Serial Monitor
}
4. Upload the sketch of Step-3.
5. Press RESET Key of UNO.
6. Bring in Serial Monitor at Bd= 9600.
7. Check that Serial Monitor shows: 0001011010001100 at 2-sec interval.
8. If sketch of Step-3 does not work, try the following sketch:
#include<SPI.h> ////contains meanings of symbolic names of SS (SS/), MOSI, MISO, SCK etc.
void setup()
{
Serial.begin(9600); ////enable Serial Monitor
SPI.begin(); ////DPin-10, 11, 12, 13 are SS (Output), MOSI (Output), MISO (Input), SCK (Output)
SPI.setClockDivider(SPI_CLOCK_DIV16); //speed: 16MHz/16 --> 1 = MBits/sec
digitalWrite(SS, LOW); //GS2972 is selected
}
void loop()
{
byte m = SPI.transfer(0x84);//configure CFG_AUD Register for read mode; no auto inc.
delayMicroseconds(15); //transmission delay ~= 15 us (1 usx8 = 8 is theoretical)
m = SPI.transfer(0x00);
delayMicroseconds(15); //transmission delay
//-------------------------------------------------------------------------------------
byte x = SPI.transfer(0xFF); //create 8 SCK pulses to bring out b15-b8 data bits from CFG_AUD Reg.
delayMicroseconds(15); //transmission delay
byte y = SPI.transfer(0xFF); //create 8 SCK pulses to bring out b7-b0 data bits from CFG_AUD Reg.
delayMicroseconds(15);
//---------------------
uint16_t z = x << 8 | y;
for (int i = 15; i >= 0; i--)
{
bool n = bitRead(z, i); //read bit-15m 14, ..., 0
Serial.print(n, BIN); //Serial Monitor must show: 0001011010001100 (check data sheets)
}
Serial.println();
delay(2000); //read CFG_AUD at every 2-sec interval and show its content on Serial Monitor
}