Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

TMS320F280023: How to use VCRC module simultaneously in interrupt and main loop

Part Number: TMS320F280023

1. In the main loop, use "CRP_run16BitPoly1Reflected" and in interrupts, use "CRP_run16BitPoly2".

2. Interrupted "CRC_run16BitPoly2" will cause VCRC calculation errors in the main loop.

3. Modify "CRP_run16BitPoly2" to save the VCRC value using VMOV32 before starting the calculation, and restore it after the calculation is completed.

4. The calculation of "CRP_run16BitPoly1Reflected" in the main loop is normal.

5. In subsequent testing, it was found that the VCRC calculation of the main loop and interrupts would have random errors.



6. Put "CRC_run16BitPoly1Reflected" and "CRC_run16BitPoly2" into the main loop for use, and the calculation is normal.

——————————————————————————————————————

Question: If I want to use the VCRC module in both the main loop and interrupt, how can I avoid calculation errors.

  • I cancelled the third step operation. But only when the VCRC module is used in both the main loop and interrupt, errors will occur.

  • Which compiler version are you using?

    Please refer to 3.14 of spru514, it discusses re-entrancy using VCU/VCRC, which is what you are trying to do here.

    What is --isr_save_vcu_regs set to? If it isn't, try setting it to On.

    Thanks,

    Sira

  • Part Number: TMS320F280023

    Hi Team,

    1. Use "CRC_run16BitPoly1Reflected" in the main loop and "CRC_run16BitPoly2" in the interrupt.
    2. The interrupted "CRC_run16BitPoly2" will cause an error in the VCRC calculation in the main loop.
    3. Modify "CRC_run16BitPoly2", use VMOV32 to save the VCRC value before the calculation starts, and then restore it after the calculation is completed.
    4. The calculation of "CRC_run16BitPoly1Reflected" in the main loop is normal.
    5. In subsequent tests, it was found that the VCRC calculations of the main loop and interrupts would make random errors.

    6. Put "CRC_run16BitPoly1Reflected" and "CRC_run16BitPoly2" into the main loop for use, and the calculation is normal.

    ——————————————————————————————————————

    Question: If I want to use the VCRC module in main loop and interrupt at the same time, how can I avoid calculation errors.

    --

    Thanks & Regards