Gast
#621164
Hallo! Ich habe eine Frage an euch in Bezug auf ein ARM µC. Mein Problem sieht folgenderweise aus: Ich habe zwei Programme geschrieben - UART Schnittstelle Baudrate 9.600 - SPI Schnittstelle Nun wollte ich beide Programme kombinieren. Entweder funktioniert das ein oder das andere. Nach langer Suche habe ich den Fehler entdeckt. In der Startup Datei des UARTS ist das PLL_SETUP Statement == 1 s.u.: . . . // Phase Locked Loop (PLL) definitions PLL_BASE EQU 0xE01FC080 /* PLL Base Address */ PLLCON_OFS EQU 0x00 /* PLL Control Offset*/ PLLCFG_OFS EQU 0x04 /* PLL Configuration Offset */ PLLSTAT_OFS EQU 0x08 /* PLL Status Offset */ PLLFEED_OFS EQU 0x0C /* PLL Feed Offset */ PLLCON_PLLE EQU (1<<0) /* PLL Enable */ PLLCON_PLLC EQU (1<<1) /* PLL Connect */ PLLCFG_MSEL EQU (0x1F<<0) /* PLL Multiplier */ PLLCFG_PSEL EQU (0x03<<5) /* PLL Divider */ PLLSTAT_PLOCK EQU (1<<10) /* PLL Lock Status */ /* // <e> PLL Setup // <i> Phase Locked Loop // <o1.0..4> MSEL: PLL Multiplier Selection // <1-32><#-1> // <i> M Value // <o1.5..6> PSEL: PLL Divider Selection // <0=> 1 <1=> 2 <2=> 4 <3=> 8 // <i> P Value // </e> */ PLL_SETUP EQU 1 <<<=================================== PLLCFG_Val EQU 0x00000024 // Memory Accelerator Module (MAM) definitions MAM_BASE EQU 0xE01FC000 /* MAM Base Address */ MAMCR_OFS EQU 0x00 /* MAM Control Offset*/ MAMTIM_OFS EQU 0x04 /* MAM Timing Offset */ /* // <e> MAM Setup // <i> Memory Accelerator Module // <o1.0..1> MAM Control // <0=> Disabled // <1=> Partially Enabled // <2=> Fully Enabled // <i> Mode // <o2.0..2> MAM Timing // <0=> Reserved <1=> 1 <2=> 2 <3=> 3 // <4=> 4 <5=> 5 <6=> 6 <7=> 7 // <i> Fetch Cycles // </e> */ MAM_SETUP EQU 1 MAMCR_Val EQU 0x00000002 MAMTIM_Val EQU 0x00000004 . . . In der Startup Datei des SPI ist das PLL_SETUP Statement == 0. Ich hänge hier schon eine Ewigkeit an diesem Problem. Ich gehe davon aus das die Taktrate entweder für das eine oder das andere durch das Statement angepasst wird. Kann mir jemand helfen? Wie kann man die PLL für UART und SPI im selben Prog. so ändern, dass beides funktioniert? Ich wäre euch sehr sehr dankbar für eine feedback!! Sei es auch nur ein kleiner Tipp oder so!