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/TMS570LS1227: het pin het1[26] as external falling edge interrupt , the EMIF write fuction in the ISR can't take effect each time

Part Number: TMS570LS1227
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

I'm use het pin het1[26] as the external falling edge interrupt source for TMS570LS1227.

The ISR function is like this, there is a timer to confirm the time of interrupt and the time of successful EMIF_write.  

edge_notificaiton

{

timer++;

...

EMIF_wirte{timer};

}

the total number of ISR service is correct ,because the timer  value in the memory is like  1 1 3 3 5 if the total falling edge from the pin is 5 which can be seen from the oscilloscope.

So the question is how the Het interrupt disturb  the EMIF_wirte?

By the way ,if I use GPIO as the external  interrupt source , this phenomenon disappears.

  • Hello,

    So the EMIF_write call inside the ISR sometimes fails when the HET is used as an interrupt source, but works 100% of the time if a GPIO is used as the interrupt source? Is my understanding correct?

    What are you interfacing to with the EMIF?

    Have you tried reducing or increasing the values of W_SETUP, W_STROBE, R_SETUP, and R_STROBE?

    I don't understand the 1 1 3 3 5 sequence, if you are incrementing the variable "timer" variable by one each time, shouldn't it be 1 2 3 4 5? Could you please clarify?

    Regards,
    Sahin

  • 1.It really works 100% of the time if a GPIO is used as the interrupt source. What's the difference between the 2 kinds of interrupts?

    2.The emif port is interfacing to a comunication chip like dual port ram.

    3.The value of those registers works well if I use gpio interrupt. So I didn't try to change them.

    4.The timer is set to increase one by one.So the correct sequence should be 12345.It repeats ocacsionally when I use het interrupt and the sequence appears like 11335 which means emif write fails at that time.I think the timer is all right because the end num is good.

    5.Is there a standard proceess of dealing with het interrrupt ISR which differs from the gpio one?

  • The process is the same for HET interrupts. 

    Could you please provide more snippets of your code and the HALCoGen configuration for the HET pin. It is not clear from the information given so far what the issue could be. 

    How are you reading the sequence? Are you storing it into an array? If the sequence is 11335, doesn't that indicate the program never entered the ISR since that is where you are incrementing timer? In which case EMIF_write() would also not be called?

    Regards,
    Sahin

  • The HALCoGen configuration for the HET pin is as below.

    Could you please check the configuration?

    Many thanks!

  • Hello,

    A couple of things:

    • In the configuration in the second picture you are tying input pins 26 and 27 together.
    • Pin 26 is configured as pulled-down, and the interrupt is configured to trigger on a falling edge. Are you pulling this pin up at some point?

    Regards,
    Sahin

  • Hello,

    Any update on this issue?

    Regards,
    Sahin

  • hello,sorry for  being away for a while.

    My new progress is that the Pin 26 interrupt dosen't work sometimes which looks like the het ISR dosen't serve at that time.

    Here's the oscilloscope record.

     The green line is the signal of pin het26, the yellow one is EMIF CS pin and the blue one  is EMIF R/W.

    Sometimes the green line's gone down but EMIF CS pin's falling edge missed which should have gone down because the EMIF fuction should execute.

    Actually the ISR dosen't work sometimes. Any possible bad configrations for the het interrupt?

    Thanks!