Unable to access the Flash memory of IMX RT1170

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to access the Flash memory of IMX RT1170

774 Views
Ragnar
Contributor III

Hello,

            I'm using an IMX RT1170 EVK board for the product development and while I'm trying to access the flash memory which will starts form the address 0x30000000. I'm getting Hard fault and Bus fault.

Ragnar_0-1703949424597.png

 

CPU_MIMXRT1176DVMAA
CPU_MIMXRT1176DVMAA_cm7
DATA_SECTION_IS_CACHEABLE=0
_DEBUG=1
SDK_DEBUGCONSOLE=1
XIP_EXTERNAL_FLASH=1
XIP_BOOT_HEADER_ENABLE=1
USB_STACK_FREERTOS
USB_STACK_FREERTOS_HEAP_SIZE=32768
CACHE_MODE_WRITE_THROUGH=1
FSL_OSA_BM_TASK_ENABLE=0
FSL_OSA_BM_TIMER_CONFIG=0
MCUXPRESSO_SDK
FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1
SDK_OS_FREE_RTOS
SERIAL_PORT_TYPE_UART=1
CR_INTEGER_PRINTF
PRINTF_FLOAT_ENABLE=0
__MCUXPRESSO
__USE_CMSIS
NDEBUG
__REDLIB__

 

As I'm using the FreeRtos, I'm disabling the interrupts too while accessing the flash  

Ragnar_1-1703948761641.png

Please let me know do I need to change anything in the code or preprocessor

Thanks in Advance.

 

Regards,

Ragnar.

 

0 Kudos
6 Replies

597 Views
Ragnar
Contributor III

 

Hi @Kan_Li ,

I have tried integrating the ROM_API with the DFU example.

But after integrating before initializing the DFU I'm able to erase the flash. But when I try to write to the flash it is failing.

After initializing the DFU both the read/were failing.

Ragnar_0-1705577222606.png

Ragnar_1-1705578876106.png

 

Regards,

Ragnar.

0 Kudos

737 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Ragnar ,

 

Actually the DFU demo starts from 0x60000000, so do you want the demo erase itself from the flash? Please kindly clarify.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

725 Views
Ragnar
Contributor III

Hi, @Kan_Li 

                 I think in RT 1170 the flash address starts form the 0x30000000 and I don't want to erase the whole flash but just a particular portion which is empty and want to write the downloaded firmware through the DFU to a specified flash address. 

Hare are my MCU settings.

Ragnar_0-1704176912131.png

 

Thanks & Regards,

       Ragnar.

0 Kudos

699 Views
Ragnar
Contributor III

Hi @Kan_Li ,

              evkmimxrt1170_flexspi_nor_polling_transfer_cm7 in this example I'm able to perform R\W operations on flash but when I integrated it with the DFU example in the USB examples I'm getting the above-mentioned errors.

Regards,

Ragnar.

0 Kudos

676 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Ragnar ,

 

I would recommend using the ROM API for the integration . Please kindly refer to boards\evkmimxrt1170\driver_examples\fsl_romapi for details.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

603 Views
Ragnar
Contributor III

Hi @Kan_Li,

               I will try the example you said.

Thanks & Regards,

      Ragnar.

0 Kudos