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.
Hello,
TRM SPNU563A dated March 2018 specifies in chapter §19.5.3 that
Initialization of VIM RAM vector table is only needed in case vectored interrupts are used, and that index interrupt management does not need the table to be initialized.
Based on the TRM and as we planned to use irq index interrupts mode (SCTRL.VE=0) we skipped the RAM VIM init on purpose, and faced a lockstep VIM Bus compare error (ESM 2.25) on first unmasked irq occurence (RTI compare for the first real time tick in our case).
After analysis I noticed that even in case System Control Register SCTLR.VE bit is set to zero, the table is still accessed to update IRQVECREG and FIQVECREG alongside IRQINDEX, which could explain the compare error as VIM RAM table is in unknown state after power on.
It seems to me that register vectored mode is activated in case SCTLR.VE is set to zero, thus leading to access to VIM RAM table to update xxxVECREG regisgters.
Can you please confirm that VIM RAM shall be initialized unconditionnaly to avoid VIM bus compare errors ?
If confirmed the followinglocations might require an update : SPNU563A end of §19.4.2 and §19.5.3
Thanks for your support,
Regards,
Franck.
Hi QJ,
I am not sure to understand your answer and how to enable the register vectored interrupts.
It seems to me that either we are in { irq index + register vectored interrupts mode } in case SCTRL.VE = 0 or hardware vectored interrupts in case SCTLR.VE=1, and that means that vector table is always used and that RAM VIM shall be initialized unconditionally.
Can you please clarify? In case I set SCTLR.VE to 0, do I need to initialize VIM RAM vector table ?
Thanks,
Franck
Hi QJ,
As explained in the initial post not initializing the RAM VIM while staying in index interrupt mode (STLR.VE = 0) without initializing VIM RAM leads to lockstep VIM compare error.
I confirmed by tests that what I observe on target is not what we both understand from the TRM, as even in case System Control Register SCTLR.VE bit is set to zero register vectored interrupt mode is active and the table is still accessed to update IRQVECREG and FIQVECREG (confirmed by tests on target with dummy values in RAM table) alongside IRQINDEX, which could explain the compare error as VIM RAM tables is in unknown state after power on.
Can you please clarify with design team ?
Thanks for your support,
Franck
Hi Franck,
Checked with design guy, and confirmed that the inputs to VIM comparator are the addresses from 2 VIM RAMs. Even the VIC is disabled (from CPU side), the addresses are still fed into comparator. In order to avoid failure due to the random state in which VIM RAM powers up, the VIM RAM has to be initialized.
I will submit a request to remove the sentence from the TRM:
"This initialization is only required when vectored interrupts are used, index interrupt management does not need the table to be initialized."
Thank you!
Hi QJ,
Thanks for the investigation and the confirmation that I shall initialize the VIM RAM.
Best Regards,
Franck.