Forum Discussion
Altera_Forum
Honored Contributor
16 years agoCyclone IV E remote update +epcs+cfi_flash
hi all,i want to use epcs and cfi_flash to switch applications.
my firmware and software are stored in sd card. 1. read application's firmware from sd card ,then write epcs. (i have converted sof to bin) 2. read application's software from sd card ,then write cfi_flash (i have converted elf to bin) 3. excute remote_update in epcs the result is no good. it seems that the software don't boot successfully. if i do that like following: 1. read application's firmware from sd card ,then write epcs. (i have converted sof to bin) 2. power up again 3.read application's software from sd card ,then write cfi_flash(i have converted elf to bin) 4.excute remote_update in epcs the result is good. why ??? 'power up again' make the software boot successfully???3 Replies
- Altera_Forum
Honored Contributor
From what you've described, the only thing I can think of is that the EPCS flash device is not being put back into a read mode. Cycling power fixes the issue. You might try specifically putting the epcs back into a read mode before attempting to remote_update.
Jake - Altera_Forum
Honored Contributor
I have seen the application selector code in altera neek, so i have put back epcs read mode in my codde.
// Make sure the flash is in read mode IOWR_16DIRECT( EPCS_FLASH_CONTROLLER_BASE, 0, 0xFFFF ); IOWR_8DIRECT( EPCS_FLASH_CONTROLLER_BASE, 0, 0xFF ); but it is still no good! - Altera_Forum
Honored Contributor
the problem has been solved!
In my c code, I use 'alt_write_flash_block ' API. my flash is 8M , consist of two regions. region0's block_size is 8192-bytes; region1's block_size is 65536-bytes; in the past, i operate region0 and region1 with 65536-bytes, so the error like my description occur. The right method should be: operate region0 with 8192-bytes; operate region1 with 65536-bytes; That's all, thank you!