3 Replies Latest reply on May 26, 2020 9:25 AM by RaktimR_11

    How to read dct in external flash

    agmi_3321141

      Hi, My app uses internal DCT for operation. There is also an factory reset app with its DCT which is stored on the external flash when I use "download_apps" . How can I access and modify this external DCT? The structure of all DCTs is the same. The brief for wiced_read_lock states that:

      "

      * The operation of this function depends on whether the DCT is located in

      * external or internal flash memory.

      "

      So using this function call gets access to the internal DCT. How can I modify the external one?

        • 1. Re: How to read dct in external flash
          RaktimR_11

          You can call the same function w/o any modification; the second argument is ignored. For clarity sake, you can use WICED_TRUE in your use-case. WICED already takes care of the int/ext flash conundrum in 43xxx_Wi-Fi/WICED/internal/waf.c. If you have further doubts regarding the same, try looking up the definition of wiced_dct_read_with_copy in 43xxx_Wi-Fi/WICED/platform/MCU/wiced_dct_internal_common.c and 43xxx_Wi-Fi/WICED/platform/MCU/wiced_dct_external_common.c

          • 2. Re: How to read dct in external flash
            agmi_3321141

            Thanks. As I mentioned in the post, the problem is that my app uses internal DCT, so the external flash modification functions(in dct_external_common) are not compiled. What I would like to do is read/write some parameters onto the external DCT that is flashed alongside the FR_APP. It doesn't look like I can directly use the read function as there is no option to select the external vs internal flash (during runtime). I need both internal and external DCT read/write functions. I might have to explicitly pull in the external dct read function if I have to do that?

            • 3. Re: How to read dct in external flash
              RaktimR_11

              Yes, we have used external dct only for 90x based devices. Based on your statement, it seems to me that you are on a STM32 based platform or similar. In that case, you can explicitly compile the dct_external_common and then try to do the read operation. A simple way to do that can be using EXTERNAL_DCT := 1 in your platform makefile and take care of the remaining compiler errors like SFLASH_ID etc; because this was not originally designed for int/ext flash runtime choice.