Hi Marius
Thank you, last time with your support now our Kalman SoC state Estimator is success.
Even it is little bit slow, because the current sensor is at 10ms looping.
But I am doing fine tune software later.
Regarding this topic, I also saw the same suggested ways of implementation from your code.
(Initialization by Simulink and call LPSPI function from lpspi_driver C header.)
I even try to implement same way but not working in Real-Time Clock module via I2C module and calling LPI2C header which hide inside MBDT.
Anyway, The system was comply sucessfully but nothing working.
So I adapt to code to be call just direct byte write and read from hardware adress directly and work now.
In this case of UART MODBUS, we use this to read LEL explosive sensor from commericial product via coil read.
I get the attached file from github and try to implement but it is too complex.
Frankly speaking, I am still learning the logic behind the MODBUS protocol yet.
I think if we implement the same way as BCC; there is the HAL_UART_Receive function which should be replaced by the lpuart C header function.
Question.
1. What function should I initilaze in Simulink ?
2. What header should I call in this case (lpuart_driver.h.. lpuart_hw_access.h...)?
Thank you in advance for your kind support.
Narudol T.