As far as the ChibiOs time issues I have a simple rule:
*On my embedded systems every line of code I put into the project becomes
my problem! *
That is if I use LWIP and it has a bug, customers do not care if it is in
LWIP or not, it is my problem to fix. Hence every line of code becomes my
So a trick I use in my code and libraries is to use
typedef's for variables.
typedef uint32_t milliseconds_t;
milliseconds_t getMillis();
Then I use milliseconds_t to define all variables. This allows me to
change it to uint64_t in one location depending on the project.
I have started using
Hello Trampas,
thanks for the hints. I initialized the sys ticks with 2^32 - 120 seconds,
and I got mqtt pbuf=NULL in around 120 seconds + 120 keep alive seconds.
The ChibiOs sys_arch.c port includes sys_now() (current time in
milliseconds) following simplified implementation:
return
Increase the counter to a uint64_t.
You can also start the counter at something other than zero to prove root
cause faster.
Trampas
On Fri, May 28, 2021 at 7:08 AM Adam Baron wrote:
> Czesc Tomek :),
>
> I'll try to add it. Thanks.
>
> However, I feel like it is rather related to the problem
Czesc Tomek :),
I'll try to add it. Thanks.
However, I feel like it is rather related to the problem of overflowing a
uint32 counter of some kind. Since the TCP_PCBs are not freed after 2^32
ticks.
Adam
pá 28. 5. 2021 v 9:44 odesílatel Tomasz W napsal:
> Hi (Cześć)
> Lok for this
>
Hello Paul,
thanks, you're right, my bad, putting it into the calculator 4 294 967.296
seconds = 49.7102696 days.
So this is a rater related to timer that overflows after ChibiOS(RTOS I
use) systicks (which is 1/1 seconds).
Adam
pá 28. 5. 2021 v 11:23 odesílatel Matthias Paul
napsal:
>
Am 28.05.2021 um 08:58 schrieb vysocan [via lwIP]:
Hello all,
I'm having a small STM32F4 application running on devel branch of
lwip, It includes httpd, sntp, smtp client, and mqtt client. All is
running well until the fifth day, when mqtt client starts to receive
pbuf=NULL and disconnects.
Hi (Cześć)
Lok for this
https://lists.nongnu.org/archive/html/lwip-devel/2020-12/msg00014.html
In my case it solved the problem of the web server dying after a few days
pt., 28 maj 2021 o 08:58 Adam Baron napisał(a):
>
> Hello all,
>
> I'm having a small STM32F4 application running on devel
Hello all,
I'm having a small STM32F4 application running on devel branch of lwip, It
includes httpd, sntp, smtp client, and mqtt client. All is running well
until the fifth day, when mqtt client starts to receive pbuf=NULL and
disconnects. My reconnect routine reconnects it in some short time,