GPIO pin configuration issue for UART communication

Data transmission is handled entirely within the STM32 embedded firmware using FreeRTOS tasks.

Each task runs independently and continuously transmits data over UART1 at its own interval:

  1. GPS Task — sends GPS data (fix, lat, lon, speed, time) every 1 second
  2. Digital IO Task — sends digital input/output states every 2 seconds
  3. Accelerometer Task — sends IMU data every 3 seconds
  4. Modem Task — sends network status periodically
  5. RS485 Task — sends clock frame to board 03 every 10 seconds

All tasks run in parallel using FreeRTOS scheduler. Data is transmitted over UART1 using HAL_UART_Transmit() protected by a mutex (uart1Mutex) to prevent conflicts between tasks.

Okay, your RX stops working after some time. Can you tell me what the largest chunk (maximum number of bytes) transferred from STM32 to VAAMAN is in a single receive operation?

Also, please share a screenshot of the last 50 lines from the dmesg --follow log, along with screenshots of the periplexer and rah service status using the commands sudo systemctl status periplexer and sudo systemctl status rah.

The STM32 sends data from multiple tasks continuously over UART1 to VAAMAN. Here is the complete breakdown:

Task Frame Size Interval Bytes/min
GPS Task ~200 bytes every 1 sec ~12,000
Digital IO Task ~304 bytes every 2 sec ~9,120
IMU/Accel Task ~70 bytes every 3 sec ~1,400
Modem Task ~50 bytes periodic ~300
Log frames ~60 bytes on events variable

Total approximate throughput: ~22,820 bytes/minute (~380 bytes/second) At 115200 baud,

Could you also share the JSON configuration file? Additionally, when your RX stops working, please share a screenshot of the last 50 lines from the dmesg --follow log, along with screenshots of the periplexer and rah service status using the commands sudo systemctl status periplexer and sudo systemctl status rah."

logs.txt (5.8 KB)

{
“uart”: [
{
“id”: 0,
“TX”: “GPIOT_RXP28”,
“RX”: “GPIOT_RXN28”
}
],
“i2cmaster”: ,
“gpio”: [
{
“id”: 1,
“GPIO-0”: “GPIOR_168”,
“GPIO-1”: “GPIOL_17”,
“GPIO-2”: “GPIOL_20”,
“GPIO-3”: “GPIOL_18”,
“GPIO-4”: “GPIOR_187”,
“GPIO-5”: “GPIOL_24”,
“GPIO-6”: “GPIOL_66”,
“GPIO-7”: “GPIOL_62”
}
],
“pwm”: ,
“ws”: ,
“spi”:,
“onewire”: ,
“can”: ,
“i2s”: ,
“i2cslave”: ,
“jtag”: ,
“dht”:
}

json file

please provide the script used on both the STM32 side and the VAAMAN side so that we can recreate the same scenario on our side

STM32 Side (Embedded Firmware — FreeRTOS):

The STM32 continuously transmits structured binary frames over UART1 at 115200 baud. Each frame has an opcode, payload length, JSON payload and CRC16 checksum:

  1. GPS Task (opcode 0x01) — 165 bytes payload, sends GPS data (fix, lat, lon, speed, time) every 1 second

  2. Modem Task (opcode 0x02) — small frame, sent periodically

  3. Digital IO Task (opcode 0x03) — 278 bytes payload, sends digital input/output states every 2 seconds

  4. Accelerometer Task (opcode 0x04) — 52 bytes payload, sent every 3 seconds

  5. Log frames (opcode 0x05) — small, sent on events

  6. RS485 Task — receives route, stop, default and driver display commands from VAAMAN over UART1 and forwards them to the RS485 display boards (boards 01, 02, 04) over UART3 at 4800 baud. Also sends IST clock frame to board 03 every 10 seconds. When GPS signal is lost, sends the stored default message to board 03.
    All tasks run in parallel under FreeRTOS and all transmissions are protected by uart1Mutex to prevent frame overlap.

VAAMAN Side:

VAAMAN receives all frames continuously, parses them by opcode, displays the data on the GUI and performs calculations based on the received values (GPS position, digital IO states, accelerometer data, network status). VAAMAN also sends display commands (route, stop, default, driver) to STM32 over UART1 which are then forwarded to the RS485 boards.

can you please run the periplex-sync command once again for this json

{
    "uart": [
        {
            "id": 0,
            "TX": "GPIOT_RXP28",
            "RX": "GPIOT_RXN28"
        }
    ],
    "i2cmaster": [],
    "gpio": [
        {
            "id": 1,
            "GPIO-0": "GPIOR_168",
            "GPIO-1": "GPIOL_17",
            "GPIO-2": "GPIOL_20",
            "GPIO-3": "GPIOL_18",
            "GPIO-4": "GPIOR_187",
            "GPIO-5": "GPIOL_24",
            "GPIO-6": "GPIOL_66",
            "GPIO-7": "GPIOL_62"
        }
    ],
    "pwm": [],
    "ws": [],
    "spi": [],
    "onewire": [],
    "can": [],
    "i2s": [],
    "i2cslave": [],
    "jtag": [],
    "dht": []
}

and send the screen-shot of the running script

Sure, I’ll run the periplex-sync command again for this JSON.

Please share a screenshot; I’ll cross-check it

which screenshot do you want ?

When you execute the periplex-sync command, provide a screenshot of the complete command along with the full output."



share the output of this command

cat /opt/periplex/content.txt

run this command sudo bitman -r 1

and then run the periplex-sync command once again for the same json

bitstream removed successfully

and send the screen shot of the periplex-sync command .