Hallo,
ich habe mir ein EK LM3S811 gekauft und möchte nun über die
SSI-Schnittstelle etwas ausgeben. Ich möchte nun anfangs die
Probe-Applikation aus dem User Guide verwenden und mit dem Oszi
prüfen, ob es wirklich funktioniert.
Doch bis jetzt habe ich es nicht erreicht, dass das Oszi etwas ausgibt.
Hier meine Programm, dass ich dazu verwende:
Danke für die rasche Antwort,
ich weiß, aber da diese Angabe direkt vom
User Guide entnommen ist, wundere ich mich wirklich.
Habe die Pin Konfigurationen übernommen, kann aber leider immer noch
nichts aufm Oszi sehen.
Auch die ursprüngliche Schleife:
1
while(pcChars[lIdx])
2
{
3
if(SSIDataPut(SSI_BASE,pcChars[lIdx]))
4
{
5
lIdx++;
6
}
7
}
verwundert mich, denn SSIDataPut ist eine Void-Funktion
und hat somit keinen Returnwert, aber wie soll dann die Schleife
überhaupt
ausgeführt werden ??
Versuche mal einen Pin zu togglen, um zu sehen ob das Programm auch
ausgeführt wird.
Deine Schleife aus dem ersten Post wird überhaupt nicht abgearbeitet,
weil lIdx auf 0 gesetzt ist und die Schleife aus dem DB sendet immer
das selbe Zeichen -> pcChars[0] -> 'S'
Der Code aus dem DB ist vielleicht für eine ältere Version der DriverLib
gedacht - SSIDataPut() ist wahrscheinlich jetzt SSIDataPutNonBlocking()
So, jetzt habe ich ein Beispielprogramm gefunden, dass zwar eigentlich
für das Development Kit LM3S811 ausgelegt ist, aber in diesem Beispiel
wird ebenfalls die SSI-Schnittstelle verwendet, um mit einem Atmel
EEPROM#
zu kommuniezieren. Das Programm läuft einwandfrei, nur komme ich nicht
dahinter
wie ich meinem jetztigen Code:
Wie sind denn SSI_RX und SSI_TX deklariert? Du musst auch noch den
Clk-Pin konfigurieren und dem SSI übergeben.
Wenn ich jetzt nichts übersehen habe, dann müsste folgender
Codeschnipsel funktionieren und andauernd etwas senden:
Aber leider kann ich immer noch nichts sehen.
Muss ich vielleicht noch einen Interrupt setzten?
Ich kann auch nicht mit dem Debugger das Programm einzelnen durchlaufen,
es wirkt fast so, als ob ich irgendwo in einer Endlosschleife drin wäre.
Hier noch einmal mein gesamtes Programm, wie es wirklich aussieht:
Jetzt weiß ich, wo mein Problem liegt:
Ich lande immer in einer Endlosschleife von Startup.c aufgrund
eines falschen Interrupts, aber was ich dagegen machen soll ist mir
immernoch unklar.