This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MQTT Reset ?

In the release notes for the IOT SDK (which as the MQTT examples) it says: "Once BLE link is disconnected, lwIP example applications no longer get a global prefix. The only way to start using the examples with the global prefix again is to restart the application." I need to disconnect the BLE link but must also preserve some application settings through the reset.

Thanks for the help. --jim schimpf

  • Found a workaround. If I modify the linker file to this:

    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x1f000, LENGTH = 0x61000
      /* Save area for config data */
      CONFIG(rw) :  ORIGIN = 0x20002800, LENGTH = 0x0100
      RAM (rwx) :  ORIGIN = 0x20002900, LENGTH = 0xd700
    }
    

    SECTIONS {

        .mysaveBlock 0x20002800 (NOLOAD) :
    {
        KEEP(*(.mysaveBlock))
    } > CONFIG
    

    }

    and then define the variable I need to save as:

    PEG_CONTROL __attribute__((section (".mysaveBlock"))) pegControl;
    

    This area (256 bytes) is NOT cleared on RESET and so retains my values.

Related