writing a word to cfm1 using on chip flash ip on max10
hii i have the neek board development kit , and i am writing my own logic to perform a writing of an image to cfm1 flash sector for remote update
i am transferring the image through uart from rpd file just like in nios rsu example lab .
i configured the on chip flash ip in this parameters
data interface :parallel
read burst mode :incrementing
read burst count:8
configuration mode :dual compressed images
i set the burstcount to 1
I managed to erase the CFM1 sector, and I read the status register to confirm that the erase of sectors 3 and 4 was successful. Sector 3 + 4 corresponds to CFM1.
Before performing the write operation, I verify that the on-chip flash is in the idle state by reading the CSR status register.
I place the word on the data_writedata signal of the Avalon bus with the correct address, assert the data_write signal, and then wait until waitrequest goes low before proceeding to the next word. I confirm that the write was successful by reading the ‘write successful’ bit in the CSR status register.
but sometimes in the middle of the file transfer , i get a write failure and i am not sure why , my clock on board is 50 mhz and i am using pll to generate 75mhz.
so i i am feeding the 75mhz clock to the on chip flash ip and my own writing fsm logic
Using SignalTap, I can see that the word before the one where the write failed was written successfully.
I send each word over the UART interface with a delay of 2.5 ms, which I believe is sufficient for the write to complete. I also check the waitrequest signal before proceeding to the next word and verify that the on-chip flash is in the idle state.”
I would be thankful to know why I am getting a write failure and what I should check to resolve this issue?
thanks