Hi every body, I am in a bit trouble of finding out the processing time taken by main_tcpnet() function. As it is written in documents that this function must be called periodically but does not specify at how much rate i.e milliseconds. Secondaly since i have other work to do also during interrupt (timer) i wonder how to fix main_tcpnet() function in the same interrupt as doing this causes my hardware to reset. Plz help me Thanx in advance
Hello all,
in re-writing the example from some working C code of mine I mistyped a % in SysTick_Handler(). See errata corrige below.
Also, I missed the closing } of the for(;;).
Regards, Marco.
// errata: if(0 == (msec/10)) if(0 == (msec%10)) // corrige ..... ..... // errata: if(0 == (msec/100)) if(0 == (msec%100)) // corrige
Hi Macro
Yes i understood what u have written, But my while loop is too big such that the time i will check the flag may vary from 10ms to 500ms depending upon certain conditions. Certainly with this much delay it will not work.
Secondly help me regarding following:
i programmed MAC to accept only Perfect match address by disabling broadcast. This removes the burden of unwanted interrupts and this works fine. But as soon as i removed the ethernet cable "time out" occurs during ping but when reattached cable still "time out" occurs. And this situations never ends untill i reenable broadcast and dump it into target Plz tell me how to disable broadcast in this situation
it sounds like you have a program design issue at hand. maybe it is better to re-design it, or use an RTOS - that's what they are for, after all:managing priorities and timely servicing different parts of a program.
"...or use an RTOS..."
That would surely be the best option.
You might want to consider/investigate LightingBolt ;)
hi devendra,
if your forever loop takes that time you should seriously consider either to make it shorter by defragmenting actions in more than one iteration or to use an rtos to execute things in parallel.
with an rtos you can make a task with higher priority which regularly wakes up and calls your tcp functions.
About the second problem you have, unfortunately I cannot help much because I havent ever used that feature.
what you should do is to investigate more and post a new question with more details.
good luck, marco.
If the board never responds to broadcasts, how do you find the board when a PC makes a broadcast ARP request to find out which MAC address to use to communicate with ip x.y.z.w?
Hello per
You are right ARP will not work at all if broadcast is disabled, But if this is the case why NXP has given filter feature if it is of no use in such situations
Dear friends,
Yesterday i have cracked the working of all the TCP stuff i.e main_tcpnet() and timer_tick() on LPC2300 using a logic analyzer. Here is the story:
1) Timertick merely provides the time to TCP stack for its time calculations as configured in net_config.c. This is also written above by other members. Nevertheless it does't affect TCP performance as far as i have seen as i am calling timer_tick() aperiodically.
2)Now the whole and sole of TCP is the main_tcpnet() function. As soon as you connect ethernet cable to board it make your code to run in ethrnet interrupt isr depending only upon the traffic and filter configuration.
3)When main_tcpnet() is called it checks for any TCP data arrived (obviously for this to happen ethernet interrupt will ocuur first). If this is the case code will first exit from ethernet interrupt isr and after some microseconds it enters into callback() interrupt in the application code. In callback() isr routine we chk the arrived data and reply acordingly. After completion of this whole process we exit main_tcpnet().
4)Thus the conclusion is main_tcpnet() processing time depends upon ethernet interrupt isr and callback() isr. And callback() interrupt or reply to ping will only occur if we call main_tcpnet() periodically.
Please add you experince to this also
Hello friends, Long time no see, Ok i am in the way of completing my project as i called main_tcpnet() from the while(1) loop. Now in my way i am suffering from hurdles as i asked earlier. My latest hurdle is as follows:
1) I have made 200 servers on LPC2300. A client (can be more then 1) will ask for running data from these servers.
2) I have allocated different IP address to each (Please suggest me a way to dynamically allocate these addresses)
3) Main hurdle is to allocate MAC addresses to each servers, Since the adresses are allocated by IEEE then what should i do to allocate it.
Please suggest me a way
Why not register with IANA?
What i have understood from surfing is as follows:
1) Hitex has purchased OUI (organization unique identifier) which is of three Most significant bytes which is 00-30-6C
2) Rest of the three bytes are empty
3) We have to apply for extension identifier that is assigned by the IEEE Registration Authority and then reserving an additional 12 bits for use by the assignee. The resulting 48-bit identifier uniquely identifies the assignee of the IAB and provides 4096 unique EUI-48 numbers for use by the organization that purchased the IAB.
Example of EUI-48 created within an IAB:
An EUI-48 identifier is formed by combining the 36-bit IEEE assigned IAB base value with a 12-bit extension identifier assigned by the organization â€" e.g., if the IEEE assigned IAB base value is FF-FF-FF-FF-F0-00 and the 12-bit extension identifier is hhh16, then the EUI-48 value generated by combining these two numbers is FF-FF-FF-FF-Fh-hh