Skip to main content
JTLGE
Associate III
June 10, 2022
Solved

Comunicate RS485 with STR485 on STEVAL-STWINKT1B

  • June 10, 2022
  • 1 reply
  • 1035 views

I purchased a STEVAL-STWINKT1B development board and inside it has the STR485 chip for RS485 communication.

I tried using the cube mx and configured it appropriately (see image 1 attached), enabled uart2, RS485 flowcontrol and then checked that the pins on the board schematic matched.

Then this I simply tried to send the data on the uart to see if I could see the A and B signals coming off the chip with the oscilloscope change, but nothing seems to happen.

 this is the code i used to send the message on the UART:

 while (1)

 {

 uint8_t *prova="0123456789";

 HAL_UART_Transmit(&huart2, prova, 10, 100);

 HAL_Delay(3000);

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

 }

how can I solve this problem?

    This topic has been closed for replies.
    Best answer by Paul1

    Just checking...

    • The while loop is after MX_USART2_UART_Init() ?
    • The configured pins are exactly the ones you are scoping? (You can move the USART2 pins to several choices on MCU, so they might be different from actual connector on a demo PCB).

    Paul

    1 reply

    Paul1
    Paul1Best answer
    Senior III
    June 10, 2022

    Just checking...

    • The while loop is after MX_USART2_UART_Init() ?
    • The configured pins are exactly the ones you are scoping? (You can move the USART2 pins to several choices on MCU, so they might be different from actual connector on a demo PCB).

    Paul