Hi All,
I am using ti rtos tirtos_tivac_2_16_01_14 with CCS version 9.1. I am using external flash memory MX25L128 using spi along with FatFS file system using ROM APIs.
Previously I was using the buffer size of 512 and now I changed it to 4096 as the sector size of flash memory is 4096.
I changed it here-
#define _MIN_SS 4096 //512
#define _MAX_SS 4096 //512 in ffconf.h
This issue is a bit weird. I'll try to explain it.
I have created the CONFIG file, LOGSENT file, LOGFILE file in the flash memory. I am able to read/write/open ( fatfs API calls ) the CONFIG file and LOGSENT file. But when it comes to LOGFILE, I can only do open/write operations. When I try to read the log file, it is giving some weird error. I am attaching the 2 screenshots. One before the reading the LOGFILE, and one after reading the LOGFILE. I want you to see the debug window. After the f_read call, my function stack goes corrupt and I got an exception-
LOGFILE size 6807
Error:E_hardFault: FORCED
Error:E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: bebebebe
FSR = 0x0000
HFSR = 0x40000000
DFSR = 0x00000000
MMAR = 0xbebebebe
BFAR = 0xbebebebe
AFSR = 0x00000000
Terminating execution...
This only happens when I use the buffer size of 4096. If it is replaced to 512, everything runs fine. I have to use 4096 buffer size. Please let me know. Thanks