Hi @saranbabu
I hope you are doing great!
I got some points to check my understanding:
- You are intending to use both NOR and NAND memories : NAND will be used for file system (on FlexSPI1 ) and internal NOR one will be used for hold new firmware (on FlexSPI2)
- NOR will be the 4MB NOR SIP flash in the RT1064 package.
#1: after the OS got initialized, ROM APIs are not working
Probably, the OS interruption (Systick interrrupt in most cases) is causing troubles when doing write operations. Please try to disable interrupts when using ROM API and test. Also if you could provide an screenshot of the problem could be helpful.
#2:I referred the SDK flexspi_nor_internal_polling_transfer source code, I tried to use this same code for access the NOR flash memory.
Ok, I double checked latest SDK 2.12.1 and the demo comes for FlexSPI2 interface on RT1064.
#3) What is the other way to access the NOR flash memory(internal flash memory)?
To write NOR flash from application , there are only two ways, that you already tested : ROM API and FlexSPI demos.
#4) Is there any other problem is causing due to both the memories are accessing flash port A1?
Here is where I want to check my understanding, the internal 4MB flash memory can only be connected to FlexSPI2. In other words you can not connect another memory to FlexSPI2. You only have FlexSPI port available for external memories.
#5 Does this operating system is disturbing the ROM bootloader location(0x0020001
As mentioned in @#1, we need to first take care of disabling interrupts. Also, you need to leave 64KB of OCRAM for ROM operation.
All the best,
Diego