AnsweredAssumed Answered

STM32L476ER - USART Frame Error, Overrun, Baudrate issue?

Question asked by guillaume.dugast on Jul 6, 2016
Latest reply on Jul 7, 2016 by guillaume.dugast
Hello all,

Here my system specification:
Device 1:
- STM32L476ER/ZG
- system clock = 4MHz
- tick period = 100ms, (shortest irq possible, just pulling data)
- usart
- Transceiver MAX3485
- modbus master
- expected request = ": 05 03 0001 0008 \r\n"
Line between device 1 and 2:
- rs485 half duplex
- 9600 baud
- 8N1, no flow control
- modbus
- analyzer on it: scanaplus sniffing for rs485 data
Device 2:
- PC
- labview
- modbus slave
- expected response = ": 05 03 10 1122 0004 0004 3344 5566 7788 99AA 0011 28 \r\n"

Here my issues:
1/ the reception is good when I test it with very short response.
2/ when i test it with this response size (number of data 16bit register = 8 --> 43 bytes), i get some error, which defers depend at which baudrate system is configurated:

                                                                                                                                                                                                               
 message config message result
  real data
             (seen on analyzer)     
 every frame, every data
            : 05 03 10 1122 0004 0004 3344 5566 7788 99AA 0011 28 \r\n
  4800 br 
            (seen on uart buffer)     
           
1 frame on 2, data lacking in red
            : 05 03 10 1122 0004 0004 3344 5566 7788 99AA 0011 28 \r\n
  9600 br       
            (seen on uart buffer)
           
 every frame, data lacking in red
            : 05 03 10 1122 0004 0004 3344 5566 7788 99AA 0011 28 \r\n
  19200 br 
            (seen on uart buffer)
           
 every frame, data lacking in red
            : 05 03 10 1122 0004 0004 3344 5566 7788 99AA 0011 28 \r\n

The ORE and FE are set as often as data is lacking.

strange no? any idea?
Please note i've changed xtral from 4MHz to 8MHz with no improvement on results.

thanks for helping!!
sorry for my bad english... :)
Guillaume
 




Outcomes