Hi Jeremy,
1) When running the code in the SDRAM, which shares the same SEMC port with the PSRAM and NOR, the code can access the PSRAM and NOR successful except FOR writing to the NOR, isn't right?
CORRECT
2) Does the writing NOR issue still happen when code running the internal RAM instead of the external SDRAM?
YES
3) Does this issue happen when only NOR connecting to the SEMC port?
YES
4) Did you ever try to write the NOR via IP command? If not, please give a try.
I tried that last night (after realizing that an AXIBUSERR was occurring), and that doesn't cause a hard-fault and I do see the proper chip-select and write line toggle as they should. I have not confirmed that the data is valid, but my guess is that it will be.
So, I spent almost a week on this...
Where is there documentation on this? As best I can tell there is nothing that states that writing to SEMC NOR directly is illegal (aside from the AXIBUSERR bit description in INTR). Section 25.5.5 mentions that a device could be accessed using IP command, but that's about it. Certainly nothing gave me a hint that direct write of NOR address space would cause a hard-fault exception.
Step further down to section 25.5.8 "NOR Flash Controller Operations" and it appears that this section was just cut-n-pasted from previous sections and never properly updated. For example, how does Figure 25-51 represent NOR Flash Address Map? Makes no sense to apply ROW/COL to NOR or PSRAM (section 25.5.9.1) for that matter.
It would be nice to get those sections of the reference manual updated.
UPDATE (more questions):
What is the purpose of IPCR2 and IPCR1 when using SEMC->NOR? Since we have to run in 16-bit mode, is IPCR1[DATASZ] set to 2 and IPCR2[BM0-3] set to 1100?
Ed