Multiple definition for TC0 timer handlers

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I am developing a gateway for wireless sensing platform.  I found the there is a hardware timer handler defined for TC0, and  network stack also defines a timer handler for TC0.

 

I want to get some advice which one I should use?

 

Thanks

Up Hill

Last Edited: Wed. May 10, 2017 - 07:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not nearly enough detail. No one here will have any idea what you are talking about. Which AVR, what language, what software stack etc, etc

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sorry. It uses lwmesh and lwip stacks. Sam4e16e is the mcu. ASF has hw_timer.c defines the TC0_timer handler, basically a callback function, in the network lwip stack, ethernet timer management side, timer_mgt.c also defines another TC0_timer handler, which clears the status bit to acknolege the interrupt, then increase the tick.  Not sure this is clear? thanks for helping

Up Hill

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moved from AVR to ARM forum. 

 

Moderator 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Up Hill wrote:
there is a hardware timer handler defined for TC0, and  network stack also defines a timer handler for TC0.   I want to get some advice which one I should use?

Up Hill wrote:
It uses lwmesh and lwip stacks.

Well, they are both "network" stacks - so which one  are you calling the "hardware timer handler" ?

 

I would note that LwIP is a 3rd-party stack - nothing specifically to do with Atmel.

Therefore, it must be designed to work with any arbitrary timebase source - it can't rely upon any particular hardware feature of any specific target platform.

 

LWMesh, on the other had is proprietary Atmel code - so it may well have specific Atmel hardware dependencies.

 

So my guess would be that it'd be easier to change the timebase source for LwIP...

 

You may need to study the original LwIP documentation, rather than anything from Atmel - which may well be Atmel-focussed.

https://savannah.nongnu.org/proj...

http://www.nongnu.org/lwip/2_0_x...

https://en.wikipedia.org/wiki/LwIP