If I flash the chip with an image with a boot partition size (so there is a data partition), everything completes successfully. When I run as an XCore application, it works once. When I run again, the data partition size is showing as 0. In effect, I have to re-flash it before every run. I thought that the problem may be the flash device so I wrote a configuration file, but I am not quite sure how to actually use it. The file:
Code: Select all
10, /* 1. libflash device ID */
256, /* 2. Page size */
512, /* 3. Number of pages */
3, /* 4. Address size */
4, /* 5. Clock divider */
0x9f, /* 6. RDID cmd */
0, /* 7. RDID dummy bytes */
3, /* 8. RDID data size in bytes */
0x103011, /* 9. RDID manufacturer ID */
0x20, /* 10. SE cmd */
0, /* 11. SE full sector erase */
0x06, /* 12. WREN cmd */
0x04, /* 13. WRDI cmd */
PROT_TYPE_SR, /* 14. Protection type */
{{0x0c,0x0},{0,0}}, /* 15. SR protect and unprotect cmds */
0x02, /* 16. PP cmd */
0x0b, /* 17. READ cmd */
1, /* 18. READ dummy bytes */
SECTOR_LAYOUT_REGULAR, /* 19. Sector layout */
{32768,{0,{0}}}, /* 20. Sector sizes */
0x05, /* 21. RDSR cmd */
0x01, /* 22. WRSR cmd */
0x01, /* 23. WIP bit mask */
Code: Select all
fl_DeviceSpec W25X10BV[] = {
{
#include "w25x10bv"
}
};
r = fl_connectToDevice(flashSPI, W25X10BV,1);
Code: Select all
xrun: Program received signal ET_LOAD_STORE, Memory access exception.
[Switching to stdcore[0] hwthread 4]