cancel
Showing results for 
Search instead for 
Did you mean: 

Comunicate RS485 with STR485 on STEVAL-STWINKT1B

JTLGE
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Paul1
Lead

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

View solution in original post

1 REPLY 1
Paul1
Lead

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