Forum Discussion
Altera_Forum
Honored Contributor
16 years agoI am quite new to the NIOS programming and being a bit
paranoid I use IORD_32DIRECT almost all of the time (thinking about the NIOS cache and anything else I barely heard of). Here the offset has to be given in bytes => 0x1C would be the 7. I thought that it had to be 0x7 since it's the most recent retrigger event but since I only see zeros there, you seem to be perfectly right. -------------------------------------------------- Before my post I have done complete readouts of the memory content : after Factory->App@0x80000 (working) 0x00000001 0x00000000 0x00000000 0x00000000 0x00000008 0x00000000 0x00000000 0x00000000 0x00000001 0x00000000 0x00000008 0x00000000 0x00000008 0x00000000 0x00000000 0x00000010 after App->Factory@0x00000 (working) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x05080000 0x00000000 0x00080000 0x00000000 0x00000000 0x00000001 after Factory->App@0xC0000 (nonWorking)->Factory 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x010c0000 0x00000001 0x000c0000 0x00000000 0x00000000 0x00000008 -------------------------------------------------- The first value is 1 in application mode and 0 in factory mode (seems to work). After the switch from application to factory mode (2nd) the trigger reason is 1 => runconfig => would be OK After the switch from factory mode to a faulty config (3rd) the trigger reason is 8 => crc_error => would be OK The problem I am having is that I made these tests and then I changed the addresses and repeated the test and I got all kinds of codes at the specified place 0x1,0x2,0x4,0x8,0x10. .... <<< THINK THINK THINK THINK >>> .... I read out the values above in a row. Do I have to make pauses in between ? The update has the wait_us(...) so do you have to give the circuitry time ? I see different values when I read out 20 in a row and when I read them out one at a time. => I will look into that.