This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

VIM parity error



Hello,

I am testing the VIM parity error in TMS570LS31x/21x. I do this test by enabling TEST field in PARCTL register and changing the VIM parity memory. When reading from VIM memory I can see that function register FBPARERR is called. Also ESM errors for VIM parity are signaled. Inside this interruption (FBPARERR) I restore the VIM memory.

My question is:

Is there any way of having the original interruption called? I mean, lets say that there was a CAN or SPI interruption. But the corresponding vector could not be called as a parity error was detected in the VIM memory. Instead the vector in FBPARERR is called. So, after the VIM memory is restored, how could I get the original interruption called by the CPU, without me checking all flags to find out what was the interruption that happened?

Thanks,

Francis.

  • Francis,

    The VIM module does not provide this feature. If a vector is corrupted, the fall-back FBPARERR handler is called.

    If I understand your process, in the FBPARERR handler you are correcting the VIM RAM by re-writing to correct vector in the VIM RAM. At that point you are in exception  mode, so why not calling the exception handler to service your exception?

    Please let me know if this makes sense.

  • Hello Jean-Marc,

    Thanks for your help. No, I do not want to call any exception handler to service the exception, the VIM fall-back handler is ok. What I would like is that after the VIM fall-back handler the "original" interruption would be serviced. e.g.

    1) SPI data is received and an interruption is raised.

    2) Micro tries to load the address of the the SPI data received interrupt handler but it detects a parity error in the VIM memory so it call the VIM fall-back address.

    3) My VIM fall-back address initializes the whole VIM vector interruption table to fix the parity error.

    When function in point 3 returns nothing else happens and what I would like to know is if it is possible that the SPI data received interruption is called (automatically, with me finding out what was the interruption for which the VIM fall-back vector was called).

    (SPI data received is just an example, it could any CAN, NHET, etc.....)

    If we do not perform a 4th step to call the correct interruption it would mean the the interruption would be missing, the corresponding flags would not be cleared and this interruption would maybe never happen again.

  • Francis,

    Have try your sequence after point 3 and confirm that the SPI data receive interrupt is not called?
    The request should still be pending and the VIM should try again, and that time the memory is (should) not be corrupted any more.

    If you confirm this point, my suggestion is, before leaving the VIM fall-back vector,  call your SPI receive handler.
    The VIM registers the VIM RAM address that causes the parity error so you know exactly what was the handler to call. There is no need to look for all pending request.

    I will create or try to find a test case that covers this scenario to check on my side.

    Just to clarify, in your latest post you said:
    "(automatically, with me finding out what was the interruption for which the VIM fall-back vector was called)."
    I assume you meant to say:
    "(automatically, without me finding out what was the interruption for which the VIM fall-back vector was called)."

  • Hello Jean-Marc

    I have tried using DMA transfers. I have tested that without a VIM parity error I get the block transfer complete interruption called. If I introduce a parity error the VIM fall-back interruption is called, there I restore the whole VIM vector table, clear bit 0 in PARFLG and also clear ESM error for vim parity. After that the DMA block complete interrupt is called. So, yes, you were called interruption would be called. Thanks for your help. 

    Sorry for the misunderstanding, before I did another test.

     

  • Francis,

    Good to heard that it is working now.

    Can you please mark my answer as verified so we can close this thread.

    If you have any other question, please start a new one.