Return from Interrupt

28 Nov 2010

Can anyone tell  me  how the  mbed Interruot API's know when an ISR  is  commpleted?  do  I use interrupt(NULL)  at the start of the ISR  and then  re-attach it at the end of the routine  (I  dont  seem  to be getting  much  success  with that approach).

 

Problem I  have is I  am  going  into an ISR  and  just  sitting there  for  some reason.

 

Thanks

28 Nov 2010

see my last post on your other thread :) You don't need to know about how the ISR returns, Mbed libraries manage it for you. Liek I said in the other thread, you have a lot of wait_ms() and printf()s inside the InterruptIn callbacks. Not such a good idea.

28 Nov 2010

I   have  removed the  the  printf  statements and  am  now  'looping',  so  some  progress.  I  will not  be able to get away  withour  some small  (i.e. us)  waits  but  I  will try to  optimize  this  next.

28 Nov 2010

The datasheet says the max SCLK frequeny for the PGA2320 is 6.25MHz. Looking at the setup and hold times I see they are all sub-microsecond. So any tiny delys you need, 1uS ought to be enough.