<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic lpc1768 freertos lwip in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1768-freertos-lwip/m-p/518195#M2555</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by _whoami_ on Sun Feb 15 03:18:34 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to get freertos in conjunction with lwip to work. Therefore I am using the lpcopen_2_10_lpcxpresso_nxp_lpcxpresso_1769/webserver_freertos example program.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All task are running and an additional LED blinky task too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UART0 is also working for debug purposes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now my problem is that sending an etharp_gratuitous(netif); is not working. I have traced this function and found out it is crashing in&amp;nbsp; Chip_ENET_IncTXProduceIndex.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In that function pENET-&amp;gt;CONTROL.TX.PRODUCEINDEX = idx; is called and right after this instruction see my debug print from the Default_Handler ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void Default_Handler(void) {
// Go into an infinite loop.
//

DEBUGSTR("Default_Handler ...................");
while (1) {
}

}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought of some multi thread problems during breakpoint debugging and added some DEBUG print instructions like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;uint16_t Chip_ENET_IncTXProduceIndex(LPC_ENET_T *pENET)
{
/* Get current TX produce index */
uint32_t idx = pENET-&amp;gt;CONTROL.TX.PRODUCEINDEX;

/* Start frame transmission by incrementing descriptor */
idx++;
if (idx &amp;gt; pENET-&amp;gt;CONTROL.TX.DESCRIPTORNUMBER) {
idx = 0;
}

//PASCAL
DEBUGSTR("New INDEX\r\n");

pENET-&amp;gt;CONTROL.TX.PRODUCEINDEX = idx;

//PASCAL
DEBUGSTR("Return\r\n");

return idx;
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT after "New INDEX" I get "Default_Handler ..................." on my UART terminal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also if I try to ping the ip address from my PC the lpc1768 program crashes. If I put an breakpoint at the start of the ETH_IRQHandler I never get there even if I ping that device ?!?!? But the controller still crashes :weird:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think there is something wrong on the low level side.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know it is much guessing now but I do not know how to solve that problem. No idea where to start &lt;SPAN class="lia-unicode-emoji" title=":disappointed_face:"&gt;&lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDDDDIIIIIITTTTTTTTTTTTTTT !!!!!!!!!!!!!!!!!!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OMG there is a difference between ENET_IRQHandler and ETH_IRQHandler :shamed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:31:33 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:31:33Z</dc:date>
    <item>
      <title>lpc1768 freertos lwip</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1768-freertos-lwip/m-p/518195#M2555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by _whoami_ on Sun Feb 15 03:18:34 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to get freertos in conjunction with lwip to work. Therefore I am using the lpcopen_2_10_lpcxpresso_nxp_lpcxpresso_1769/webserver_freertos example program.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All task are running and an additional LED blinky task too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UART0 is also working for debug purposes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now my problem is that sending an etharp_gratuitous(netif); is not working. I have traced this function and found out it is crashing in&amp;nbsp; Chip_ENET_IncTXProduceIndex.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In that function pENET-&amp;gt;CONTROL.TX.PRODUCEINDEX = idx; is called and right after this instruction see my debug print from the Default_Handler ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void Default_Handler(void) {
// Go into an infinite loop.
//

DEBUGSTR("Default_Handler ...................");
while (1) {
}

}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought of some multi thread problems during breakpoint debugging and added some DEBUG print instructions like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;uint16_t Chip_ENET_IncTXProduceIndex(LPC_ENET_T *pENET)
{
/* Get current TX produce index */
uint32_t idx = pENET-&amp;gt;CONTROL.TX.PRODUCEINDEX;

/* Start frame transmission by incrementing descriptor */
idx++;
if (idx &amp;gt; pENET-&amp;gt;CONTROL.TX.DESCRIPTORNUMBER) {
idx = 0;
}

//PASCAL
DEBUGSTR("New INDEX\r\n");

pENET-&amp;gt;CONTROL.TX.PRODUCEINDEX = idx;

//PASCAL
DEBUGSTR("Return\r\n");

return idx;
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT after "New INDEX" I get "Default_Handler ..................." on my UART terminal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also if I try to ping the ip address from my PC the lpc1768 program crashes. If I put an breakpoint at the start of the ETH_IRQHandler I never get there even if I ping that device ?!?!? But the controller still crashes :weird:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think there is something wrong on the low level side.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know it is much guessing now but I do not know how to solve that problem. No idea where to start &lt;SPAN class="lia-unicode-emoji" title=":disappointed_face:"&gt;&lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDDDDIIIIIITTTTTTTTTTTTTTT !!!!!!!!!!!!!!!!!!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OMG there is a difference between ENET_IRQHandler and ETH_IRQHandler :shamed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:31:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc1768-freertos-lwip/m-p/518195#M2555</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:31:33Z</dc:date>
    </item>
  </channel>
</rss>

