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.

MSP430F47186: Why shouldn't we use external I/O interrupt and polling together?

Hi,

 

On one of the forum, they said MSP430 doesnt allow pooling input pin in main loop while edge interrupt is enabled for it.

I couldn't see any restriction on the device datasheet like that. Also I couldn't find any information about how edges are detected internally.

Is there any chance to miss port edge interrupt? Because it doesn't provide level sensing interrupt, I found the module very tricky.

 

Thanks.

 

  • There is a possible reason for this. I dimly remember a problem with the interrupt register (not the input pin itself) where the edge-detecting hardware is unable to update the interrupt register when it is at the same time read by the processor. If this happens, the edge interrupt is lost.

    I can imagine that reading the port register at the moment f an edge event, may block the edge detection from working, but I doubt it. And never heard of it.

    A level-sensing interrupt would be counter-productive. You cannot make the level go away, so the interrupt would stay pendign even if you handled it. You had to disable interrupt when handling it, bu tthen you could possibly miss the next one. And what id you detect on both edges? It would mean permanent interrupt no matter of the level. Really doesn't sound good. :)

  • Hi,

     

    Level-sensing interrupts would be a good idea because you dont have any chance to miss any of them. You just need to change level wanted to be detected in your interrupt routine. No need to diable interrupt at all, and you would easyly detect both edges with a robust way. You can check what competitors are doing and why..

    Still I need detailed information how MSP430 catches edges internally and whether pooling a port input at the sametime may cause a problem like missing.

     

    Thank you.

**Attention** This is a public forum