Problem with reading PIO_ISR interrupt service register (SAM)

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry this is a SAMS70 chip related question.  But this may have an equivalent in AVR. 

I have this interrupt code in Atmel Studio:

 

void external_irq_0_interrrupt()
{
InterruptFlags|=portabase->PIO_ISR;
zcross();
}

 

This interrupt is called when any bit in the PIO_ISR register is set.  If i put a breakpoint on the zcross() line and I examine InterruptFlags, it is always 0.  However, if I wave my cursor over portabase and scroll down to PIO_ISR, then that register shows it contains 0x00000001 which is correct.  If I wave my cursor over PIO_ISR itself it says "PIO_ISR could not evaluate".  In addition PIO_ISR is suppose to be cleared to all 0 whenever it is read.

 

Does anyone have a clue as to what is going on?  Thanks.

Last Edited: Sat. May 22, 2021 - 02:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moved to SAM's forum, I think earlier there was a problem accessing those forums, at least I had a problem.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly