Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

large data trigger watchdog reset #60

Open
lable opened this issue Jul 9, 2016 · 0 comments
Open

large data trigger watchdog reset #60

lable opened this issue Jul 9, 2016 · 0 comments

Comments

@lable
Copy link

lable commented Jul 9, 2016

use following code:
if (pub.has_stream()) {
uint8_t buf[BUFFER_SIZE];
int read;

  while (read = pub.payload_stream()->read(buf, BUFFER_SIZE)) {
    Serial.write(buf, read);
  }
  pub.payload_stream()->stop();

Soft WDT reset

ctx: cont
sp: 3fff0340 end: 3fff0670 offset: 01b0

stack>>>
3fff04f0: 3ffef55c 00000165 00000165 4020bb50
3fff0500: 3ffef55c 0000015a 3ffef420 4020919a
3fff0510: 00000004 3ffef420 3ffef650 3ffef420
3fff0520: 00000004 00000005 4020b510 00000005
3fff0530: 00000004 3ffef420 3ffef420 402093f4
3fff0540: 0000004a 3ffef420 3fff1964 40209466
3fff0550: 00000030 3fff061c 00000000 00000001
3fff0560: 3ffef420 3fff05e0 00000001 40209551
3fff0570: 00000000 00000005 00000000 4020aaf7
3fff0580: 00000030 3fff061c 3fff0604 3ffef640
3fff0590: 3fff05e0 3ffef420 00000001 40209806
3fff05a0: 3ffeee00 3ffef4bc 3fff05e0 4020b448
3fff05b0: 3fffdad0 3ffef584 3fff061c 40208cdd
3fff05c0: 3ffe87d1 00000064 00000005 3ffef640
3fff05d0: 3fffdad0 3ffef584 00000005 402026d1
3fff05e0: 3ffe9008 00000003 0004f404 40202101
3fff05f0: 00000000 3ffeedd8 3ffef420 00000000
3fff0600: 4010527c 3fff17cc 0000001f 0000001e
3fff0610: 3fff1934 00000026 00000001 3fff1794
3fff0620: 0000002f 00000026 3fff176c 0000001f
3fff0630: 0000001e 00040410 00000001 3ffef640
3fff0640: 3fffdad0 00000000 3ffef638 4020272a
3fff0650: 3fffdad0 00000000 3ffef638 4020b55c
3fff0660: feefeffe feefeffe 3ffef650 40100718
<<<stack<<<

try:

if (pub.has_stream()) {
  uint8_t buf[BUFFER_SIZE];
  int read;

  /*
   * 尝试解决mqtt大数据包下,重启问题
   */
  //wifi_set_sleep_type(NONE_SLEEP_T);
  //cli(); //IRQ Disable
  //wdt_disable();


  while (read = pub.payload_stream()->read(buf, BUFFER_SIZE)) {
    //delay(1);
    yield();
    wdt_reset();
    while(!Serial.availableForWrite());
    {
      yield();
    }
    Serial.write(buf, read);

    //delay(1);


  }
  pub.payload_stream()->stop();

can't solve the problem。

@lable lable changed the title data trigger watchdog reset large data trigger watchdog reset Jul 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant