Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implementing modbus on UART #2

Closed
hasan700 opened this issue Jul 29, 2019 · 6 comments
Closed

implementing modbus on UART #2

hasan700 opened this issue Jul 29, 2019 · 6 comments

Comments

@hasan700
Copy link

Hi.
Your code is well described and good. I want to use it on STM32F103VET6 discovery board, and use UART1 port for modbus (not USB). I don't know how to do that and what codes I should use instead of those you used for USB.
Thank you very much...

@Danixsadati
Copy link

Hi,
Could you implement it on UART?
I have the same problem :(
Thank you!

@hasan700
Copy link
Author

hasan700 commented Feb 12, 2020 via email

@sslobodyan
Copy link

sslobodyan commented Mar 5, 2020

Здравствуйте!
Спасибо за код, сэкономили мне пару минут ;)
Нашел ошибочку. В обработке 3 функции со строки 121 вместо

mb_buf_out[mb_buf_out_count++]=(st+nu)*2; // how many bytes we will send?
for(i=st;i<nu;i++)

следует записать

mb_buf_out[mb_buf_out_count++]=nu*2; // how many bytes we will send?
for(i=st;i<st+nu;i++)

Аналогичная ошибка и в 16 функции.
После этого работает нормально ;)

@alejoseb
Copy link

Hi,
Could you implement it on UART?
I have the same problem :(
Thank you!

This library uses HAL, FreeRTOS and USART:

https://github.com/alejoseb/Modbus-STM32-HAL-FreeRTOS

@kiltum
Copy link
Owner

kiltum commented Jun 19, 2020

@sslobodyan Спасибо! пофиксил :)

@kiltum
Copy link
Owner

kiltum commented Jun 19, 2020

@heroseller17 Hello!
my code not relying on any implementation. just put received bytes to ModBusInHandle, and send out anything from ModBusOutHandle queue.

@kiltum kiltum closed this as completed Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants