2018-08-02 12:34 AM
its just have a predefined function
eMBErrorCode eMBInit ( eMBMode eMode, UCHAR ucSlaveAddress, UCHAR ucPort, LONG ulBaudRate, eMBParity eParity )
how it will take my USART3 to communicate as modbus ?
2018-08-02 05:10 AM
Do you have an existing STM32 project or have your own generated with CubeMX or some IDE?
Basically you'll want to use the initialization code created by Cube, with baudrate and other parameters as you need. In the CubeMX options, select Low level library (LL) for the USART, not HAL.
Your eMBInit function body will be no-op, the initialization will be generated by Cube.
Then write send & receive functions and interrupt handler using the LL library.
-- pa