Попадаю в hardfault_handler при чтение данных из флешь памяти
Есть у меня вот такая структура .h:
typedef const struct {
const char name[20]; // имя
const char textExtension[4]; // расширение
const uint32_t size; // размер в байтах
const uniondate date; // дата
const uiniontime time; // время
const uint32_t numberSector; // номер сектора
const uint32_t crc; // контрольная сумма
const uint32_t reserve[5]; // резерв
} headerFileList[256];
extern headerFileList *HeaderFileList;
в .c определил:
headerFileList *HeaderFileList;
в main.c добавил следующий код:
char text[4];
HeaderFileList = ADDR_FLASH_SECTOR_7_BANK1;
for(uint32_t i = 0; i < 256; i++){
for(uint8_t j = 0; j < 4; j++){
text[j] = HeaderFileList[i]->textExtension[j];
}
}
Когда 'i' до 100 то данные считываются. Когда 'i' равна 100 и более происходит переход в 'hardfault'. Как такое может быть?