
Alle anzeigen / Alle verbergen
MPC5200B FPU initialization
CPU: MPC5200B
CPU: it applies to all CPUs which contain the G2 Core
Inititialisation of the FPU is necessary after reset!!
Author: Jan Kobler, jankobler@koblersystems.de
Date: 2008.12.18
The following text can be copied into an assembler file.
This code has been compiled with the GNU Compiler gcc 4.3.2
and tested on a Phytec phyCORE-MPC5200B-I/O board.
#####################################################################################
# Initialisation of the FPU is necessary after reset!!
#
# G2 PowerPC Core Reference Manual, Rev. 1
# www.freescale.com/files/32bit/doc/ref_manual/G2CORERM.pdf
#
# G2CORERM.pdf page 86: Before the stfd instruction is used to store the contents
# of an FPR to memory, the FPR must have been initialized after reset (explicitly
# loaded with any value) by using a floating-point load instruction.
#
# G2CORERM.pdf page 211: After Hard Reset and Power-On Reset FPRs are in an unknown state
#
# A better explanation is in the errata of the IBM 750CXe
# URL: www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/8F23652702C935DE87256B5A0052D5A6/$file/750CXe_Err_DD3.X.pdf
# 750CXe_Err_DD3.X.pdf page 9
# A stfd can cause the part to hang if its source FPR has powered up in a certain state.
#
#####################################################################################
# add to your startup code the function __fpu_init
.global __fpu_init
__fpu_init:
# Load any address into r3 which is 8byte aligned and has read access at
# the current state of the start up
# Here an address in the flash is loaded. When the board is booted
# high (0xfff00100) it is sure that the address 0xfff00000 can be read
# right after the reset
#
# load value 0xfff00000 into r3
lis r3, 0xfff0 #
#
lfd f0, 0(r3) # load floating-point double from address r3
lfd f1, 0(r3) # load floating-point double from address r3
lfd f2, 0(r3) # load floating-point double from address r3
lfd f3, 0(r3) # load floating-point double from address r3
lfd f4, 0(r3) # load floating-point double from address r3
lfd f5, 0(r3) # load floating-point double from address r3
lfd f6, 0(r3) # load floating-point double from address r3
lfd f7, 0(r3) # load floating-point double from address r3
lfd f8, 0(r3) # load floating-point double from address r3
lfd f9, 0(r3) # load floating-point double from address r3
lfd f10, 0(r3) # load floating-point double from address r3
lfd f11, 0(r3) # load floating-point double from address r3
lfd f12, 0(r3) # load floating-point double from address r3
lfd f13, 0(r3) # load floating-point double from address r3
lfd f14, 0(r3) # load floating-point double from address r3
lfd f15, 0(r3) # load floating-point double from address r3
lfd f16, 0(r3) # load floating-point double from address r3
lfd f17, 0(r3) # load floating-point double from address r3
lfd f18, 0(r3) # load floating-point double from address r3
lfd f19, 0(r3) # load floating-point double from address r3
lfd f20, 0(r3) # load floating-point double from address r3
lfd f21, 0(r3) # load floating-point double from address r3
lfd f22, 0(r3) # load floating-point double from address r3
lfd f23, 0(r3) # load floating-point double from address r3
lfd f24, 0(r3) # load floating-point double from address r3
lfd f25, 0(r3) # load floating-point double from address r3
lfd f26, 0(r3) # load floating-point double from address r3
lfd f27, 0(r3) # load floating-point double from address r3
lfd f28, 0(r3) # load floating-point double from address r3
lfd f29, 0(r3) # load floating-point double from address r3
lfd f30, 0(r3) # load floating-point double from address r3
lfd f31, 0(r3) # load floating-point double from address r3
blr # Branch
#####################################################################################
# call the function __fpu_init in your start up code
#
# at first the FPU has to be enabled by setting the FP bit (floating point available)
# in the MSR
#
# load the current value of the msr
mfmsr r3 # move msr into r3
ori r3, r3, 0x2000 # or immediate
mtmsr r3 # move r3 into msr
# save the new value into the msr
# now call the function __fpu_init
bl __fpu_init # Branch
# continue your own startup code
Freescale MPC5200B Dokumentation
Auf der Homepage von Freescale auf der MPC5200 Product Summary Page finden Sie Application Notes, Datasheets und Reference Manual und vieles mehr zu dem MPC5200 Controller
Link: MPC5200 Product Summary Page
phyCORE-MPC5200B-IO, phyCORE-MPC5554: Wo finde ich fertige FPGA IP-COREs?
Viele fertige IP-Cores für diverse Aufgaben, Schnittstellen usw. kann man im Internet beim Hersteller von FPGAs finden und in einigen IP-Cores Sammlungen. Eine umfangreiche Sammlung finden Sie z.B. unter www.opencores.org
Alle anzeigen / Alle verbergen
Verwendung eines Nameserver anmelden
Damit auch bei fix eingestellten IP-Adressen ein Nameserver verwendet wird, sind die folgenden Einstellungen vorzunehmen:
In die /etc/resolv.conf gehört ein Eintrag der Art:
nameserver 192.168.1.19
In der /etc/nsswitch.conf muß der Eintrag "hosts: files" erweitert werden zu "hosts:files dns".
Ein gültiger Default-Gateway sollte eingestellt sein, erkennbar daran, daß die Anweisung "route" eine Zeile "default" mit ausgibt.
U-Boot Update, Ergänzung zur AppNote "Configuring and Updating the Boot Loader"
Bei einem U-Boot Update gilt es noch folgendes zu beachten:
Der U-Boot des phyCORE-MPC5200B-tiny lädt seine Umgebungsvariablen (environment) per Default aus dem externen EEPROM. Zur Auslieferungszeit ist dort bereits ein gültiger Inhalt incl. der MAC-Adresse hinterlegt. Ein Update des U-Boot codes im Flash verändert den EEPROM Inhalt nicht. Somit verwendet der U-Boot bei einem Neustart wieder den vorhandenen EEPROM Inhalt. Soll auf das im U-Boot Code hinterlegte Defaultenvironment zurückgegriffen werden, sind folgende Schritte anzuwenden:
1. Ungültigmachen des EEPROM Inhalts durch den U-Boot Befehl "eeprom write 0 0 f"
2. Neustart des Systems
3. Eingabe der MAC-Adresse mit "setenv ethaddr 00:50:c2:12::34:56 (bitte hier die Adresse des MAC-Aufklebers verwenden)
4. Eingabe von "saveenv" zum Abspeichern der Variablen im EEPROM
OSELAS und PTXdist Mailinglisten für PHYTEC Module
Unser Toolpartner, die Firma Pengutronix, hostet offene Support-Mailinglisten für OSELAS (oselas.phytec@pengutronix.de) und PTXdist (ptxdist@pengutronix.de), für die Sie sich anmelden können. Besuchen Sie die Pengutronix - Maling Lists Seite um sich für die Mailinglisten anzumelden
Welche HostPC Betriebssysteme für die Linux-Kits?
Für die Entwicklung auf Basis von Linux-Kits brauchen Sie auf dem Host PC ein Linux Betriebssystem. Alle unsere Kits wurden auf openSUSE Distribution getestet.
Versionen des openSUSE, mit der das Kit getestet wurde: (Stand: 24.09.2008)
phyCORE-i.MX27 Linux Kit: läuft mit openSUSE10.3
phyCORE-i.MX31 Linux Kit: Installation von Kit-CD für openSUSE10.2, für openSUSE10.3 laden Sie bitte die aktuelle Dateien von unserem FTP Server
phyCORE-PXA270 Linux Kit: läuft mit openSUSE10.2
phyCORE-MPC5200B tiny Linux Kit: läuft mit openSUSE10.2
Unter anderen Linux-Distributionen wurde die Installation der Entwicklungstools für unsere Linux-Kits nicht getestet.
phyCORE-MPC5200B-xxx: Wo finde ich den SPI Node im Linux Kernel?
Der Zugriff auf die SPI Schnittstelle ist mit einem „generic“ Treiber nicht möglich. Die Kommunikation über SPI Schnittstelle hängt von dem SPI-Device, das an die SPI Schnittstelle angeschlossen ist, ab. Aus diesem Grund steht kein SPI Node unter /dev und /sys zur Verfügung. Um die Arbeit mit der SPI Schnittstelle zu erleichtern, steht im Linux-Kernel ein SPI Framework zur Verfügung. Eine detaillierte Beschreibung zu dem SPI Framework finden Sie im Kernel-Pfad unter Documentation/SPI/SPI-Summary
Configuring and Updating the Boot Loader
Problem:
Where can I get access to the file that explains how to configure and update the boot loader?
Solution:
Attached is the requested AppNote.
Wo finde ich die Sourcen für den Linux Kernel und sind diese schon an die Phytec Module angepasst?
Alle Sourcen zu Linux und BSP befinden sich auf der Kit-CD und sind an die phyCORE Module angepasst. Sie finden sie auch auf unseren FTP Server
für phyCORE-i.MX31
für phyCORE-i.MX27
für phyCORE-PXA270
Alle anzeigen / Alle verbergen
Stromaufnahmen des phyCORE-MPC5200B-tiny
Gesamtstromaufnahmen gemessen bei 3,3V Eingangsspannung:
- beim Booten des Moduls: ~460 mA [~590 mA] (~780 mA)
- bei UBootbetrieb, Prompt: ~420 mA [~550 mA] (~ 740 mA)
- Dhystone2 Performancetest: ~473 mA [~625 mA] (~ 810 mA)
- Loading Kernel via Ethernet: --- [~630 mA] (~860 mA)
Platinenversionsnummern: PL 1245.2 [PL 1245.1] (PL 1245.0)
MPC5200B FPU initialization
CPU: MPC5200B
CPU: it applies to all CPUs which contain the G2 Core
Inititialisation of the FPU is necessary after reset!!
Author: Jan Kobler, jankobler@koblersystems.de
Date: 2008.12.18
The following text can be copied into an assembler file.
This code has been compiled with the GNU Compiler gcc 4.3.2
and tested on a Phytec phyCORE-MPC5200B-I/O board.
#####################################################################################
# Initialisation of the FPU is necessary after reset!!
#
# G2 PowerPC Core Reference Manual, Rev. 1
# www.freescale.com/files/32bit/doc/ref_manual/G2CORERM.pdf
#
# G2CORERM.pdf page 86: Before the stfd instruction is used to store the contents
# of an FPR to memory, the FPR must have been initialized after reset (explicitly
# loaded with any value) by using a floating-point load instruction.
#
# G2CORERM.pdf page 211: After Hard Reset and Power-On Reset FPRs are in an unknown state
#
# A better explanation is in the errata of the IBM 750CXe
# URL: www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/8F23652702C935DE87256B5A0052D5A6/$file/750CXe_Err_DD3.X.pdf
# 750CXe_Err_DD3.X.pdf page 9
# A stfd can cause the part to hang if its source FPR has powered up in a certain state.
#
#####################################################################################
# add to your startup code the function __fpu_init
.global __fpu_init
__fpu_init:
# Load any address into r3 which is 8byte aligned and has read access at
# the current state of the start up
# Here an address in the flash is loaded. When the board is booted
# high (0xfff00100) it is sure that the address 0xfff00000 can be read
# right after the reset
#
# load value 0xfff00000 into r3
lis r3, 0xfff0 #
#
lfd f0, 0(r3) # load floating-point double from address r3
lfd f1, 0(r3) # load floating-point double from address r3
lfd f2, 0(r3) # load floating-point double from address r3
lfd f3, 0(r3) # load floating-point double from address r3
lfd f4, 0(r3) # load floating-point double from address r3
lfd f5, 0(r3) # load floating-point double from address r3
lfd f6, 0(r3) # load floating-point double from address r3
lfd f7, 0(r3) # load floating-point double from address r3
lfd f8, 0(r3) # load floating-point double from address r3
lfd f9, 0(r3) # load floating-point double from address r3
lfd f10, 0(r3) # load floating-point double from address r3
lfd f11, 0(r3) # load floating-point double from address r3
lfd f12, 0(r3) # load floating-point double from address r3
lfd f13, 0(r3) # load floating-point double from address r3
lfd f14, 0(r3) # load floating-point double from address r3
lfd f15, 0(r3) # load floating-point double from address r3
lfd f16, 0(r3) # load floating-point double from address r3
lfd f17, 0(r3) # load floating-point double from address r3
lfd f18, 0(r3) # load floating-point double from address r3
lfd f19, 0(r3) # load floating-point double from address r3
lfd f20, 0(r3) # load floating-point double from address r3
lfd f21, 0(r3) # load floating-point double from address r3
lfd f22, 0(r3) # load floating-point double from address r3
lfd f23, 0(r3) # load floating-point double from address r3
lfd f24, 0(r3) # load floating-point double from address r3
lfd f25, 0(r3) # load floating-point double from address r3
lfd f26, 0(r3) # load floating-point double from address r3
lfd f27, 0(r3) # load floating-point double from address r3
lfd f28, 0(r3) # load floating-point double from address r3
lfd f29, 0(r3) # load floating-point double from address r3
lfd f30, 0(r3) # load floating-point double from address r3
lfd f31, 0(r3) # load floating-point double from address r3
blr # Branch
#####################################################################################
# call the function __fpu_init in your start up code
#
# at first the FPU has to be enabled by setting the FP bit (floating point available)
# in the MSR
#
# load the current value of the msr
mfmsr r3 # move msr into r3
ori r3, r3, 0x2000 # or immediate
mtmsr r3 # move r3 into msr
# save the new value into the msr
# now call the function __fpu_init
bl __fpu_init # Branch
# continue your own startup code
Freescale MPC5200B Dokumentation
Auf der Homepage von Freescale auf der MPC5200 Product Summary Page finden Sie Application Notes, Datasheets und Reference Manual und vieles mehr zu dem MPC5200 Controller
Link: MPC5200 Product Summary Page
Hardware Manual:
- phyCORE-MPC5200B-I/O (L-694e.pdf)
QuickStart Instuctions:
- Linux-MPC5200B Kit (L-679e.pdf)
- Linux-MPC5200B FPGA-Kit (L-702e.pdf)
Application Notes:
- phyCORE-MPC5200B: "Use of new NOR Flashes (PCN-002e.pdf)
- phyCORE-MPC5200b: "Baseboard AC97 Hardware Patch" (TN-015e_1.PDF)
Software:
- phyCORE-MPC5200B I/O Linux BSP (PD08.3.0)
- phyCORE-MPC5200B I/O Linux BSP (PD09.1.0)
Kit-CD:
- phyCORE-MPC5200B-I/O Linux Kit (PD08.3.0)
- phyCORE-MPC5200B-I/O Linux Kit (PD09.1.0)
- phyCORE-MPC5200B-I/O Tool CD
_____________________________
Module Connector:
PHYTEC Order Number: VB107
_____________________________
Other PHYTEC Files:
- Abatron BDI2000 Configuration File for phyCORE-MPC5200B-I/O
_____________________________
PHYTEC Add-On's
- GPIO - General Purpose I/O Board (only without LCD) PCM-989
- mini-I/O Expansion Board PCM-987
- Bare PCB Expansion Board PCM-977
_____________________________
Other Documents:
Visit Freescale MPC5200B Product Summary Page to find data sheets, manuals, erratas, application notes, etc...
- Freescale MPC5200B Data Sheet
- Freescale MPC5200B User's Manual
_____________________________
Development Tools
For support to the development tools please contact the tool developer.
JTAG Emulators