Hello,
I have question about the sample code for the boostxl-afe031. Currently, i'm trying to understand this code to create mine for my application. The problem is that i have found some incoherent things on the sample code and the data sheet.
First about the SPI communication, in the datasheet we have two mode for our SPI communication (0,0) or (1,1) and normally it correspond to the clock polarity and the clock phase. I don't see any hard pin or register to set one of this two mode. But in the sample code, we have the clock polarity at 1 and the clock phase at 0 so it doesn't match with the datasheet.
Secondly, it's about a function called HAL_spi_writeGain, which correspond to the function used to write the gain on the AFE031. Normally the data should be like this :
R/W bit - 7-bit Register - 8-bit Data
But in this function (HAL_spi_writeGain) we write in reverse whereas we have macro definition in the hal_afe031.h that work like it is written in the datasheet.
Also, can you explain me what does the " TEST " pin correspond ?
Regards,
Abed