Hello Support,
In spnu199d.pdf [TMS470R1x device HET], I found the following section [Section 4.6, Page 41 First Paragraph]
Note:
Enabling or disabling the interrupt generation of certain instructions (BR,
ECNT, SHFT, WCAP) when the HET is turned on could falsify the operation
of these instructions. This effect is due to the possible modification of the
PRV bit by the HET during the read/modify/write of the CPU to modify the
control field.
I am unable to find similar comments in the spnu499.pdf.
Please help me understand why?
Does the above comments not appy for TMS570 NHET parts?
If not, then why?
Any better explanation will help me understand more about NHET.
Thank you.
Regards
Pashan
Hi Pashan,
If you look at these instructions such as BR, ECNT, SHFT and WCAP they all have the interrupt enable bit and the previous bit in the same control field. The previous bit is used as a status field by the HET to indicate the previous state of the specified pin. HET will compare the current pin state with the previous bit to know if a specifed edge (rise or fall) is detected before the instruction can take action for it. If you are dynamically writing to the interrupt enable bit during a read-modify-write operation you can accidently overwrite the previous bit. For example, right after you read the control field, the previous bit is modified by the HET and later on you write back to the control field will overwrite the previous bit. Since the previous bit is altered the instruction will not be able to do proper edge detection when the next time a real edge occurs at the pin.
In NHET, the logic does not look at the previous bit stored at the control field anymore. It relies on an internal flip flop sticky bit to store the previous pin state. So this will not be a problem to NHET. In addition, in NHET there is interrupt enable register that is memory mapped which can be used by the users to enable or dsiable the interrupt dynamically.
Please let me know if this answers your questions.
regards,
Charles
Hello Charles,
That means in NHET, Prv bit of Control Field is only Read_Only by CPU/HTU and NHET never uses it for any internal action/decision?
NHET always writes to PRV Bit of Control Field and never Read that bit from Control field. Is this statement correct?
Hello Pashan,
You understanding is correct that the NHET will still update the previous bit in the control field for compatbility reason but never really used the bit for any decision making. There is nothing to block the CPU from overwriting to the previous bit in the control field in NHET just like in HET. If CPU writes to the control field it can overwrite the previous bit. It is just that the NHET does not look at the previous bit for any decision making and hence there will not be any ill effect like in HET.