2015-10-06 02:59 PM
Guys,
I want to send a command and then retrieve the output on MOSI line ... Is the right way doing it ?int resultvalue = 0;
uint8_t data7[2] = { VS_READ_COMMAND, addressbyte };
HAL_SPI_Transmit(&hspi1,data7,2,1000);
then :
uint8_t data8[1] = {0x00}; <=== is it declared properly ?
resultvalue = HAL_SPI_Receive(&hspi1,data8,1,1000);
resultvalue <<= 8;
resultvalue += HAL_SPI_Receive(&hspi1,data8,1,1000);
return resultvalue;
Thanks a lot
2015-10-28 05:13 AM
I calculate :
34832
(decimal) = 0x8810(hex)...
So it's doing the job correctly ( SPI bus ) ....
Why isn't working yet ??
2015-11-27 08:13 PM
Does SPI speed matter ?