2019-07-31 03:06 AM
hello everyone,
can someone help me please, I can't understand why I can't receive 7, it's weird...
I sent 7 , i want to receive 7, but I receive 255, 0, 15.. all the values except 7, that's really insane.
2019-07-31 03:24 AM
Hi.
What SPI pins connection?
Why you send aTx 3 times? Use variable for transmit result. Like this:
HAL_StatusTypeDef status = HAL_SPI_Transmit(&SpiHandle, aTx, 1, 1000);
if(status == HAL_OK) {
BSP_LED_On(LED4);
}
else if(status == HAL_TIMEOUT{
TimeoutErrorHandler();
}
2019-07-31 03:28 AM
#define SPIx_SCK_PIN GPIO_PIN_10
#define SPIx_SCK_GPIO_PORT GPIOB
#define SPIx_SCK_AF GPIO_AF5_SPI2
#define SPIx_MISO_PIN GPIO_PIN_14
#define SPIx_MISO_GPIO_PORT GPIOB
#define SPIx_MISO_AF GPIO_AF5_SPI2
#define SPIx_MOSI_PIN GPIO_PIN_15
#define SPIx_MOSI_GPIO_PORT GPIOB
#define SPIx_MOSI_AF GPIO_AF5_SPI2
SPI2 on the F411E-disco
2019-07-31 03:41 AM
Please describe your hardware configuration? You are looping back or you are sending/receiving with other devices?
2019-07-31 03:51 AM
@JChau i'm using 2 boards (F413H-disco(slave/ spi3) and F411E-disco(master/spi2))
I followed the configuration described on both datasheet but I receive 0 on the slave card, althought the master card send 7(on live expression)
maybe I missed something, can you suggest you idea please
2019-07-31 03:54 AM
SPI pins connected with other board?
2019-07-31 03:59 AM
yes i want to display the value on the second board bc it has an LCD.
2019-07-31 04:09 AM
my experience is it is not software but hardware problem.
EDIT: receiving 0 or 255 is most probably that data pin has bad contact,
2019-07-31 04:14 AM
@JChau it displays always 0, there's like no connection between the 2 boards. it drives me crazy, I can't understand what's missing!
I think I have the same problem with noise bc when I tried with one board, the value change between 255 and 7, and when I press the ST_link, it still 7, but my problem i want at least see something on the LCD, but not 0
2019-07-31 04:20 AM
if you think it is noise, or bad contact, you have to solder the wire instead, btw we did solder the wire, and even used shielded wire (because problem persisted until we found that part of it is a silicon problem for I2S, which is not your case)