25.12.2013 Aufrufe

Gecko3 - CCC Event Weblog

Gecko3 - CCC Event Weblog

Gecko3 - CCC Event Weblog

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

E.1. Firmware<br />

count −= 6 4 ; // t h e t o t a l b y t e s in t h e b u f f e r array minus 64<br />

b y t e s<br />

} else {<br />

loop = count ; // i f t h e end o f t r a n s a c t i o n t h e b y t e s in t h e<br />

b u f f e r array are = r e a d c o u n t ) { // i f t h e number o f b y t e s w r i t t e n e q u a l<br />

number o f b y t e s to read<br />

bytecount = 0 ;<br />

140 e e p r o m r e a d s t a t e = ep4in arm ; // s e t EP4 rearm s t a t e<br />

}<br />

}<br />

break ;<br />

}<br />

145 case ep4in arm :<br />

{<br />

SYNCDELAY;<br />

EP4BCH = MSB( r e a d c o u n t ) ;<br />

SYNCDELAY;<br />

150 EP4BCL = LSB( r e a d c o u n t ) ; // arm EP4IN∗/<br />

SYNCDELAY;<br />

e e p r o m r e a d s t a t e = i d l e ; // s e t read s t a t e to i d l e<br />

}<br />

default :<br />

155 break ;<br />

}<br />

}<br />

E.1.5. SPI Flash schreiben und lesen<br />

/∗ ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗<br />

2 ∗ Diplomwork :<br />

∗ <strong>Gecko3</strong> SoC HW/SW Development Board<br />

∗<br />

∗ ( ‘ \ ( ) ( ) ( )<br />

∗ | ( ) ) | ( | | | | Berne U n i v e r s i t y o f Applied S c i e n c e s<br />

7 ∗ | < ’| ) | | School o f Engineering and<br />

∗ | ( ) ) | | | | | | Information Technology<br />

∗ ( / ’( ) ( ) ( )<br />

∗<br />

∗<br />

12 ∗ Author : Matthias Zurbrügg<br />

∗ Date o f c r e a t i o n : 30.10.2006<br />

∗ D e s c r i p t i o n :<br />

∗ Source code o f SPI Flash read / w r i t e f u n c t i o n s and t h e<br />

∗ a u t o c o n f i g u r a t i o n f u n c t i o n<br />

17 ∗<br />

∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗ ∗/<br />

#include ” fx2 . h”<br />

#include ” f x 2 r e g s . h”<br />

22 #include ” f x 2 s d l y . h” // SYNCDELAY macro<br />

Project Report 77

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!