SAME54 vs UC3

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

I am a bit puzzled lately. Trying to port a successful project from UC3A1256 to SAME54N20 chip...

We have a some software simulated PWM going on, which uses two timers.....1 timer interrupting at 50us and another timer interrupting at 100us.

We had no trouble doing this in UC3A. But it seems to me SAME54 cant even cope with only one of these timers activated? like the 100us timer? The CPU just seems to starve to death!

 

Is this expected? These ARM chips are no good at handling fast interrupts?

I should have mentioned, I am running SAME at 120Mhz CPU clock. And UC3 was run at 66Mhz.

Last Edited: Sun. Jul 3, 2022 - 01:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Should work.  Are you remembering to reset the interruot flag before the return from the isr?  I think there are fewer “reading the xyz register automatically resets the interrupt on most ARM chips.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes i am resetting. If i slow down the timer freq, interrupt has no issue.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 The unavoidable part of interrupt processing on ARM CM4 should be about 24 cycles (assuming an unrealistic 0 wait states) - half on entry and half on exit.  More if you've enable floating point without lazy stacking, or are using floats in your ISR (up to about 60 cycles.)  That should still be a small part of 50us, at 120MHz.

 

Impossible to say more without seeing your actual code.