STM32F103 Uart transmission complete callback problem

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

STM32F103 Uart transmission complete callback problem

Postby franek.bmw » Sat Mar 20, 2021 11:37 am

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: 13527
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 861 times
Been thanked: 743 times
Contact:

Re: STM32F103 Uart transmission complete callback problem

Postby Giovanni » Sat Mar 20, 2021 12:18 pm

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: 56
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

Re: STM32F103 Uart transmission complete callback problem

Postby franek.bmw » Sat Mar 20, 2021 4:12 pm

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: 13527
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 861 times
Been thanked: 743 times
Contact:

Re: STM32F103 Uart transmission complete callback problem

Postby Giovanni » Sat Mar 20, 2021 6:06 pm

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: 13527
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 861 times
Been thanked: 743 times
Contact:

Re: STM32F103 Uart transmission complete callback problem

Postby Giovanni » Sat Mar 20, 2021 6:07 pm

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: 56
Joined: Thu Mar 13, 2014 11:15 am
Has thanked: 2 times

Re: STM32F103 Uart transmission complete callback problem

Postby franek.bmw » Sat Mar 20, 2021 8:55 pm

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


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 5 guests