UART half-duplex WeAct STM32F411 - working only when ST Link V2 is connected

dacair

Sep 4, 2024
13
Joined
Sep 4, 2024
Messages
13
Hi there,
I am working on a joystick and using a Winwing F-16 Viper grip that sends button status through a half-duplex 230400 baud rate connection. STM32 sends 0x0A then the grip responds with 8 bytes,
My issue is that it only works when ST Link V2 is connected.
I have:
PA9 as TX/RX pin added external 10k pull-up resistor
NRST - added external 10k pull-up resistor
The three wires Data, 3v3 and GND on half-duplex are ~120mm long. There's a PS/2 connected with a ~50mm cable inside the grip, then my PS/2 connector with a ~70mm 3 wire cable

I connected a digital analyzer and while not working properly, it is visible it cannot even send 0xA0 fully.

I need some advice - what can I do more to make it work?
If required I can share additional info, code or pictures.

Thanks,
 

dacair

Sep 4, 2024
13
Joined
Sep 4, 2024
Messages
13
Hei there,
Is there anyone can help with some hints?
Or did I miss to provide some information?
 

Martaine2005

May 12, 2015
5,276
Joined
May 12, 2015
Messages
5,276
Hi, I know nothing about programming.
But if it works when the ST link is connected, surely the code/program has not been uploaded to the microcontroller?.
 

dacair

Sep 4, 2024
13
Joined
Sep 4, 2024
Messages
13
Hi, I know nothing about programming.
But if it works when the ST link is connected, surely the code/program has not been uploaded to the microcontroller?.
It seems it is related to electronics.
The MCU sends just a byte 0x0A. I put the osciloscope probes and uart decoder and can show some good full messages but then only shows part of this byte - usually the beginning of the 8 bits. ( 0x0A = 01010000 ) it would send ... 010000 or even the first 4 bits 0x0101 --- then looses sync with the baud rate ...
 

Martaine2005

May 12, 2015
5,276
Joined
May 12, 2015
Messages
5,276
There must be something 'common’ when the ST is in circuit. Maybe a GND or other connection that is required?.
Can you post your schematic here?
 

dacair

Sep 4, 2024
13
Joined
Sep 4, 2024
Messages
13
Hi Martaine,
I'm sorry I'm so late with the answer, it was crazy busy last week ...
Please see attached picture.
The board is a WeAct STM32F411CEU
** Red wires - are supplies and signals from/to strain gauges ( HX711 ) - that works fine
** Half Duplex UART
* Green, Black, White - are the connections to the grip . On the grip side ( inside ) there are PS/2 connectors ( the grip has a male connector and my cable is female connector ). All three wires (WH, BK , GN ) are ~70mm long
* Initially the WH (GND) and BK (3V3) were soldered where the Red wires GND,3V3 are but, I moved it closer to USB ... . It actually improved a bit so now it connects but in some certain cases is disconnecting during normal use.

Can you please advice - what can I do to resolve this issue?
 

Attachments

  • Screenshot 2025-07-14 103741.jpg
    Screenshot 2025-07-14 103741.jpg
    293.3 KB · Views: 6
Top