This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDS243GPEVM: OSPI Flash access problem

Part Number: TMDS243GPEVM

I'm trying to add flash support to my project (FreeRTOS, two tasks, one ISR (triggered by ADC0)).

In Sysconfig I have added the Flash driver from the TI BOARD DRIVERS section. From the ospi_flash_io example I have taken the function calls to read, erase and write.

Flash acces happens in the lowest priority task.

Reading from flash appears to work:

    Flash_read(gFlashHandle[CONFIG_FLASH0], offset, (uint8_t *) &para_save_hdr, spi_p_size);

where offset is 0x200000.

The write sequence is as follows:

  Flash_offsetToBlkPage(gFlashHandle[CONFIG_FLASH0], offset, &blk, &page);
  Flash_eraseBlk(gFlashHandle[CONFIG_FLASH0], blk);
  // Flash_write(gFlashHandle[CONFIG_FLASH0], offset, (uint8_t *) &spi_para_start, spi_p_size);

As soon as I uncomment the call to Flash_write() I end up in HwiP_data_abort_handler(void) in HwiP_armv7r_handlers_freertos.c.

Any hints on what I could be doing wrong would be appreciated.

Best regards,

Johannes