This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UDP buffer allocation fails

Hello,

I'm trying to send UDP-packets from an LM3S9B96 to the PC. But every time when I call the Library-function "udp_get_buf(len);" I get an Hardfault-IRQ.
Receiving the UDP-Packets from the PC is no problem, so my initialization from the UDP should be ok.
Any ideas what could be wrong?

Thank you.

Regards,
Mike

Parents
  • A response I once got from Keil Technical Support was this:

    In general the rule is "Do not call any TCP net functions from the TCP callback function." This is self explaining.

    I would suggest that (as a test) you change your callback function to set a flag on receipt of the UDP message and test the flag for the generation of a response (including the call to udp_get_buf) within your UDPTask loop.

    This is (fundamentally) what I do in my code.

Reply
  • A response I once got from Keil Technical Support was this:

    In general the rule is "Do not call any TCP net functions from the TCP callback function." This is self explaining.

    I would suggest that (as a test) you change your callback function to set a flag on receipt of the UDP message and test the flag for the generation of a response (including the call to udp_get_buf) within your UDPTask loop.

    This is (fundamentally) what I do in my code.

Children