Forum Discussion
Altera_Forum
Honored Contributor
14 years agoPETRAK,
--- Quote Start --- I'm new to this tse code and example program but it seems that in the implementation of timers when the variable lwip250mStimer reaches the limit of alt_u32 timers will not work anymore. Am I right ? according to this such program will work for approximately 50days. --- Quote End --- I would add to Bill’s comment that the timer code in the example is error prone. If any of XXX_TMR_INTERVAL constants happens to be not divisible by 250, you will get incorrect period LCM(XXX_TMR_INTERVAL, 250) for that timer. For example, if you simply enable AUTO_IP in your lwipopts.h, you will have 500ms period for autoip_tmr() instead of intended 100ms. Dsl, The problem is not the wrapping itself, but that 2^32 is not divisible by 250. Igor