Member Since: March 14, 2011
Country: United States
I had a problem using this device in SPI mode. TL;DR: it works in SPI MODE 0 (ZERO), not in mode 3 as the datasheet states.
That was a major waste of time and in the end I noticed that this issue was known by SparkFun, since I found the following comment in the arduino library code: (note: I am not using an arduino)
void SFE_MMC5983MA_IO::initSPISettings() { // CPOL = 1, CPHA = 1 : SPI Mode 3 according to datasheet // In practice SPI_MODE0 is what worked. _mmcSpiSettings = SPISettings(2000000, MSBFIRST, SPI_MODE0); }
So, how about stating this in bold capital letters in the announcement and documentation of this board? I understand that this is a MEMSIC problem, but your customers do not expect such a thing and this hits SparkFun because ultimately the board will not work if you try to write code for it from the datasheet.
Also, for completeness for anyone reaching here, it is not necessary to cut the tracks for SPI and I2C for the device to work in SPI mode, but that is certainly a better choice than having those resistors in SPI mode.
Regards, Marcelo.
The link to the datasheet in the documents section is pointing to something else.
The current url is <https>://cdn.shopify.com/s/files/1/0174/1800/files/Sensirion_Gas_Sensors_SGP30_Datasheet_EN-1148053.pdf?26051
If you remove the interrogation mark and the digits that follow, you are directed to the right place. The correct link is the following:
https://cdn.shopify.com/s/files/1/0174/1800/files/Sensirion_Gas_Sensors_SGP30_Datasheet_EN-1148053.pdf
Best regards.
Seems like the dimensional drawing document lacks the head size (1.3 mm). Should be fixed for completeness.