Quantcast
Channel: Altera Forums
Viewing all articles
Browse latest Browse all 19390

EPCS controlller does not get the Flash Transmit ready in bootloader

$
0
0
I am implementing a altera bootloader for multiple image (#image0(default) and image 1)
I have the custom bootloader in internal memory of my nios processor which is loaded in case there is a an application image#1 is running.
This boot loader gets loaded to a on-chip memory and then the execution control is passed to this bootloader.

The problem that I am getting is this:

When the control has been transferred to the bootloader. The EPCS flash status register is read by the EPCS controller to determine if the Flash is ready to accept data.
This flag is never set. the following code snippet shows the where I get stuck.

tx_ready_loop:
ldwio rf_temp, EPCS_STATUS_OFFSET (r_epcs_base_address)
d0: 92400237 ldwio r9,8(r18)
andi rf_temp, rf_temp, EPCS_STATUS_TRDY_MASK
d4: 4a40100c andi r9,r9,64
beq rf_temp, r_zero, tx_ready_loop
d8: 483ffd26 beq r9,zero,d0 <tx_ready_loop>

stwio r_epcs_tx_value, EPCS_TXDATA_OFFSET (r_epcs_base_address)
dc: 92c00135 stwio r11,4(r18)

r9 = 0xXXXXXXCA all the time.
thus I never get out of the loop. This code is the standard altera boot loader with some modification. I have checked all the addresses of the FLASH.
Everything is correct, but I cannot move forward and out of this loop.

I can boot correctly from the image#0. However , for image #1, I stay stuck in the loop.

Viewing all articles
Browse latest Browse all 19390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>