Delay;
Configure the SPI interface of the microcontroller to SPI mode 1 (CPOL = 0, CPHA = 1);
If the CS pin is not tied low permanently, configure the microcontroller GPIO connected to CS as an output;
Configure the microcontroller GPIO connected to the DRDY pin as an interrupt input;
Set CS to the device low;
Delay;
Send the RESET command (06h) to make sure the device is properly reset after power-up;
Write the respective register configuration with the WREG command (43h, 08h, 04h, 10h, and 00h);
Delay;
As a sanity check, read back all configuration registers with the RREG command (23h);