2022-06-16 03:42 AM
I order the X-NUCLEO-OUT02A1 and I work with a NUCLEO-F746ZG.
These two boards aren't directly compatible I know.
But they communicate with SPI, so I'm sure that you just can implement the communication with a bit of mapping with some breadboard wires.
It should works.
I saw that there is some library to use with other board but I don't want to install it. Because I don't need all that stuff, Ijust want to implement the SPI communication.
And in the HTML compiled program, nothing.
Impossible to find any documentation about the communication between these two boards !
Were can I find it ?
2022-06-16 05:19 AM
Welcome, @Zuffouille, to the community!
As can be seen from the schematics, the ZIO connector is compatible to the Arduino Uno one used by the X-NUCLEO-OUT02A1.
Examples of communication can be found in the source code package X-CUBE-OUT2, which so far only contains drivers and BSP for STM32F3xx and STM32F4xx. However, it should not be too much of a problem to add the missing parts for STM32F7xx and other families.
Does it answer your question?
Regards
/Peter
2022-06-16 08:16 AM
Ok thanks, i see
Now i have another problem.
I've implemented the SPI communication and i can transmit and receive the fault byte from the board.
But there isn't any led that turn on...
Here is the code that I add to my project. I didn't add the X-CUBE-OUT2 package.
// Communication with relay shield
uint8_t Iso8200aq_Board_SpiWriteByte(uint8_t *pByteToTransmit, uint8_t *pReceivedByte, uint8_t nbDevices)
{
HAL_StatusTypeDef status = HAL_OK;
uint32_t i;
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_14, GPIO_PIN_RESET);
for (i = 0; i < nbDevices; i++)
{
printf("SPI TX : ");
print_bin(pByteToTransmit);
printf("\n");
status = HAL_SPI_TransmitReceive(&hspi1, pByteToTransmit, pReceivedByte, 1, 1000);
printf("SPI RX : ");
print_bin(pReceivedByte);
printf("\n");
if (status != HAL_OK)
{
break;
}
pByteToTransmit++;
pReceivedByte++;
}
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_14, GPIO_PIN_SET);
return (uint8_t) status;
}
void testSpiCom()
{
uint8_t state1Relays = 0b11001100;
uint8_t state2Relays = 0b11110000;
Iso8200aq_Board_SpiWriteByte(&state1Relays, &spiRxByte, 1);
HAL_Delay(5000);
Iso8200aq_Board_SpiWriteByte(&state2Relays, &spiRxByte, 1);
HAL_Delay(5000);
}
And here is the output console :
And nothing on the output also (i've measured the voltage).
What i'm doing wrong ?
Regards
--
Samuel
2022-06-19 11:29 PM
Has the ISO8200AQ been fully initialised?
Have you enabled the ISO8200AQ via ISO_OUT EN before writing to the SPI port?
Regards
/Peter