Ignore:
Timestamp:
Sep 8, 2025, 6:57:30 PM (7 weeks ago)
Author:
f.jahn
Message:
  • Bug in ADC Kalibrierung (STM32 ADC Strom) behoben
  • DMA Buffer für ADC 1 und ADC wird vor Überschreibung während bearbeitung geschützt, indem Datenübertragung nur einmalig erfolgt und erst nach Auswertung wieder gestartet wird
  • RS485Modbus: Timeout Zeit wird für Baudraten >19200 korrekt berechnet
  • Hardware ID geändert
  • Separates Register für "Batterie Empty detection mode" auf Adresse 92 angelegt
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fw_g473rct/SES/src/modbus.c

    r24 r26  
    3434  #define ILLEGAL_DATA_VALUE              0x03
    3535  #define SLAVE_DEVICE_FAILURE            0x04
    36   #define SERVER_FAILURE                    0x04
     36  #define SERVER_FAILURE                  0x04
    3737  #define ACKNOWLEDGE                     0x05
    3838  #define SLAVE_DEVICE_BUSY               0x06
     
    4141  #define MEMORY_PARITY_ERROR             0x08
    4242  #define GATEWAY_PROBLEM_PATH            0x0A
    43   #define GATEWAY_PROBLEM_TARGET            0x0B
     43  #define GATEWAY_PROBLEM_TARGET          0x0B
    4444
    4545  /* Local Error codes */
     
    185185       
    186186        HAL_UART_EnableReceiverTimeout( usart);
    187         HAL_UART_ReceiverTimeout_Config(usart,  3.5 * nrOfBitsPerChar);
     187        if (baudrate <= 19200)
     188        {
     189          HAL_UART_ReceiverTimeout_Config(usart,  3.5 * nrOfBitsPerChar);
     190        }
     191        else
     192        {
     193      uint32_t fixedDelayInBitDurations = (FAST_BAUDRATE_INTERFRAME_DELAY_us * baudrate) / 1000000UL + 1UL;
     194          HAL_UART_ReceiverTimeout_Config(usart, fixedDelayInBitDurations);
     195        }
     196
     197
    188198        SET_BIT(usart->Instance->CR1, USART_CR1_RTOIE);
    189199
Note: See TracChangeset for help on using the changeset viewer.