Forum Discussion
Altera_Forum
Honored Contributor
16 years agoIt seems to work now - yippie
I had a bit of a problem with the flash programming (some mean "compressed" options burried in Quartus) which led me to flashing over the upper part of the factory configuration. That was more or less the biggest problem ... ... hopefully - since I didn't change much more ... -> It's running now and I can quit in the middle of the update, falling back to the factory configuration. Thanks for your help. I think it would surely have taken some more time wondering about the values in user_mode (which are just invalid) and staring at offset 0x7 for the trigger reason. ---- if someone is interested for the c-implementation: --- void upgrade_start_user_config () { UINT32 tmp; tmp = IORD(base_address_for_upgrade_controller, 0x0 ); if (tmp != 0) return; tmp = IORD(base_address_for_upgrade_controller, 0xF ); // when we are starting with a normal reboot if (tmp == 0x00) { IOWR( base_address_for_upgrade_controller, 0x3, 0 ); wait_ms(1); IOWR( base_address_for_upgrade_controller, 0x4, (user_config_address >> 2) ); wait_ms(1); IOWR( base_address_for_upgrade_controller, 0x20, 0x1 ); wait_ms(1); } } ... is always called at the initialization and will * return immediately * if the code is placed in the user configuration (testing @offset 0) * if the trigger reason shows an error at the last boot * else trigger a reboot at the standard location for the user configuration -----------------------------------------------------