Author Topic: MCB2300 - reseting  (Read 11287 times)

Offline db_official

  • Newbie
  • *
  • Posts: 9
    • View Profile
MCB2300 - reseting
« on: December 07, 2009, 04:01:56 PM »
Hi
I run the utasker1.4 for LPC2368 and It will reset processor when I try to send by

fnSendBufTCP(Test_socket, (unsigned char *)test_message, nr_of_bytes, (TCP_BUF_SEND | TCP_BUF_SEND_REPORT_COPY));

I do not know what can I do to repair this.

thanks

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: MCB2300 - reseting
« Reply #1 on: December 07, 2009, 05:45:00 PM »
Hi

What values do the variables
Test_socket,
test_message and
nr_of_bytes

have when the function is called?

Regards

Mark


Offline db_official

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: MCB2300 - reseting
« Reply #2 on: December 08, 2009, 08:09:31 AM »
Hi

Hello, world... LPC2XXX
OPENED Free 4096
Size buffer to send 1550
EventACKEventACKIle Free 4096
Size buffer to send 1550
EventACKEventACKIle Free 4096
Size buffer to send 1550
EventACKEventACKIle Free 4096
Size buffer to send 1550
EventACKEventACKIle Free 4096
Size buffer to send 1550
EventACKEventACKIle Free 4096
Size buffer to send 1550
EventACKEventACKIle Free 4096
Size buffer to send 1550
EventACKEventACKI

Hello, world... LPC2XXX << - There is reset of MCB2300


When I run this Code in 1s task:

ulCounter1 = fnSendBufTCP(Test_socket,(unsigned char *)&OurTask, nr_of_bytes, TCP_BUF_CHECK);
fnSendBufTCP(Test_socket, (unsigned char *)test_message, nr_of_bytes, (TCP_BUF_SEND |  TCP_BUF_SEND_REPORT_COPY));
ulCounter2 =  nr_of_bytes;
fnDebugMsg("Free");fnDebugDec(ulCounter1,0);fnDebugMsg("\r\n");
fnDebugMsg("Size buffer to send");fnDebugDec(ulCounter2,0);fnDebugMsg("\r\n");


Thank You







Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: MCB2300 - reseting
« Reply #3 on: December 08, 2009, 02:22:33 PM »
Hi

This looks to be working as expected for about 7 frame transmissions therefore the basic transmission code seems OK.
Presumably the watchdog is firing after this time - either because it is not being triggered, or because the board has stopped working.

The reason for the board to stop working at this point in time is not visible though.
I also note that there are addition debug messages (EventACKEventACKIle). This means that code is also operating, presumably on reception of each acknowledge from the TCP transmissions {it looks like 2 ACKs plus extra outputs I and le - when it stops the le is missing - is this a hint?}

Regards

Mark


Offline db_official

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: MCB2300 - reseting
« Reply #4 on: December 08, 2009, 02:27:13 PM »
Hi Mark
Can You look at this?
http://pastebin.com/m4d2be322
I see that reset of board is not a problem of TCP because when  I make a task and run it. MCB2300 will reset but newer at this same time. Is it possible to make something wrong in adding task?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: MCB2300 - reseting
« Reply #5 on: December 08, 2009, 02:36:28 PM »
Hi

It does sound as though the problem is not due to the TCP operation but due to something else.
I can't see what the other task is doing but it could be causing a problem by:
1) Stopping the watchdog task working (not very likely though)
2) Performing an illegal access - eg. trying to read from non-existing memory, resulting in the watchdog firing as consequence of the abort.
3) Performing a loop which never ends - this will block other tasks and result in the watchdog firing.

Usually the best way to debug this is to disable the watchdog (beware that the watchdog runs through a reset and so a power-up is required to really stop it). Then allow the error to occur. With a debugger pause the operation and see where the code is. If it turns out to be in a data abort follow the following to identify the source of the error: http://www.utasker.com/forum/index.php?topic=535.0

Regards

Mark

Offline db_official

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: MCB2300 - reseting
« Reply #6 on: December 08, 2009, 02:53:08 PM »
Thank You