Interrupt problem with write buffers

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Interrupt problem with write buffers

804件の閲覧回数
berndsirozynski
Contributor III

 

!!! never clear Interruptflags at the last line of interrupt function

 

One time more, i have found that the LPC serie has a big timing problem if clearing interrupt flags .

This problem only occures if you clear the Interrupt flag at the very last line of your interrupt function

and additional you set the compiler optimization to -O3

 

The processor needs time to clear the internal interrupt flag, but before the interrupt flag

was cleared we get a next interrupt.

 

This problem i have found in the LPC1768 and LPC1347

 

To solve the problem you need only a litte bit time or you clear the interruptflag

NOT at the very last line.

Now i always put the "DSB" instruction after clearing the interrupt flag in my functions.

 

 

In my currently project i get a I2C interrupt and the status ist 0xF8

this is an mismatch status and not described in the manual.

i think the error is an result of the internal write buffers of the CPU.

 

if i use one of the following action it works fine.

  1. a) clear interrupt flag NOT at the last line
  2. b) do an dummy operation after clearing the interrupt flag
  3. c) do not use the compiler optimization
  4. d) use an "dsb" instruction after clearing the interrupt flag

 

 

i think this behavior must described in the user manual.

0 件の賞賛
返信
1 返信

718件の閲覧回数
soledad
NXP Employee
NXP Employee

Hi,

Thank you for your feedback, we will check this issue.

Regards

Soledad

0 件の賞賛
返信