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.

CCS/TMS570LS0432: HET-Memory access

Part Number: TMS570LS0432
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hello,

I am capturing a frequency with the HET timer repeatingly in a loop.

If I disconnecct the wire though, it always reads the same period and duty (of the last measurement). 
Is there a way to delete the memory after reading it? 

I tried to write a zero in the adress space of the value with

signal.period = 0;
signal.duty = 0;

but this didn't work. (I assume you only have rights to read the register)

Thanks for your advice and suggestions.

Christian

  • Hello,
    You can enable Automatic Read Clear Feature of PCNT instruction. This will automatically clear the data field immediately after the data field
    is read by the external host CPU (or HTU). This feature is implemented via the control bit, which is located in the control field (bit C26).
    See Section 17.2.4.3 of device TRM.

    Best regards,
    Miro
  • Thanks Miro.

    How can I set the control bit?

    I tried to change the Halcogen code for the used instructions (/*Control*/ from 0x00000000 to 0x02000000) but this didn't change anything.

    Furthermore this would be erased, if i load the halcogen project again, because it isn't written in the user code section..

    I also tried to set the bit, but this doesn't work because the whole struct is a constant, so you can't change its value:

    Is their a feature in halcogen to set this bit? Or how can I change it?

    Best Regards 

    Christian

  • Hello Christian,
    Bit that needs to be changed is bit26 - 0x04000000
    Yes, HALCoGen will overwrite your settings ig you generate code again. You can write your own program using HET IDE instead of using HALCoGen generated.

    Best regards,
    Miro