SPI onBoard Network problem...please help

Peter KWS
Benutzer
Avatar
Geschlecht: keine Angabe
Alter: 42
Beiträge: 18
Dabei seit: 11 / 2011
Betreff:

SPI onBoard Network problem...please help

 · 
Gepostet: 18.04.2013 - 09:26 Uhr  ·  #1
Hi all, i have little proble with SPI onBoard NETWORK. my program (master and slave) is examle from elab(spimaster,spislave), all work fine! When i enable ext. interrupt an int0 pin in slave CPU, sometimes SPI report error and lost byte on LCD. It is possible use SPI and ext. int and timcompa interrupt one CPU at a time? slave CPU is mega8 and master mega16, i build Inductive load triac regulator with master(LCD,Analog,SPI,Buttons) and 4x slaves(Zerro cross, Triac drive,SPI) for outputs. thanks for answer, have nice day :) (srry for my english)
Merlin
Administrator
Avatar
Geschlecht:
Alter: 25
Beiträge: 1474
Dabei seit: 03 / 2005
Betreff:

Re: SPI onBoard Network problem...please help

 · 
Gepostet: 18.04.2013 - 17:03 Uhr  ·  #2
Hi Peter.

How much work do you do in your interrupt?

When you enter an interrupt all interrupts are disabled until the end of the routine.

Also with SPI you must remember that the slave MUST keep up with the master. The master generates the clock and the slave must keep up with it. My guess is that when you enable the interrupt the slave simply cannot keep up with the master. You could try slowing the master down, and try to keep the contents of the interrupt down to a bare minimum, maybe just a flag to tell the main program that it must act.
Peter KWS
Benutzer
Avatar
Geschlecht: keine Angabe
Alter: 42
Beiträge: 18
Dabei seit: 11 / 2011
Betreff:

Re: SPI onBoard Network problem...please help

 · 
Gepostet: 29.04.2013 - 09:06 Uhr  ·  #3
Ok, thank you for answer :) Have nice day :)
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 8 · Cache Hits: 14   66   80 · Page-Gen-Time: 0.023875s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI