Hi all,
I have a project that when I go to try release environment, instead of debug, the DHCP takes up to 5 minutes to do a bind. If I leave BSPCFG_ENABLE_IODEBUG 1, or place a breakpoint in ipcfg_bind_dhcp it gets the ip through DHCP in a single try. I have tried adding a delay and that did not help. Other notes of interest I am using MQX 4.02, CW IDE 10.5, and a K60D100 processor.
Thanks,
Lee
Hi Lee,
Do you have the same behavior with the example codes?
Have you tried to disable the code optimization in CW?
Best Regards,
Garabo
Garabo,
Thanks for the reply. I have tried turning off optimization and still get same issue. I am using a modified Web_havc example, where the changes are the BSP for pinout differences. I also modified the code for the ability to have the info from the loop sent to the LCD. It looks like after the ipcfg_bind_dhcp command is issued it loops trying the ipcfg_poll_dhcp due to a busy. I am going to try and dig into the ipcfg_bind_dhcp and see if I can see more.
The one thing that seems to stand out to me is any interaction from the debug hardware makes the DHCP work first try.
Thanks,
Lee
Hi Lee,
Did you apply the MQX4.0.2.1 and MQX4.0.2.2 patches?
What router are you connected too?
Regards,
David
David,
I had not applied those patches, I am connected to a Cisco 2940 switch. I did get myself up and running with a work around by reducing the _RTCS_dhcp_term_timeout and disabling the DHCP_SEND_PROBE. Now I usually connect in 30 seconds and less than 100 tries of ipcfg_poll_dhcp. Did those patches have updates for the RTCS?
The MQX4.0.2.2 patch has this mentioned which could be your issue:
3.2 ENGR00279275
This issue relates to setting the PSH flag in all packets, which causes TCP connection problem on some routers and firewalls.
Resolution
The PSH flag is not set together with the SYN flag for TCP packets.