How to read dct in external flash

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
agmi_3321141
Level 4
Level 4
5 likes given First like received First like given

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?

0 Likes
1 Solution

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.

View solution in original post

0 Likes
3 Replies
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

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

0 Likes

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?

0 Likes

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.

0 Likes