Hello,
I am using Chibios 17.6.4 and STM32F103RBT6. I implemented Freemodbus library into my firmware. I have some problems with RS-485 driver enable signal. I set RS_485_DE signal just before calling uartStartSend() and clear this signal (RS_485_DE) in end of transmission callback. Everything works almost fine and the modbus communication works. Unfortunately, sometimes it happens that TC callback will not be called/fired. Then the RS-485_DE signal remains set so I can't receive anything. What could be the reason why callback TC is not called after using uartStartSend() and transmission is finished?
Thank you in advance for your help!
Franek
STM32F103 Uart transmission complete callback problem
-
- Posts: 57
- Joined: Thu Mar 13, 2014 11:15 am
- Has thanked: 2 times
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: STM32F103 Uart transmission complete callback problem
Hi,
Hard to tell without info, are debug options enabled in chconf.h? you should also consider trying a recent version, 17.x is out of maintenance and missing a lot of fixes.
Giovanni
Hard to tell without info, are debug options enabled in chconf.h? you should also consider trying a recent version, 17.x is out of maintenance and missing a lot of fixes.
Giovanni
-
- Posts: 57
- Joined: Thu Mar 13, 2014 11:15 am
- Has thanked: 2 times
Re: STM32F103 Uart transmission complete callback problem
Hi,
Thank you for your quick reply.
I have all debug options enabled in chconf.h, is this wrong and could cause this issue?
Yes, I know that I use very old version of chibios. I will try to upgrade to newest one. But just for now I have to fix issue with TC callback first.
What other info I should provide to you about my project?
I also find one similar thread on this forum: viewtopic.php?t=2572
Is this possible that this could cause my issue with sometimes lost TC Callback?
Thank you a lot!
Franek
Thank you for your quick reply.
I have all debug options enabled in chconf.h, is this wrong and could cause this issue?
Yes, I know that I use very old version of chibios. I will try to upgrade to newest one. But just for now I have to fix issue with TC callback first.
What other info I should provide to you about my project?
I also find one similar thread on this forum: viewtopic.php?t=2572
Is this possible that this could cause my issue with sometimes lost TC Callback?
Thank you a lot!
Franek
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: STM32F103 Uart transmission complete callback problem
Moving this topic in "bug reports" so I will check it. I don't remember if I committed that fix.
Giovanni
Giovanni
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: STM32F103 Uart transmission complete callback problem
Probably I cannot look at this immediately, could you check that patch in the meanwhile?
Debug options are fine, you should keep those ON during development.
Giovanni
Debug options are fine, you should keep those ON during development.
Giovanni
-
- Posts: 57
- Joined: Thu Mar 13, 2014 11:15 am
- Has thanked: 2 times
Re: STM32F103 Uart transmission complete callback problem
Unfortunately this patch didn't help. Same issue still occurs. I have to add that this issue only occur when opt = 1 or higher. When opt = 0 then always work fine.
Franek
Franek
Who is online
Users browsing this forum: No registered users and 13 guests