issue when using external Flash

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

cross mob
lock attach
Attachments are accessible only for community members.
MaCa_2922036
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

Hello,

Working with:

Chip: 1LD 43438

Wiced: v6.4

I am facing an issue when I try to move from a project using internal flash only to the same project but using external flash.

I created 2 platforms with the only difference is one is used with internal flash, and the other one external flash. The files projects are the same.

the ONLY difference in the platform files are the following:

  • platform_config.h :
    • for the external flash platform, I have this additionnal line:  #define USES_RESOURCE_FILESYSTEM
  • PlatformwithIntFlash.mk :
    • RESOURCES_LOCATION ?= RESOURCES_IN_DIRECT_RESOURCES
  • PlatformwithExtFlash.mk :
    • RESOURCES_LOCATION ?= RESOURCES_IN_WICEDFS
    • DCT_IMAGE := $(OUTPUT_DIR)/DCT.stripped.elf
    • FILESYSTEM_IMAGE := $(OUTPUT_DIR)/filesystem.bin

Then I use makefile to build one or this other:

MyApp.PlatformwithIntFlash VERBOSE=1 download run

MyApp.PlatformwithExtFlash VERBOSE=1 WIPE=1 download_apps download run

Enclosed are the programming console output for both makefile.
With PlatformwithIntFlash :my App is running as expected (I can see my UART debug output):
Wiced-uartDebug-IntFlash.PNG
With PlatformwithExtFlash: Wiced seems to start but freeze during intialization :
Wiced-uartDebug-ExtFlash.PNG
=> I guess it miss some file for ressource systeme or wifi firmware.
Anyone could help me ?
0 Likes
1 Solution

Hello:

   If no WIPE enabled , all can run well, it may be having problems when executing erase act after compile again.

You can enable DEBUG_PRINTF in sflash_write.c to see if any problems happened,  I will do same act in my 43438 board.

View solution in original post

0 Likes
6 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

So the issue is using resource in filesystem, not on external flash ,  we can start a snip.scan with download_apps flag to see if all can run well.

0 Likes

I get the same result with the snip.scan as with my App:

Running as expected with internal flash platform, and get stuck with external platform after the step "creating packet pools".

Seems the issue comes from my platform files, no ?

0 Likes

If I compare my platform files with Murata 1LD original files, I disabled the usart6 and associated DMA and IRQ, as this uart seems to be used for debug only and as I don't use it (not connected on my schematic).


Could it impact ?

I also notice a change in build file and openOcd log when I compile with or without WIPE option. (on the left: with WIPE, on the right without WIPE)

  • the filesystem.bin is different

FileSystem.png

  • And the DCT seems to not be downloaded without WIPE option:

DCT.png

=> could you detail all the impacts of the WIPE option on compile and download operations ?
As it seems to work on external flash when I remove the WIPE=1 option .

0 Likes

Hello:

   If no WIPE enabled , all can run well, it may be having problems when executing erase act after compile again.

You can enable DEBUG_PRINTF in sflash_write.c to see if any problems happened,  I will do same act in my 43438 board.

0 Likes

Hello:

   I do not think you need to add WIPE to sflash , I have a compare with the log out, I think this is the reason why it will fail in the begginning.

pastedImage_0.png

left is ok without WIPE, right side gave wrong parameters.

0 Likes

So the WISE will erase the entire memory, and without WISE only the sector which need to be programmed are erased. Is it correct ?

I remove the wise and it seems to work.

I now have issues to write data to the external flash memory from my App running, but it is another problem I guess.

0 Likes