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.

Accessing NOR Flash using my application

Hi,

We are using DM8148 in our board. We have connected a NOR flash on the Board. NOR flash is my data flash (NOT as Boot Flash) . For the requirements in application, I need to store some large amount of 16 BIT configuration parameters in to the NOR flash. I need those parameters in my application. I may modify them from the application on user request.

I referred CCS NOR Writer source code. The CCS NOR Writer cannot be used for my discrete reads and writes from the application 

Now as experiments on my purpose first I configured the GPMC registers(values I got from the CCS NOR Writer) to access NOR flash. I am using mem_rdwr.out utility provided by the DVR_RDK. I programmed GPMC registers using the same utility. Using this utility I am able to successfully read data from NOR flash (The data written using CCS NOR writer). My issue is I am unable to write to NOR flash. I am unable to perform CFI query also. After some study I understood that mem_rdwr.out utility will allign the address given by user to 4 byte alignment. To write into NOR flash, or read device ID or manufacture ID, I should send some series of commands on the address and data bus on the NOR. Those values to send on the Address bus are not 4 byte aligned. So mem_rdwr utility is aligning them to 4 byte. But as per NOR data sheet those commands are madatory. So I peeked into mem_rdwr.out source code and removed the 4 byte alignment. But after doing, if a give a address which is not 4 Bit aligned, it is throwing an error "Alignment Trap".

Is my approach for writing to NOR flash is correct ??

If my approach for accessing NOR flash is correct, how should I proceed further. Is there any other utility which can perform writes to not 4 byte alligned address or can I use same mem_rdwr utility by doing further modifications??

If further modifications required can you please guide me ??

Please help me.