2022-10-17 06:14 AM
2022-10-17 07:07 AM
Presuming that the power consumption and supply voltages are reasonable,a next test could be reading the WHO_AM_I register and later some RW registers for testing the interface.
hth
KnarfB
2022-10-17 08:57 AM
Thanks KnarfB,
Will try that out first.
2022-10-28 02:24 AM
Hey KnarfB,
Tried reading the WHO_AM_I register with address 0x0F, however 0x6B which is its fixed value is not returned. The Arduino code that I have written is:
#include <SPI.h>
const int slaveSelectPin = 10;
void setup() {
Serial.begin(115200);
// set the slaveSelectPin as an output:
pinMode (slaveSelectPin, OUTPUT);
// initialize SPI:
SPI.begin();
}
void loop() {
byte result;
// Begin a read or write cycle
digitalWrite(slaveSelectPin, LOW); //Enable the slave
// Send the command to read register 0
SPI.transfer(0x0F);
// Now read a byte from the chip. THE VALUE WE SEND MAKES NO DIFFERENCE WHEN READING.
// We just need to generate 8 clock pulses and sample the MISO line to get the data.
// Sending a byte will generate the clock pulses
//result = SPI.transfer(0x42);
// Register read operation complete
digitalWrite(slaveSelectPin, HIGH);
Serial.print("WHO_AM_I register contains 0x");
Serial.println(result,HEX);
delay(1000);
}
I also debugged using a logic analyzer, however the MISO line does returns 0XFF.
From these results, would it be advisable to conclude that there is an issue on the hardware front.
Thank you very much !!