I have a board that is using a F427ZIT and I want to read data from the MCP3204 chip (this is an ADC). This chip is using mode (1,1).
So, I configure my config this way :
Code: Select all
uint16_t CR1 = SPI_CR1_BR_2 | SPI_CR1_SSI | SPI_CR1_MSTR | SPI_CR1_SPE | SPI_CR1_CPOL | SPI_CR1_CPHA;
SPIConfig spi2_cfg =
{
NULL,
GPIOE, /* port of CS on Socket #2 */
GPIOE_CS2, /* pin of CS */
CR1,
0
};Unfortunately, here is what I get :
And here is what I should get (got this using NETMF) :
Is there something I am doing wrong ? With the SPI_CR1_CPOL bit set, the clock line should be high, to me. Here it is low.
If I try Mode (0,0) then I get values back but those are wrong.
Regards,
________
Christophe