STM32F103 Uart transmission complete callback problem

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
franek.bmw
Posts: 57
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

STM32F103 Uart transmission complete callback problem

Post by franek.bmw »

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
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F103 Uart transmission complete callback problem

Post by Giovanni »

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
franek.bmw
Posts: 57
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

Re: STM32F103 Uart transmission complete callback problem

Post by franek.bmw »

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
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F103 Uart transmission complete callback problem

Post by Giovanni »

Moving this topic in "bug reports" so I will check it. I don't remember if I committed that fix.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F103 Uart transmission complete callback problem

Post by Giovanni »

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
franek.bmw
Posts: 57
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

Re: STM32F103 Uart transmission complete callback problem

Post by franek.bmw »

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
Post Reply