Hi,everyone, I have encounted a problem about an operation towards SRIO register--Port Error and Status CSR n (SPn_ERR_STAT): During SRIO transmission, I found that the 4th bit(PORT_WRITE_PEND) in SPn_ERR_STAT was 1. In order to clear this bit,I wrote 1 to this bit. But when I used 'printf' to print out the value of the 4th bit, I found it was still 1, not 0 as I expected. As the following example shows:
// my program
printf("SRIO_REGS->PORT[1].SP_ERR_STAT = 0x%08x\n",SRIO_REGS->PORT[1].SP_ERR_STAT);
tmp = SRIO_REGS->PORT[1].SP_ERR_STAT;
SRIO_REGS->PORT[1].SP_ERR_STAT = tmp;
printf("...SRIO_REGS->PORT[1].SP_ERR_STAT now is 0x%08x\n",SRIO_REGS->PORT[1].SP_ERR_STAT);
//results seen from output window:
SRIO_REGS->PORT[1].SP_ERR_STAT = 0x00000012;
...SRIO_REGS->PORT[1].SP_ERR_STAT now is 0x00000012;
Is there anything else(for example, some registers not reset) I have ignored? Thanks for your attention.