<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pasa</id>
		<title>Teknologisk videncenter - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pasa"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php/Special:Contributions/Pasa"/>
		<updated>2026-05-05T05:49:39Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Main_Page_section_1&amp;diff=28866</id>
		<title>Main Page section 1</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Main_Page_section_1&amp;diff=28866"/>
				<updated>2015-01-03T12:52:51Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Valgfri specialefag==&lt;br /&gt;
*[[media:HOT_VFS.pdf|Valgfri specialefags katalog 14-15]]&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
*[http://search.safaribooksonline.com/home Safari Books online]&lt;br /&gt;
=== Top Categories  ===&lt;br /&gt;
*[[:Category:Network|Network stuff.]] TCP/IP, [[Cisco]], [[CCNA]], [[CCNP]], [[CCDA]], [[CCDP]] etc.&amp;lt;br&amp;gt;  &lt;br /&gt;
*[[:Category:Operating%20Systems|Operating System related stuff.]] Microsoft Windows, UNIX, Linux etc.&amp;lt;br&amp;gt;  &lt;br /&gt;
*[[:Category:Programming|Programming related stuff.]] C, C++, C#, .NET, php, python, SQL etc&amp;lt;br&amp;gt;  &lt;br /&gt;
&amp;lt;!-- *[[:Category:Telecom|Tele communication related stuff.]]&amp;lt;span&amp;gt; ISDN, SDH, PDH, PBX etc --&amp;gt; &lt;br /&gt;
*[[Teleinstallationsteknikker H1 notater|Tele communication related stuff.]]&amp;lt;span&amp;gt; ISDN, SDH, PDH, PBX etc &lt;br /&gt;
*[[:Category:Computer|Computer related stuff.]] PCI, VGA, USB, Harddisk etc&amp;lt;br&amp;gt;&lt;br /&gt;
*[[:Category:Officemachines|Officemachines related stuff]] Scanners, copiers, printers, CMYK etc.&lt;br /&gt;
*[[:Category:Elektronik|Electronic related stuff.]] 80535, PIC, Transistors etc&amp;lt;br&amp;gt; &lt;br /&gt;
*[[Uddannelses Portal|Uddannelser i Teknologi og Kommunikation]]&lt;br /&gt;
*[[IT Technology|IT Technology education (IT- og elektronikteknolog)]]&lt;br /&gt;
Articles belong to categories. See [[TekkomCategories|List of all categories]] or [[Add_new_article|Add a new article]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- GOOGLE SITESERCH MAKES IE 8 CRACH!!!! &lt;br /&gt;
=== Google site search on Wiki ===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|Perform a google site search on House of Technology's Wiki&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;Googlecoop&amp;gt;House of Technology:GoogleSiteSearch&amp;lt;/Googlecoop&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MediaWiki documentation  ===&lt;br /&gt;
Hjælp til [[Help:Mediawiki introduktion| WIKI forfattere]] &amp;lt;br/&amp;gt;&lt;br /&gt;
Wikimedias documentation on [http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide userguide]&lt;br /&gt;
for information as a user or writer.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Help:Help|Help]]&lt;br /&gt;
&lt;br /&gt;
=== House of Technology wiki  ===&lt;br /&gt;
&lt;br /&gt;
There are {{NUMBEROFPAGES}} wiki pages on this site.&amp;lt;br/&amp;gt; &lt;br /&gt;
There are {{NUMBEROFARTICLES}} articles in the [[Special:AllPages|main name-space]]. See [[Special:NewPages|Newest Pages]]&amp;lt;br/&amp;gt;&lt;br /&gt;
There have been {{NUMBEROFEDITS}} edits.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are [[Special:UserList|{{NUMBEROFUSERS}}]] users registered on this WIKI.&amp;lt;br/&amp;gt;&lt;br /&gt;
See our [[Tekkom:Copyright|Copyright]] notice.&lt;br /&gt;
&lt;br /&gt;
=== Contact Information  ===&lt;br /&gt;
&lt;br /&gt;
'''Mercantec'''&amp;lt;br&amp;gt; Att: House of Technology&amp;lt;br&amp;gt; H.C. Andersensvej 9&amp;lt;br&amp;gt; 8800 Viborg&amp;lt;br&amp;gt; Denmark&amp;lt;br&amp;gt; Phone: +45 8950 3300&amp;lt;br&amp;gt;email: [mailto:heth@mercantec.dk House of Technology Wiki maintainer] __NOTOC__&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=MCBSTM32C&amp;diff=28387</id>
		<title>MCBSTM32C</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=MCBSTM32C&amp;diff=28387"/>
				<updated>2014-10-23T11:18:44Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Mcbstm32c board.jpg|300px|right|thumb|MCBSTM32C]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
MCBSTM32C is a [[ARM]] based evaluation board using a Cortex-M3 core based on the STMicroelectronics [[STM32F107VC]] [[ARM]] Controller.&lt;br /&gt;
=MCBSTM32C=&lt;br /&gt;
*[http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf Schematics]&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00259166.pdf M24C64] EEPROM (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00002253.pdf ST3232] RS232C Line Driver (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00135460.pdf LIS302DL] 3 Axis motion Sensor (Loads PDF)&lt;br /&gt;
*[http://www.cirrus.com/en/pubs/proDatasheet/CS42L52_F2.pdf CS42L52] Stereo CODEC (Loads PDF)&lt;br /&gt;
*[http://www.national.com/ds/DP/DP83848J.pdf DP83848J] 10/100 Mbps Ethernet Tranceiver (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00167470.pdf STMPS2141] power distribution switch for USB&lt;br /&gt;
==Display==&lt;br /&gt;
*[http://www.keil.com/mcbstm32c/mcbstm32c-display-board-schematics.pdf MCBQVGA-TS-Display-v12] Schematics (Loads PDF)&lt;br /&gt;
&lt;br /&gt;
=STM32F107VC=&lt;br /&gt;
*[http://www.keil.com/dd/chip/4889.htm Keil ARM STM32F107VC] Homepage&lt;br /&gt;
*STM32F107VC [http://www.keil.com/dd/docs/datashts/st/stm32f105(7)xx_ds.pdf Data Sheet] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.st.com/web/en/resource/technical/document/reference_manual/CD00171190.pdf Reference Manual] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.keil.com/support/man/docs/mcbstm32c/ Users Guide] (Web page)&lt;br /&gt;
*STM32F107VC [[Media:Stm32f103xx_firmware_library.pdf | Firmware Library]] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.keil.com/support/man/docs/armasm/ Assembler User Guide] (Web page)&lt;br /&gt;
&lt;br /&gt;
=Keil Development tools=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/mdk_510.exe  Keil uVision version 5.10 Download]&lt;br /&gt;
==Using license local on Mercantec==&lt;br /&gt;
Use wired local network or use wireless SSID '''dt3''' for access to server.&lt;br /&gt;
&amp;lt;source lang=cmd&amp;gt;&lt;br /&gt;
C:&amp;gt; net use s: \\mercstor.tekkom.local\license /user:keil &amp;lt;notice&amp;gt;SECRET-PASSWORD&amp;lt;/notice&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Under File...  License Management...  Select the Floating License tab and browse to the .FLF file on the server through the Add Product... button.  On clicking OK, a web browser should open with the Floating License details automatically filled.  On completion of the web browser, an e-mail is sent immediately with a license key to paste into the Floating License page.&lt;br /&gt;
{{source cmd}}&lt;br /&gt;
===Licens ude fra Internettet===&lt;br /&gt;
Lig følgende linie i din '''hosts''' fil&lt;br /&gt;
&amp;lt;source lang=cmd&amp;gt;&lt;br /&gt;
83.90.239.187 mercstor.tekkom.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Software projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/minimum_startup.zip minimum_startup.zip]&lt;br /&gt;
*[http://mars.tekkom.dk/data/display1.zip display1.zip]&lt;br /&gt;
*[[/Blinky simple|Blinky Simple]] (Minimum startup)&lt;br /&gt;
*[[/Blinky simple with clock control|Blinky simple with clock control]]&lt;br /&gt;
*[[/Blinky simple with clock control and backlight dim|Blinky simple with clock control  and backlight dim]]&lt;br /&gt;
*[[/Motionsensor 1|Motionsensor 1]]&lt;br /&gt;
*[[/SNMP project|SNMP project]]&lt;br /&gt;
*[[RTC STM32F107VC|RTC STM32F107VC Time keeping project]]&lt;br /&gt;
*[[IR remote control]] project&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://www.keil.com/support/man/docs/MCBSTM32C/ MCBSTM32C User's Guide]&lt;br /&gt;
*[http://www.gnuarm.com/ gnuARM] &lt;br /&gt;
*[http://www.keil.com/download/docs/392.asp MCBSTM32C demo using RL-ARM TCP]&lt;br /&gt;
*[[Media:apnt264.pdf | Application Note detailing differences between uVision4 and uVision5 for RTX]]&lt;br /&gt;
*[http://search.safaribooksonline.com/book/electrical-engineering/computer-engineering/0596007558 Safari book - Designing Embedded Hardware]&lt;br /&gt;
*[http://www.keil.com/links/tpl/c.asp Embedded C help]&lt;br /&gt;
*[http://search.safaribooksonline.com/book/programming/9780750685832 Embedded Software: Know it all] (Safari book by Larosse]&lt;br /&gt;
*[http://www.digilentinc.com Digilent Inc] Eletronic Parts&lt;br /&gt;
*[http://www.keil.com/pack/doc/cmsis/General/html/index.html CMSIS documentation] (Keil)&lt;br /&gt;
*[http://www.keil.com/pack/doc/mw/network/html/index.html CMSIS network ref] (Keil)&lt;br /&gt;
*[http://www.arm.com/products/tools/software-tools/mdk-arm/middleware-libraries/tcp-ip-networking-suite.php ARM middleware Libraries]&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Embedded]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=MCBSTM32C&amp;diff=28386</id>
		<title>MCBSTM32C</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=MCBSTM32C&amp;diff=28386"/>
				<updated>2014-10-23T11:16:35Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Mcbstm32c board.jpg|300px|right|thumb|MCBSTM32C]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
MCBSTM32C is a [[ARM]] based evaluation board using a Cortex-M3 core based on the STMicroelectronics [[STM32F107VC]] [[ARM]] Controller.&lt;br /&gt;
=MCBSTM32C=&lt;br /&gt;
*[http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf Schematics]&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00259166.pdf M24C64] EEPROM (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00002253.pdf ST3232] RS232C Line Driver (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00135460.pdf LIS302DL] 3 Axis motion Sensor (Loads PDF)&lt;br /&gt;
*[http://www.cirrus.com/en/pubs/proDatasheet/CS42L52_F2.pdf CS42L52] Stereo CODEC (Loads PDF)&lt;br /&gt;
*[http://www.national.com/ds/DP/DP83848J.pdf DP83848J] 10/100 Mbps Ethernet Tranceiver (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00167470.pdf STMPS2141] power distribution switch for USB&lt;br /&gt;
==Display==&lt;br /&gt;
*[http://www.keil.com/mcbstm32c/mcbstm32c-display-board-schematics.pdf MCBQVGA-TS-Display-v12] Schematics (Loads PDF)&lt;br /&gt;
&lt;br /&gt;
=STM32F107VC=&lt;br /&gt;
*[http://www.keil.com/dd/chip/4889.htm Keil ARM STM32F107VC] Homepage&lt;br /&gt;
*STM32F107VC [http://www.keil.com/dd/docs/datashts/st/stm32f105(7)xx_ds.pdf Data Sheet] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.st.com/web/en/resource/technical/document/reference_manual/CD00171190.pdf Reference Manual] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.keil.com/support/man/docs/mcbstm32c/ Users Guide] (Web page)&lt;br /&gt;
*STM32F107VC [[Media:Stm32f103xx_firmware_library.pdf | Firmware Library]] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.keil.com/support/man/docs/armasm/ Assembler User Guide] (Web page)&lt;br /&gt;
&lt;br /&gt;
=Keil Development tools=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/mdk_510.exe  Keil uVision version 5.10 Download]&lt;br /&gt;
==Using license local on Mercantec==&lt;br /&gt;
Use wired local network or use wireless SSID '''dt3''' for access to server.&lt;br /&gt;
&amp;lt;source lang=cmd&amp;gt;&lt;br /&gt;
C:&amp;gt; net use s: \\mercstor.tekkom.local\license /user:keil &amp;lt;notice&amp;gt;SECRET-PASSWORD&amp;lt;/notice&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Under File...  License Management...  Select the Floating License tab and browse to the .FLF file on the server through the Add Product... button.  On clicking OK, a web browser should open with the Floating License details automatically filled.  On completion of the web browser, an e-mail is sent immediately with a license key to paste into the Floating License page.&lt;br /&gt;
{{source cmd}}&lt;br /&gt;
===Licens ude fra Internettet===&lt;br /&gt;
Lig følgende linie i din '''hosts''' fil&lt;br /&gt;
&amp;lt;source lang=cmd&amp;gt;&lt;br /&gt;
83.90.239.187 mercstor.tekkom.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Software projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/minimum_startup.zip minimum_startup.zip]&lt;br /&gt;
*[http://mars.tekkom.dk/data/display1.zip display1.zip]&lt;br /&gt;
*[[/Blinky simple|Blinky Simple]] (Minimum startup)&lt;br /&gt;
*[[/Blinky simple with clock control|Blinky simple with clock control]]&lt;br /&gt;
*[[/Blinky simple with clock control and backlight dim|Blinky simple with clock control  and backlight dim]]&lt;br /&gt;
*[[/Motionsensor 1|Motionsensor 1]]&lt;br /&gt;
*[[/SNMP project|SNMP project]]&lt;br /&gt;
*[[RTC STM32F107VC|RTC STM32F107VC Time keeping project]]&lt;br /&gt;
*[[IR remote control]] project&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://www.keil.com/support/man/docs/MCBSTM32C/ MCBSTM32C User's Guide]&lt;br /&gt;
*[http://www.gnuarm.com/ gnuARM] &lt;br /&gt;
*[http://www.keil.com/download/docs/392.asp MCBSTM32C demo using RL-ARM TCP]&lt;br /&gt;
*[File:apnt264.pdf Application Note detailing differences between uVision4 and uVision5 for RTX]&lt;br /&gt;
*[http://search.safaribooksonline.com/book/electrical-engineering/computer-engineering/0596007558 Safari book - Designing Embedded Hardware]&lt;br /&gt;
*[http://www.keil.com/links/tpl/c.asp Embedded C help]&lt;br /&gt;
*[http://search.safaribooksonline.com/book/programming/9780750685832 Embedded Software: Know it all] (Safari book by Larosse]&lt;br /&gt;
*[http://www.digilentinc.com Digilent Inc] Eletronic Parts&lt;br /&gt;
*[http://www.keil.com/pack/doc/cmsis/General/html/index.html CMSIS documentation] (Keil)&lt;br /&gt;
*[http://www.keil.com/pack/doc/mw/network/html/index.html CMSIS network ref] (Keil)&lt;br /&gt;
*[http://www.arm.com/products/tools/software-tools/mdk-arm/middleware-libraries/tcp-ip-networking-suite.php ARM middleware Libraries]&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Embedded]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=MCBSTM32C&amp;diff=28385</id>
		<title>MCBSTM32C</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=MCBSTM32C&amp;diff=28385"/>
				<updated>2014-10-23T11:15:32Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Mcbstm32c board.jpg|300px|right|thumb|MCBSTM32C]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
MCBSTM32C is a [[ARM]] based evaluation board using a Cortex-M3 core based on the STMicroelectronics [[STM32F107VC]] [[ARM]] Controller.&lt;br /&gt;
=MCBSTM32C=&lt;br /&gt;
*[http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf Schematics]&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00259166.pdf M24C64] EEPROM (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00002253.pdf ST3232] RS232C Line Driver (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00135460.pdf LIS302DL] 3 Axis motion Sensor (Loads PDF)&lt;br /&gt;
*[http://www.cirrus.com/en/pubs/proDatasheet/CS42L52_F2.pdf CS42L52] Stereo CODEC (Loads PDF)&lt;br /&gt;
*[http://www.national.com/ds/DP/DP83848J.pdf DP83848J] 10/100 Mbps Ethernet Tranceiver (Loads PDF)&lt;br /&gt;
*[http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00167470.pdf STMPS2141] power distribution switch for USB&lt;br /&gt;
==Display==&lt;br /&gt;
*[http://www.keil.com/mcbstm32c/mcbstm32c-display-board-schematics.pdf MCBQVGA-TS-Display-v12] Schematics (Loads PDF)&lt;br /&gt;
&lt;br /&gt;
=STM32F107VC=&lt;br /&gt;
*[http://www.keil.com/dd/chip/4889.htm Keil ARM STM32F107VC] Homepage&lt;br /&gt;
*STM32F107VC [http://www.keil.com/dd/docs/datashts/st/stm32f105(7)xx_ds.pdf Data Sheet] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.st.com/web/en/resource/technical/document/reference_manual/CD00171190.pdf Reference Manual] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.keil.com/support/man/docs/mcbstm32c/ Users Guide] (Web page)&lt;br /&gt;
*STM32F107VC [[Media:Stm32f103xx_firmware_library.pdf | Firmware Library]] (Loads PDF)&lt;br /&gt;
*STM32F107VC [http://www.keil.com/support/man/docs/armasm/ Assembler User Guide] (Web page)&lt;br /&gt;
&lt;br /&gt;
=Keil Development tools=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/mdk_510.exe  Keil uVision version 5.10 Download]&lt;br /&gt;
==Using license local on Mercantec==&lt;br /&gt;
Use wired local network or use wireless SSID '''dt3''' for access to server.&lt;br /&gt;
&amp;lt;source lang=cmd&amp;gt;&lt;br /&gt;
C:&amp;gt; net use s: \\mercstor.tekkom.local\license /user:keil &amp;lt;notice&amp;gt;SECRET-PASSWORD&amp;lt;/notice&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Under File...  License Management...  Select the Floating License tab and browse to the .FLF file on the server through the Add Product... button.  On clicking OK, a web browser should open with the Floating License details automatically filled.  On completion of the web browser, an e-mail is sent immediately with a license key to paste into the Floating License page.&lt;br /&gt;
{{source cmd}}&lt;br /&gt;
===Licens ude fra Internettet===&lt;br /&gt;
Lig følgende linie i din '''hosts''' fil&lt;br /&gt;
&amp;lt;source lang=cmd&amp;gt;&lt;br /&gt;
83.90.239.187 mercstor.tekkom.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Software projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/minimum_startup.zip minimum_startup.zip]&lt;br /&gt;
*[http://mars.tekkom.dk/data/display1.zip display1.zip]&lt;br /&gt;
*[[/Blinky simple|Blinky Simple]] (Minimum startup)&lt;br /&gt;
*[[/Blinky simple with clock control|Blinky simple with clock control]]&lt;br /&gt;
*[[/Blinky simple with clock control and backlight dim|Blinky simple with clock control  and backlight dim]]&lt;br /&gt;
*[[/Motionsensor 1|Motionsensor 1]]&lt;br /&gt;
*[[/SNMP project|SNMP project]]&lt;br /&gt;
*[[RTC STM32F107VC|RTC STM32F107VC Time keeping project]]&lt;br /&gt;
*[[IR remote control]] project&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://www.keil.com/support/man/docs/MCBSTM32C/ MCBSTM32C User's Guide]&lt;br /&gt;
*[http://www.gnuarm.com/ gnuARM] &lt;br /&gt;
*[http://www.keil.com/download/docs/392.asp MCBSTM32C demo using RL-ARM TCP]&lt;br /&gt;
*[File:apnt264.pdf Application Note detailing differences between uVision4 and uVision5 for RTX]&lt;br /&gt;
*[http://search.safaribooksonline.com/book/electrical-engineering/computer-engineering/0596007558 Safari book - Designing Embedded Hardware]&lt;br /&gt;
*[http://www.keil.com/links/tpl/c.asp embedded C help]&lt;br /&gt;
*[http://search.safaribooksonline.com/book/programming/9780750685832 Embedded Software: Know it all] (Safari book by Larosse]&lt;br /&gt;
*[http://www.digilentinc.com Dililent Inc] Eletronic Parts&lt;br /&gt;
*[http://www.keil.com/pack/doc/cmsis/General/html/index.html CMSIS documentation] (Keil)&lt;br /&gt;
*[http://www.keil.com/pack/doc/mw/network/html/index.html CMSIS network ref] (Keil)&lt;br /&gt;
*[http://www.arm.com/products/tools/software-tools/mdk-arm/middleware-libraries/tcp-ip-networking-suite.php ARM middleware Libraries]&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Embedded]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=File:Apnt264.pdf&amp;diff=28384</id>
		<title>File:Apnt264.pdf</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=File:Apnt264.pdf&amp;diff=28384"/>
				<updated>2014-10-23T11:14:10Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28381</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28381"/>
				<updated>2014-10-22T11:27:26Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Data sheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written using Keil uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/mediawiki/images/a/a7/PmodGPS_rm.pdf Digilent PB200 datasheet]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28380</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28380"/>
				<updated>2014-10-22T11:26:16Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Data sheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written using Keil uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[[File:PmodGPS_rm.pdf‎]]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28379</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28379"/>
				<updated>2014-10-22T11:25:05Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Data sheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written using Keil uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[[File:PmodGPS_rm.pdf‎]Digilent PB200 GPS datasheet]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28378</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28378"/>
				<updated>2014-10-22T11:24:25Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Data sheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written using Keil uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[File:PmodGPS_rm.pdf‎]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28377</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28377"/>
				<updated>2014-10-22T11:23:28Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Data sheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written using Keil uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[PmodGPS_rm.pdf‎]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28376</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28376"/>
				<updated>2014-10-22T11:22:43Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Data sheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written using Keil uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[PmodGPS_rm.pdf‎ [Digilent PB200 datasheet]]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=File:PmodGPS_rm.pdf&amp;diff=28375</id>
		<title>File:PmodGPS rm.pdf</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=File:PmodGPS_rm.pdf&amp;diff=28375"/>
				<updated>2014-10-22T11:21:35Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28374</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28374"/>
				<updated>2014-10-22T11:19:06Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Data sheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written using Keil uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[[Digilent PB200 datasheet]]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28373</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28373"/>
				<updated>2014-10-22T11:14:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written using Keil uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28372</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28372"/>
				<updated>2014-10-22T11:13:34Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;$PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;$PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28363</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28363"/>
				<updated>2014-10-22T08:24:17Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Configuration settings for RTX===&lt;br /&gt;
[[File:Keil-RTX-configuration-for-GPS-reader.png]]&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=File:Keil-RTX-configuration-for-GPS-reader.png&amp;diff=28362</id>
		<title>File:Keil-RTX-configuration-for-GPS-reader.png</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=File:Keil-RTX-configuration-for-GPS-reader.png&amp;diff=28362"/>
				<updated>2014-10-22T08:22:34Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28361</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28361"/>
				<updated>2014-10-22T08:16:02Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Code for handling incoming data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.&lt;br /&gt;
// More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28360</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28360"/>
				<updated>2014-10-22T08:15:14Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Code for handling incoming data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to ensure that only complete messages are saved &lt;br /&gt;
// This is a very minimal implementation to allow viewing of received messages in the debugger.  More work is required to make a robust character buffer...&lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	int i = 0;&lt;br /&gt;
        for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28359</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28359"/>
				<updated>2014-10-22T08:06:23Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written uVision4. &lt;br /&gt;
===Code for configuration and setup of USART1===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to enusre that only complete messages are saved &lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===General configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
OS_TID t_phaseA;                        /* assigned task id of task: phase_a */&lt;br /&gt;
OS_TID t_phaseB;                        /* assigned task id of task: phase_b */&lt;br /&gt;
OS_TID t_phaseC;                        /* assigned task id of task: phase_c */&lt;br /&gt;
OS_TID t_phaseD;                        /* assigned task id of task: phase_d */&lt;br /&gt;
OS_TID t_clock;                         /* assigned task id of task: clock   */&lt;br /&gt;
OS_TID t_lcd;                           /* assigned task id of task: lcd     */&lt;br /&gt;
OS_TID t_gps;			        /* assigned task id of task: gps     */&lt;br /&gt;
&lt;br /&gt;
OS_MUT mut_GLCD;                        /* Mutex to control GLCD access     */&lt;br /&gt;
&lt;br /&gt;
#define LED_A   0&lt;br /&gt;
#define LED_B   1&lt;br /&gt;
#define LED_C   2&lt;br /&gt;
#define LED_D   3&lt;br /&gt;
#define LED_CLK 7&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM     8                   /* Number of user LEDs                */&lt;br /&gt;
&lt;br /&gt;
#define MAX_MESSAGE_SIZE 100&lt;br /&gt;
const long led_mask[] = { 1&amp;lt;&amp;lt;15, 1&amp;lt;&amp;lt;14, 1&amp;lt;&amp;lt;13, 1&amp;lt;&amp;lt;12, 1&amp;lt;&amp;lt;11, 1&amp;lt;&amp;lt;10, 1&amp;lt;&amp;lt;9, 1&amp;lt;&amp;lt;8 };&lt;br /&gt;
unsigned char received[MAX_MESSAGE_SIZE];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28358</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28358"/>
				<updated>2014-10-22T07:49:22Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Code for handling incoming data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written uVision4. &lt;br /&gt;
===Code for configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to enusre that only complete messages are saved &lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             // Check for standard NMEA message ending (CR/LF)             &lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28357</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28357"/>
				<updated>2014-10-22T07:43:00Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written uVision4. &lt;br /&gt;
===Code for configuration and setup===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Code for handling incoming data===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
// Global array received[] used to allow output to be seen in debugger.&lt;br /&gt;
// Use of the global array would also be relevant to allow data to be passed between tasks.&lt;br /&gt;
// This approach would require use of mutexes when writing to and reading from the array, to enusre that only complete messages are saved &lt;br /&gt;
&lt;br /&gt;
__task void gps(void)&lt;br /&gt;
{&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
	     os_evt_wait_and(0x1111, 0xffff);&lt;br /&gt;
	     received[i] = USART1-&amp;gt;DR;&lt;br /&gt;
		&lt;br /&gt;
             if(received[i]==0x0A  &amp;amp;&amp;amp; received[i-1]==0x0D)&lt;br /&gt;
	     {&lt;br /&gt;
                i=0;&lt;br /&gt;
	     }&lt;br /&gt;
	     else&lt;br /&gt;
	     {&lt;br /&gt;
	         i++;&lt;br /&gt;
	         i=i%MAX_MESSAGE_SIZE;&lt;br /&gt;
	     }&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28356</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28356"/>
				<updated>2014-10-22T07:34:02Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
Communication with the GPS module has been achieved through expansion of the Keil RTX_Blinky example.  This code is written uVision4. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28355</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28355"/>
				<updated>2014-10-22T07:31:38Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
To communicate with the GPS module the following code gives access to USART 1.&lt;br /&gt;
;NOTE:The example below is a codesnippet from the test code. The '''usart1_rx''' function should be called from an RTX thread called '''t_gps'''.&lt;br /&gt;
::*This is only test software. No buffer to hold unread data&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler(void) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28354</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28354"/>
				<updated>2014-10-22T07:30:54Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
To communicate with the GPS module the following code gives access to USART 1.&lt;br /&gt;
;NOTE:The example below is a codesnippet from the test code. The '''usart1_rx''' function should be called from an RTX thread called '''t_gps'''.&lt;br /&gt;
::*This is only test software. No buffer to hold unread data&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx(char character) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler( void ) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28353</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28353"/>
				<updated>2014-10-22T07:29:13Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
To communicate with the GPS module the following code gives access to USART 1.&lt;br /&gt;
;NOTE:The example below is a codesnippet from the test code. The '''usart1_rx''' function should be called from an RTX thread called '''t_gps'''.&lt;br /&gt;
::*This is only test software. No buffer to hold unread data&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);        /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx( char character ) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler( void ) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28352</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28352"/>
				<updated>2014-10-22T07:23:22Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
To communicate with the GPS module the following code gives access to USART 1.&lt;br /&gt;
;NOTE:The example below is a codesnippet from the test code. The '''usart1_rx''' function should be called from an RTX thread called '''t_gps'''.&lt;br /&gt;
::*This is only test software. No buffer to hold unread data&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) &lt;br /&gt;
{&lt;br /&gt;
        SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
        /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
        RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
        GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
        GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
        GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
        GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
        GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
	    For example:&lt;br /&gt;
	        fck = 72 MHz&lt;br /&gt;
		    required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
		    USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
		    Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
		    Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
		    See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);                       /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx( char character ) &lt;br /&gt;
{&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void putstr(char *string) &lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ )&lt;br /&gt;
        {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//USART1 Interrupt Handler&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler( void ) __irq&lt;br /&gt;
{&lt;br /&gt;
	NVIC_DisableIRQ(USART1_IRQn);&lt;br /&gt;
	&lt;br /&gt;
	//Send event flag to t_gps task&lt;br /&gt;
	isr_evt_set(0x1111, t_gps);	&lt;br /&gt;
	&lt;br /&gt;
	//Reset USART status register to allow the next value from the serial link to be set&lt;br /&gt;
	USART1-&amp;gt;SR &amp;amp;= ~(1 &amp;lt;&amp;lt; 5);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28351</id>
		<title>GPS RECEIVER - MT3329</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=GPS_RECEIVER_-_MT3329&amp;diff=28351"/>
				<updated>2014-10-22T07:17:07Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Module on MCBSTM32C Keil board */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Module on MCBSTM32C Keil board=&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG|thumb|300px|right|Picture 1: GPS Module attached to Keil board. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 2.jpg|thumb|300px|right|Picture 2: Wires attached between Keil board and 6 pin connecter. Display removed. (Click to enlarge)]]&lt;br /&gt;
[[image:GPS on MCBSTM32C.JPG 3.jpg|thumb|300px|right|Picture 3: GPS Module attached to 6 pin connector on Keil board.(Click to enlarge)]]&lt;br /&gt;
Using the [[STM32F107VC]] remapped USART1 to PB6 (USART1_TX)and PB7 (USART1_RX). The GPS module uses VCC and GND and not RS232 levels on TX/RX. Five boards are modified for the five GPS modules bought.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB6 is used for CAN2 bus TX. CAN2 bus can't be used at the same time as the GPS module.&lt;br /&gt;
*The [http://www.keil.com/mcbstm32c/mcbstm32c-base-board-schematics.pdf|Schematics] show that PB7 is used for the USER button. To use PB7 as RX from the GPS module it is necessary to remove C20.  The USER switch can't be used at the same time as the GPS module.&lt;br /&gt;
==Connections==&lt;br /&gt;
Solder a 6 pin 0,1 inch 90 degrees angle. See picture 2 and connect&lt;br /&gt;
*Pin 1 to 3,3V (Red wire)&lt;br /&gt;
*Pin 2 to GND (Black wire)&lt;br /&gt;
*Pin 3  - Not used in this project ( 1 second pulse signal from GPS module )&lt;br /&gt;
*Pin 4 to PB7 (Orange wire) - GPS module TX &lt;br /&gt;
*Pin 5 to PB6 (Yellow wire) - GPS module RX&lt;br /&gt;
*Pin 6 - NOt used in this project ( FIX signal )&lt;br /&gt;
==Battery connector on keil board==&lt;br /&gt;
The minus pole on the battery has no electrical connection to the main board. To make a connection a desisolated wire was placed between the minuspole on the battery and the goldplated area on the PCB under the battery. See picture 2.  &lt;br /&gt;
&lt;br /&gt;
==USART 1 code==&lt;br /&gt;
To communicate with the GPS module the following code gives access to USART 1.&lt;br /&gt;
;NOTE:The example below is a codesnippet from the test code. The '''usart1_rx''' function should be called from an RTX thread called '''t_gps'''.&lt;br /&gt;
::*This is only test software. No buffer to hold unread data&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int main (void) {&lt;br /&gt;
&lt;br /&gt;
  SystemInit();                             /* initialize clocks             */&lt;br /&gt;
&lt;br /&gt;
  /* Setup GPIO for LEDs                                                     */&lt;br /&gt;
  RCC-&amp;gt;APB2ENR |=  1 &amp;lt;&amp;lt;  6;                 /* Enable GPIOE clock            */&lt;br /&gt;
  GPIOE-&amp;gt;CRH    = 0x33333333;               /* Configure the GPIO for LEDs   */&lt;br /&gt;
&lt;br /&gt;
  GLCD_Init();                              /* Initialize the GLCD           */&lt;br /&gt;
  GLCD_Clear(White);                        /* Clear the GLCD                */&lt;br /&gt;
	&lt;br /&gt;
	//Enable Port B clock and configure USART1 (with remapping of USART1 to Port B from Port A)&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	RCC-&amp;gt;CFGR  |= 4 &amp;lt;&amp;lt; 10;&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 0;&lt;br /&gt;
	AFIO-&amp;gt;MAPR |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//Enable GPIOB7 as rx, GPIOB6 as tx (Pin7: 0100, Pin6: 1011)&lt;br /&gt;
  GPIOB-&amp;gt;CRL &amp;amp;= 0x00FFFFFF;&lt;br /&gt;
  GPIOB-&amp;gt;CRL |= 0x4B000000;	&lt;br /&gt;
	&lt;br /&gt;
	//Enable USART in RCC_APB2ENR&lt;br /&gt;
	RCC-&amp;gt;APB2ENR |= 1 &amp;lt;&amp;lt; 14;&lt;br /&gt;
	&lt;br /&gt;
	/*&lt;br /&gt;
	Set baud rate (USART_BRR): BaudRate =   fck / ( 16 * USARTDIV )&lt;br /&gt;
		For example:&lt;br /&gt;
			fck = 72 MHz&lt;br /&gt;
			required Baud Rate = 9600&lt;br /&gt;
		 &lt;br /&gt;
			USARTDIV = fck/(16 * BaudRate ) = 72000000/(16 * 9600) = 468.75&lt;br /&gt;
		 &lt;br /&gt;
			Mantissa = 438 - as hex: 0x1D4&lt;br /&gt;
			Fraction = 16*0.75 = 12 - as hex: 0xC&lt;br /&gt;
			&lt;br /&gt;
			See Reference Manual for further details&lt;br /&gt;
	*/ &lt;br /&gt;
	USART1-&amp;gt;BRR = 0x01d4c;&lt;br /&gt;
	&lt;br /&gt;
	//USART enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 13;&lt;br /&gt;
	&lt;br /&gt;
	//USART Tx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 3;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 2;&lt;br /&gt;
	&lt;br /&gt;
	//USART Rx Interrupt enable&lt;br /&gt;
	USART1-&amp;gt;CR1 |= 1 &amp;lt;&amp;lt; 5;&lt;br /&gt;
	&lt;br /&gt;
	//Send initialisation messages to the GPS, 1: Baud rate, 2: Reset GPS to output default NMEA messages&lt;br /&gt;
	putstr(&amp;quot;PMTK251,9600*17\r\n&amp;quot;);&lt;br /&gt;
	putstr(&amp;quot;PMTK314,-1*04\r\n&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	NVIC_EnableIRQ(USART1_IRQn);&lt;br /&gt;
&lt;br /&gt;
        os_sys_init (init);                       /* Initialize RTX and start init */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void usart1_tx( char character ) {&lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 6)) == 0) {}; // Wait HSERDY = 1&lt;br /&gt;
	USART1-&amp;gt;DR = (uint16_t) character;&lt;br /&gt;
}&lt;br /&gt;
void putstr(char *string) {&lt;br /&gt;
	int i;&lt;br /&gt;
	for ( i=0; string[i] != 0; i++ ) {&lt;br /&gt;
		usart1_tx(string[i]);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//Receive&lt;br /&gt;
char usart1_rx() {&lt;br /&gt;
	os_evt_wait_and (0x0001, 0xffff);&lt;br /&gt;
	return(USART1-&amp;gt;DR);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void USART1_IRQHandler( void ) __irq {&lt;br /&gt;
	&lt;br /&gt;
	isr_evt_set(0x0001, t_gps); &lt;br /&gt;
	while ((USART1-&amp;gt;SR &amp;amp; ( 1 &amp;lt;&amp;lt; 5)) == 0) {}; // Wait RXNE = 1&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Data sheets=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/DIYDrones%20Custom%20Binary%20Protocol%20-%20Google%20Drev.pdf Binary Protocol]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK%20Commands%20-%20Google%20Drev.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/MTK_commands.pdf MTK Commands]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/mediatek_3329.pdf Mediatek 3329.pdf]&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS/USARTs%20on%20MCBSTMC32C.txt USARTS on MCBSTM32C]&lt;br /&gt;
&lt;br /&gt;
=ARM board projects=&lt;br /&gt;
*[http://mars.tekkom.dk/data/embedded/GPS_TWO_UARTS.zip GPS_TWO_UARTS.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://dk.farnell.com/digilent/pmod-gps/peripheral-mod-gps-receiver-mt3329/dp/2211777 Farnell webpage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GPS]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28332</id>
		<title>Cluster der kan alt/PXE and Kickstart</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28332"/>
				<updated>2014-10-19T16:18:31Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* The kickstart file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Aim=&lt;br /&gt;
&lt;br /&gt;
To enable unattended installation and configuration of Ubuntu on nodes, so that their configuration matches the master machine.  This is achieved with PXE boot and configuration with Kickstart.&lt;br /&gt;
&lt;br /&gt;
=PXE=&lt;br /&gt;
Install tftp server&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
apt-get install tftpd-hpa&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Netinstaller==&lt;br /&gt;
&lt;br /&gt;
Download and install pxelinux to tftp root: &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cd /var/lib/tftpboot/&lt;br /&gt;
wget http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/netboot.tar.gz&lt;br /&gt;
tar -xvzf netboot.tar.gz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: trusty = ubuntu 14.04, precise = ubuntu 12.04&lt;br /&gt;
&lt;br /&gt;
===Set the kickstartfile as default, and the timer to 5 sec===&lt;br /&gt;
Enter the txt.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Rename the &amp;quot;default install&amp;quot; line to &amp;quot;default unattended&amp;quot; so the the unattended kickstart file will be executed by default &lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;label unattended&amp;quot; section in the bottom ofthe file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
label unattended&lt;br /&gt;
        menu label ^Unattended install&lt;br /&gt;
        kernel ubuntu-installer/amd64/linux&lt;br /&gt;
        append vga=768 initrd=ubuntu-installer/amd64/initrd.gz ks=http://10.0.0.1/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Change the timeout value to 50 in the default file.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/pxelinux.cfg/default&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Kickstart=&lt;br /&gt;
Install the http server lighttpd&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install lighttpd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create the ks.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /var/www/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The kickstart file==&lt;br /&gt;
Copy/paste the following text to the ks.cfg file. (Make your own changes like ip addresses and domain name, so it will fit your setup.)&lt;br /&gt;
&lt;br /&gt;
Note: When choosing a password, be sure to make it more than eight symbols, with letters, numbers and special symbols.  &amp;quot;unattended&amp;quot; install will stop, waiting for confirmation of a weak password, if this advice is not followed... ;-)&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#Generated by Kickstart Configurator&lt;br /&gt;
#platform=x86&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Node configuration&lt;br /&gt;
#################&lt;br /&gt;
#System language&lt;br /&gt;
lang da_DK&lt;br /&gt;
#Language modules to install&lt;br /&gt;
langsupport us_EN&lt;br /&gt;
#System keyboard&lt;br /&gt;
keyboard dk&lt;br /&gt;
#System mouse&lt;br /&gt;
mouse&lt;br /&gt;
#System timezone&lt;br /&gt;
timezone Europe/Copenhagen&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#User configuration&lt;br /&gt;
#################&lt;br /&gt;
#Root password&lt;br /&gt;
rootpw cluster&lt;br /&gt;
#Initial user&lt;br /&gt;
user cluster --fullname &amp;quot;cluster&amp;quot; --password &amp;lt;more than 8 symbols here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Reboot after installation&lt;br /&gt;
reboot&lt;br /&gt;
#Use text mode install&lt;br /&gt;
text&lt;br /&gt;
#Install OS instead of upgrade&lt;br /&gt;
install&lt;br /&gt;
#Use Web installation&lt;br /&gt;
url --url http://mirror.tekkom.dk/ubuntu/&lt;br /&gt;
#System bootloader configuration&lt;br /&gt;
bootloader --location=mbr&lt;br /&gt;
#Clear the Master Boot Record&lt;br /&gt;
zerombr yes&lt;br /&gt;
#Partition clearing information&lt;br /&gt;
clearpart --all --initlabel&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Disk configuration&lt;br /&gt;
#################&lt;br /&gt;
#Disk partitioning information&lt;br /&gt;
part / --fstype ext4 --size 1024&lt;br /&gt;
part /boot --fstype ext4 --size 512&lt;br /&gt;
part /home --fstype ext4 --size 1024&lt;br /&gt;
part /var --fstype ext4 --size 3072&lt;br /&gt;
part /tmp --fstype ext4 --size 3072&lt;br /&gt;
part /usr --fstype ext4 --size 5120&lt;br /&gt;
part swap --size 1024&lt;br /&gt;
&lt;br /&gt;
#System authorization infomation&lt;br /&gt;
auth  --useshadow  --enablemd5  --enablenis --nisdomain dka.local --nisserver 1$&lt;br /&gt;
#Network information&lt;br /&gt;
network --bootproto=dhcp --device=eth0&lt;br /&gt;
#Firewall configuration&lt;br /&gt;
firewall --disabled&lt;br /&gt;
#Do not configure the X Window System&lt;br /&gt;
skipx&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Package installation&lt;br /&gt;
#################&lt;br /&gt;
#Package install information&lt;br /&gt;
%packages&lt;br /&gt;
openssh-server&lt;br /&gt;
nmap&lt;br /&gt;
ssh&lt;br /&gt;
screen&lt;br /&gt;
bmon&lt;br /&gt;
iperf&lt;br /&gt;
bonnie++&lt;br /&gt;
lmbench&lt;br /&gt;
lm-sensors&lt;br /&gt;
snmpd&lt;br /&gt;
snmp&lt;br /&gt;
build-essential&lt;br /&gt;
gcc&lt;br /&gt;
openssh-client&lt;br /&gt;
nfs-common&lt;br /&gt;
mpich2&lt;br /&gt;
dsh&lt;br /&gt;
portmap&lt;br /&gt;
nis&lt;br /&gt;
%pre&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Scipt run&lt;br /&gt;
#################&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo &amp;quot;Pre-installation&amp;quot;&lt;br /&gt;
%post --nochroot&lt;br /&gt;
echo &amp;quot;portmap : 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/hosts.allow&lt;br /&gt;
echo &amp;quot;ypserver 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/yp.conf&lt;br /&gt;
perl -pi -w -e 's/\/home/\/home.old/g;' /target/etc/fstab&lt;br /&gt;
mkdir /target/mnt/tmp&lt;br /&gt;
echo &amp;quot;10.0.0.1:/home /home nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
echo &amp;quot;10.0.0.1:/script /mnt/tmp/ nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
/target/etc/init.d/nis restart&lt;br /&gt;
&lt;br /&gt;
mount 10.0.0.1:/home/ /home/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28331</id>
		<title>Cluster der kan alt/PXE and Kickstart</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28331"/>
				<updated>2014-10-19T16:17:57Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* The kickstart file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Aim=&lt;br /&gt;
&lt;br /&gt;
To enable unattended installation and configuration of Ubuntu on nodes, so that their configuration matches the master machine.  This is achieved with PXE boot and configuration with Kickstart.&lt;br /&gt;
&lt;br /&gt;
=PXE=&lt;br /&gt;
Install tftp server&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
apt-get install tftpd-hpa&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Netinstaller==&lt;br /&gt;
&lt;br /&gt;
Download and install pxelinux to tftp root: &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cd /var/lib/tftpboot/&lt;br /&gt;
wget http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/netboot.tar.gz&lt;br /&gt;
tar -xvzf netboot.tar.gz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: trusty = ubuntu 14.04, precise = ubuntu 12.04&lt;br /&gt;
&lt;br /&gt;
===Set the kickstartfile as default, and the timer to 5 sec===&lt;br /&gt;
Enter the txt.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Rename the &amp;quot;default install&amp;quot; line to &amp;quot;default unattended&amp;quot; so the the unattended kickstart file will be executed by default &lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;label unattended&amp;quot; section in the bottom ofthe file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
label unattended&lt;br /&gt;
        menu label ^Unattended install&lt;br /&gt;
        kernel ubuntu-installer/amd64/linux&lt;br /&gt;
        append vga=768 initrd=ubuntu-installer/amd64/initrd.gz ks=http://10.0.0.1/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Change the timeout value to 50 in the default file.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/pxelinux.cfg/default&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Kickstart=&lt;br /&gt;
Install the http server lighttpd&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install lighttpd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create the ks.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /var/www/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The kickstart file==&lt;br /&gt;
Copy/paste the following text to the ks.cfg file. (Make your own changes like ip addresses and domain name, so it will fit your setup.)&lt;br /&gt;
&lt;br /&gt;
Note: When choosing a password, be sure to make it more than eight symbols, with letters, numbers and special symbols.  &amp;quot;unattended&amp;quot; install will stop, waiting for confirmation of a weak password, if this advice is not followed... ;-)&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#Generated by Kickstart Configurator&lt;br /&gt;
#platform=x86&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Node configuration&lt;br /&gt;
#################&lt;br /&gt;
#System language&lt;br /&gt;
lang da_DK&lt;br /&gt;
#Language modules to install&lt;br /&gt;
langsupport us_EN&lt;br /&gt;
#System keyboard&lt;br /&gt;
keyboard dk&lt;br /&gt;
#System mouse&lt;br /&gt;
mouse&lt;br /&gt;
#System timezone&lt;br /&gt;
timezone Europe/Copenhagen&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#User configuration&lt;br /&gt;
#################&lt;br /&gt;
#Root password&lt;br /&gt;
rootpw cluster&lt;br /&gt;
#Initial user&lt;br /&gt;
user cluster --fullname &amp;quot;cluster&amp;quot; --password cluster&lt;br /&gt;
&lt;br /&gt;
#Reboot after installation&lt;br /&gt;
reboot&lt;br /&gt;
#Use text mode install&lt;br /&gt;
text&lt;br /&gt;
#Install OS instead of upgrade&lt;br /&gt;
install&lt;br /&gt;
#Use Web installation&lt;br /&gt;
url --url http://mirror.tekkom.dk/ubuntu/&lt;br /&gt;
#System bootloader configuration&lt;br /&gt;
bootloader --location=mbr&lt;br /&gt;
#Clear the Master Boot Record&lt;br /&gt;
zerombr yes&lt;br /&gt;
#Partition clearing information&lt;br /&gt;
clearpart --all --initlabel&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Disk configuration&lt;br /&gt;
#################&lt;br /&gt;
#Disk partitioning information&lt;br /&gt;
part / --fstype ext4 --size 1024&lt;br /&gt;
part /boot --fstype ext4 --size 512&lt;br /&gt;
part /home --fstype ext4 --size 1024&lt;br /&gt;
part /var --fstype ext4 --size 3072&lt;br /&gt;
part /tmp --fstype ext4 --size 3072&lt;br /&gt;
part /usr --fstype ext4 --size 5120&lt;br /&gt;
part swap --size 1024&lt;br /&gt;
&lt;br /&gt;
#System authorization infomation&lt;br /&gt;
auth  --useshadow  --enablemd5  --enablenis --nisdomain dka.local --nisserver 1$&lt;br /&gt;
#Network information&lt;br /&gt;
network --bootproto=dhcp --device=eth0&lt;br /&gt;
#Firewall configuration&lt;br /&gt;
firewall --disabled&lt;br /&gt;
#Do not configure the X Window System&lt;br /&gt;
skipx&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Package installation&lt;br /&gt;
#################&lt;br /&gt;
#Package install information&lt;br /&gt;
%packages&lt;br /&gt;
openssh-server&lt;br /&gt;
nmap&lt;br /&gt;
ssh&lt;br /&gt;
screen&lt;br /&gt;
bmon&lt;br /&gt;
iperf&lt;br /&gt;
bonnie++&lt;br /&gt;
lmbench&lt;br /&gt;
lm-sensors&lt;br /&gt;
snmpd&lt;br /&gt;
snmp&lt;br /&gt;
build-essential&lt;br /&gt;
gcc&lt;br /&gt;
openssh-client&lt;br /&gt;
nfs-common&lt;br /&gt;
mpich2&lt;br /&gt;
dsh&lt;br /&gt;
portmap&lt;br /&gt;
nis&lt;br /&gt;
%pre&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Scipt run&lt;br /&gt;
#################&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo &amp;quot;Pre-installation&amp;quot;&lt;br /&gt;
%post --nochroot&lt;br /&gt;
echo &amp;quot;portmap : 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/hosts.allow&lt;br /&gt;
echo &amp;quot;ypserver 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/yp.conf&lt;br /&gt;
perl -pi -w -e 's/\/home/\/home.old/g;' /target/etc/fstab&lt;br /&gt;
mkdir /target/mnt/tmp&lt;br /&gt;
echo &amp;quot;10.0.0.1:/home /home nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
echo &amp;quot;10.0.0.1:/script /mnt/tmp/ nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
/target/etc/init.d/nis restart&lt;br /&gt;
&lt;br /&gt;
mount 10.0.0.1:/home/ /home/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28330</id>
		<title>Cluster der kan alt/PXE and Kickstart</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28330"/>
				<updated>2014-10-19T16:17:32Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* The kickstart file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Aim=&lt;br /&gt;
&lt;br /&gt;
To enable unattended installation and configuration of Ubuntu on nodes, so that their configuration matches the master machine.  This is achieved with PXE boot and configuration with Kickstart.&lt;br /&gt;
&lt;br /&gt;
=PXE=&lt;br /&gt;
Install tftp server&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
apt-get install tftpd-hpa&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Netinstaller==&lt;br /&gt;
&lt;br /&gt;
Download and install pxelinux to tftp root: &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cd /var/lib/tftpboot/&lt;br /&gt;
wget http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/netboot.tar.gz&lt;br /&gt;
tar -xvzf netboot.tar.gz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: trusty = ubuntu 14.04, precise = ubuntu 12.04&lt;br /&gt;
&lt;br /&gt;
===Set the kickstartfile as default, and the timer to 5 sec===&lt;br /&gt;
Enter the txt.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Rename the &amp;quot;default install&amp;quot; line to &amp;quot;default unattended&amp;quot; so the the unattended kickstart file will be executed by default &lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;label unattended&amp;quot; section in the bottom ofthe file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
label unattended&lt;br /&gt;
        menu label ^Unattended install&lt;br /&gt;
        kernel ubuntu-installer/amd64/linux&lt;br /&gt;
        append vga=768 initrd=ubuntu-installer/amd64/initrd.gz ks=http://10.0.0.1/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Change the timeout value to 50 in the default file.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/pxelinux.cfg/default&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Kickstart=&lt;br /&gt;
Install the http server lighttpd&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install lighttpd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create the ks.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /var/www/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The kickstart file==&lt;br /&gt;
Copy/paste the following text to the ks.cfg file. (Make your own changes like ip addresses and domain name, so it will fit your setup.)&lt;br /&gt;
&lt;br /&gt;
Note: When choosing a password, be sure to make it more than eight symbols, with letters, numbers and special symbols.  &amp;quot;unattended&amp;quot; install will stop waiting for confirmation of a weak password, if this advice is not followed... ;-)&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#Generated by Kickstart Configurator&lt;br /&gt;
#platform=x86&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Node configuration&lt;br /&gt;
#################&lt;br /&gt;
#System language&lt;br /&gt;
lang da_DK&lt;br /&gt;
#Language modules to install&lt;br /&gt;
langsupport us_EN&lt;br /&gt;
#System keyboard&lt;br /&gt;
keyboard dk&lt;br /&gt;
#System mouse&lt;br /&gt;
mouse&lt;br /&gt;
#System timezone&lt;br /&gt;
timezone Europe/Copenhagen&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#User configuration&lt;br /&gt;
#################&lt;br /&gt;
#Root password&lt;br /&gt;
rootpw cluster&lt;br /&gt;
#Initial user&lt;br /&gt;
user cluster --fullname &amp;quot;cluster&amp;quot; --password cluster&lt;br /&gt;
&lt;br /&gt;
#Reboot after installation&lt;br /&gt;
reboot&lt;br /&gt;
#Use text mode install&lt;br /&gt;
text&lt;br /&gt;
#Install OS instead of upgrade&lt;br /&gt;
install&lt;br /&gt;
#Use Web installation&lt;br /&gt;
url --url http://mirror.tekkom.dk/ubuntu/&lt;br /&gt;
#System bootloader configuration&lt;br /&gt;
bootloader --location=mbr&lt;br /&gt;
#Clear the Master Boot Record&lt;br /&gt;
zerombr yes&lt;br /&gt;
#Partition clearing information&lt;br /&gt;
clearpart --all --initlabel&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Disk configuration&lt;br /&gt;
#################&lt;br /&gt;
#Disk partitioning information&lt;br /&gt;
part / --fstype ext4 --size 1024&lt;br /&gt;
part /boot --fstype ext4 --size 512&lt;br /&gt;
part /home --fstype ext4 --size 1024&lt;br /&gt;
part /var --fstype ext4 --size 3072&lt;br /&gt;
part /tmp --fstype ext4 --size 3072&lt;br /&gt;
part /usr --fstype ext4 --size 5120&lt;br /&gt;
part swap --size 1024&lt;br /&gt;
&lt;br /&gt;
#System authorization infomation&lt;br /&gt;
auth  --useshadow  --enablemd5  --enablenis --nisdomain dka.local --nisserver 1$&lt;br /&gt;
#Network information&lt;br /&gt;
network --bootproto=dhcp --device=eth0&lt;br /&gt;
#Firewall configuration&lt;br /&gt;
firewall --disabled&lt;br /&gt;
#Do not configure the X Window System&lt;br /&gt;
skipx&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Package installation&lt;br /&gt;
#################&lt;br /&gt;
#Package install information&lt;br /&gt;
%packages&lt;br /&gt;
openssh-server&lt;br /&gt;
nmap&lt;br /&gt;
ssh&lt;br /&gt;
screen&lt;br /&gt;
bmon&lt;br /&gt;
iperf&lt;br /&gt;
bonnie++&lt;br /&gt;
lmbench&lt;br /&gt;
lm-sensors&lt;br /&gt;
snmpd&lt;br /&gt;
snmp&lt;br /&gt;
build-essential&lt;br /&gt;
gcc&lt;br /&gt;
openssh-client&lt;br /&gt;
nfs-common&lt;br /&gt;
mpich2&lt;br /&gt;
dsh&lt;br /&gt;
portmap&lt;br /&gt;
nis&lt;br /&gt;
%pre&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Scipt run&lt;br /&gt;
#################&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo &amp;quot;Pre-installation&amp;quot;&lt;br /&gt;
%post --nochroot&lt;br /&gt;
echo &amp;quot;portmap : 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/hosts.allow&lt;br /&gt;
echo &amp;quot;ypserver 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/yp.conf&lt;br /&gt;
perl -pi -w -e 's/\/home/\/home.old/g;' /target/etc/fstab&lt;br /&gt;
mkdir /target/mnt/tmp&lt;br /&gt;
echo &amp;quot;10.0.0.1:/home /home nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
echo &amp;quot;10.0.0.1:/script /mnt/tmp/ nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
/target/etc/init.d/nis restart&lt;br /&gt;
&lt;br /&gt;
mount 10.0.0.1:/home/ /home/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28329</id>
		<title>Cluster der kan alt/PXE and Kickstart</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28329"/>
				<updated>2014-10-19T16:17:03Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* The kickstart file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Aim=&lt;br /&gt;
&lt;br /&gt;
To enable unattended installation and configuration of Ubuntu on nodes, so that their configuration matches the master machine.  This is achieved with PXE boot and configuration with Kickstart.&lt;br /&gt;
&lt;br /&gt;
=PXE=&lt;br /&gt;
Install tftp server&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
apt-get install tftpd-hpa&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Netinstaller==&lt;br /&gt;
&lt;br /&gt;
Download and install pxelinux to tftp root: &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cd /var/lib/tftpboot/&lt;br /&gt;
wget http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/netboot.tar.gz&lt;br /&gt;
tar -xvzf netboot.tar.gz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: trusty = ubuntu 14.04, precise = ubuntu 12.04&lt;br /&gt;
&lt;br /&gt;
===Set the kickstartfile as default, and the timer to 5 sec===&lt;br /&gt;
Enter the txt.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Rename the &amp;quot;default install&amp;quot; line to &amp;quot;default unattended&amp;quot; so the the unattended kickstart file will be executed by default &lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;label unattended&amp;quot; section in the bottom ofthe file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
label unattended&lt;br /&gt;
        menu label ^Unattended install&lt;br /&gt;
        kernel ubuntu-installer/amd64/linux&lt;br /&gt;
        append vga=768 initrd=ubuntu-installer/amd64/initrd.gz ks=http://10.0.0.1/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Change the timeout value to 50 in the default file.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/pxelinux.cfg/default&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Kickstart=&lt;br /&gt;
Install the http server lighttpd&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install lighttpd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create the ks.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /var/www/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The kickstart file==&lt;br /&gt;
Copy/paste the following text to the ks.cfg file. (Make your own changes like ip addresses and domain name, so it will fit your setup.)&lt;br /&gt;
&lt;br /&gt;
Note: When choosing a password, be sure to make it more than eight symbols, with letters, number sand specials symbols.  &amp;quot;unattended&amp;quot; install will stop waiting for confirmation of a weak password, if this advice is not followed... ;-)&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#Generated by Kickstart Configurator&lt;br /&gt;
#platform=x86&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Node configuration&lt;br /&gt;
#################&lt;br /&gt;
#System language&lt;br /&gt;
lang da_DK&lt;br /&gt;
#Language modules to install&lt;br /&gt;
langsupport us_EN&lt;br /&gt;
#System keyboard&lt;br /&gt;
keyboard dk&lt;br /&gt;
#System mouse&lt;br /&gt;
mouse&lt;br /&gt;
#System timezone&lt;br /&gt;
timezone Europe/Copenhagen&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#User configuration&lt;br /&gt;
#################&lt;br /&gt;
#Root password&lt;br /&gt;
rootpw cluster&lt;br /&gt;
#Initial user&lt;br /&gt;
user cluster --fullname &amp;quot;cluster&amp;quot; --password cluster&lt;br /&gt;
&lt;br /&gt;
#Reboot after installation&lt;br /&gt;
reboot&lt;br /&gt;
#Use text mode install&lt;br /&gt;
text&lt;br /&gt;
#Install OS instead of upgrade&lt;br /&gt;
install&lt;br /&gt;
#Use Web installation&lt;br /&gt;
url --url http://mirror.tekkom.dk/ubuntu/&lt;br /&gt;
#System bootloader configuration&lt;br /&gt;
bootloader --location=mbr&lt;br /&gt;
#Clear the Master Boot Record&lt;br /&gt;
zerombr yes&lt;br /&gt;
#Partition clearing information&lt;br /&gt;
clearpart --all --initlabel&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Disk configuration&lt;br /&gt;
#################&lt;br /&gt;
#Disk partitioning information&lt;br /&gt;
part / --fstype ext4 --size 1024&lt;br /&gt;
part /boot --fstype ext4 --size 512&lt;br /&gt;
part /home --fstype ext4 --size 1024&lt;br /&gt;
part /var --fstype ext4 --size 3072&lt;br /&gt;
part /tmp --fstype ext4 --size 3072&lt;br /&gt;
part /usr --fstype ext4 --size 5120&lt;br /&gt;
part swap --size 1024&lt;br /&gt;
&lt;br /&gt;
#System authorization infomation&lt;br /&gt;
auth  --useshadow  --enablemd5  --enablenis --nisdomain dka.local --nisserver 1$&lt;br /&gt;
#Network information&lt;br /&gt;
network --bootproto=dhcp --device=eth0&lt;br /&gt;
#Firewall configuration&lt;br /&gt;
firewall --disabled&lt;br /&gt;
#Do not configure the X Window System&lt;br /&gt;
skipx&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Package installation&lt;br /&gt;
#################&lt;br /&gt;
#Package install information&lt;br /&gt;
%packages&lt;br /&gt;
openssh-server&lt;br /&gt;
nmap&lt;br /&gt;
ssh&lt;br /&gt;
screen&lt;br /&gt;
bmon&lt;br /&gt;
iperf&lt;br /&gt;
bonnie++&lt;br /&gt;
lmbench&lt;br /&gt;
lm-sensors&lt;br /&gt;
snmpd&lt;br /&gt;
snmp&lt;br /&gt;
build-essential&lt;br /&gt;
gcc&lt;br /&gt;
openssh-client&lt;br /&gt;
nfs-common&lt;br /&gt;
mpich2&lt;br /&gt;
dsh&lt;br /&gt;
portmap&lt;br /&gt;
nis&lt;br /&gt;
%pre&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Scipt run&lt;br /&gt;
#################&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo &amp;quot;Pre-installation&amp;quot;&lt;br /&gt;
%post --nochroot&lt;br /&gt;
echo &amp;quot;portmap : 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/hosts.allow&lt;br /&gt;
echo &amp;quot;ypserver 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/yp.conf&lt;br /&gt;
perl -pi -w -e 's/\/home/\/home.old/g;' /target/etc/fstab&lt;br /&gt;
mkdir /target/mnt/tmp&lt;br /&gt;
echo &amp;quot;10.0.0.1:/home /home nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
echo &amp;quot;10.0.0.1:/script /mnt/tmp/ nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
/target/etc/init.d/nis restart&lt;br /&gt;
&lt;br /&gt;
mount 10.0.0.1:/home/ /home/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28328</id>
		<title>Cluster der kan alt/PXE and Kickstart</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/PXE_and_Kickstart&amp;diff=28328"/>
				<updated>2014-10-19T16:11:23Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Aim=&lt;br /&gt;
&lt;br /&gt;
To enable unattended installation and configuration of Ubuntu on nodes, so that their configuration matches the master machine.  This is achieved with PXE boot and configuration with Kickstart.&lt;br /&gt;
&lt;br /&gt;
=PXE=&lt;br /&gt;
Install tftp server&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
apt-get install tftpd-hpa&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Netinstaller==&lt;br /&gt;
&lt;br /&gt;
Download and install pxelinux to tftp root: &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cd /var/lib/tftpboot/&lt;br /&gt;
wget http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/netboot.tar.gz&lt;br /&gt;
tar -xvzf netboot.tar.gz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: trusty = ubuntu 14.04, precise = ubuntu 12.04&lt;br /&gt;
&lt;br /&gt;
===Set the kickstartfile as default, and the timer to 5 sec===&lt;br /&gt;
Enter the txt.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Rename the &amp;quot;default install&amp;quot; line to &amp;quot;default unattended&amp;quot; so the the unattended kickstart file will be executed by default &lt;br /&gt;
&lt;br /&gt;
Insert the &amp;quot;label unattended&amp;quot; section in the bottom ofthe file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
label unattended&lt;br /&gt;
        menu label ^Unattended install&lt;br /&gt;
        kernel ubuntu-installer/amd64/linux&lt;br /&gt;
        append vga=768 initrd=ubuntu-installer/amd64/initrd.gz ks=http://10.0.0.1/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Change the timeout value to 50 in the default file.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /var/lib/tftpboot/pxelinux.cfg/default&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Kickstart=&lt;br /&gt;
Install the http server lighttpd&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install lighttpd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Create the ks.cfg file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /var/www/kickstart/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The kickstart file==&lt;br /&gt;
Copy/paste the following text to the ks.cfg file. (Make your own changes like ip addresses and domain name, so it will fit your setup.)&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#Generated by Kickstart Configurator&lt;br /&gt;
#platform=x86&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Node configuration&lt;br /&gt;
#################&lt;br /&gt;
#System language&lt;br /&gt;
lang da_DK&lt;br /&gt;
#Language modules to install&lt;br /&gt;
langsupport us_EN&lt;br /&gt;
#System keyboard&lt;br /&gt;
keyboard dk&lt;br /&gt;
#System mouse&lt;br /&gt;
mouse&lt;br /&gt;
#System timezone&lt;br /&gt;
timezone Europe/Copenhagen&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#User configuration&lt;br /&gt;
#################&lt;br /&gt;
#Root password&lt;br /&gt;
rootpw cluster&lt;br /&gt;
#Initial user&lt;br /&gt;
user cluster --fullname &amp;quot;cluster&amp;quot; --password cluster&lt;br /&gt;
&lt;br /&gt;
#Reboot after installation&lt;br /&gt;
reboot&lt;br /&gt;
#Use text mode install&lt;br /&gt;
text&lt;br /&gt;
#Install OS instead of upgrade&lt;br /&gt;
install&lt;br /&gt;
#Use Web installation&lt;br /&gt;
url --url http://mirror.tekkom.dk/ubuntu/&lt;br /&gt;
#System bootloader configuration&lt;br /&gt;
bootloader --location=mbr&lt;br /&gt;
#Clear the Master Boot Record&lt;br /&gt;
zerombr yes&lt;br /&gt;
#Partition clearing information&lt;br /&gt;
clearpart --all --initlabel&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Disk configuration&lt;br /&gt;
#################&lt;br /&gt;
#Disk partitioning information&lt;br /&gt;
part / --fstype ext4 --size 1024&lt;br /&gt;
part /boot --fstype ext4 --size 512&lt;br /&gt;
part /home --fstype ext4 --size 1024&lt;br /&gt;
part /var --fstype ext4 --size 3072&lt;br /&gt;
part /tmp --fstype ext4 --size 3072&lt;br /&gt;
part /usr --fstype ext4 --size 5120&lt;br /&gt;
part swap --size 1024&lt;br /&gt;
&lt;br /&gt;
#System authorization infomation&lt;br /&gt;
auth  --useshadow  --enablemd5  --enablenis --nisdomain dka.local --nisserver 1$&lt;br /&gt;
#Network information&lt;br /&gt;
network --bootproto=dhcp --device=eth0&lt;br /&gt;
#Firewall configuration&lt;br /&gt;
firewall --disabled&lt;br /&gt;
#Do not configure the X Window System&lt;br /&gt;
skipx&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Package installation&lt;br /&gt;
#################&lt;br /&gt;
#Package install information&lt;br /&gt;
%packages&lt;br /&gt;
openssh-server&lt;br /&gt;
nmap&lt;br /&gt;
ssh&lt;br /&gt;
screen&lt;br /&gt;
bmon&lt;br /&gt;
iperf&lt;br /&gt;
bonnie++&lt;br /&gt;
lmbench&lt;br /&gt;
lm-sensors&lt;br /&gt;
snmpd&lt;br /&gt;
snmp&lt;br /&gt;
build-essential&lt;br /&gt;
gcc&lt;br /&gt;
openssh-client&lt;br /&gt;
nfs-common&lt;br /&gt;
mpich2&lt;br /&gt;
dsh&lt;br /&gt;
portmap&lt;br /&gt;
nis&lt;br /&gt;
%pre&lt;br /&gt;
&lt;br /&gt;
#################&lt;br /&gt;
#Scipt run&lt;br /&gt;
#################&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo &amp;quot;Pre-installation&amp;quot;&lt;br /&gt;
%post --nochroot&lt;br /&gt;
echo &amp;quot;portmap : 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/hosts.allow&lt;br /&gt;
echo &amp;quot;ypserver 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/yp.conf&lt;br /&gt;
perl -pi -w -e 's/\/home/\/home.old/g;' /target/etc/fstab&lt;br /&gt;
mkdir /target/mnt/tmp&lt;br /&gt;
echo &amp;quot;10.0.0.1:/home /home nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
echo &amp;quot;10.0.0.1:/script /mnt/tmp/ nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
/target/etc/init.d/nis restart&lt;br /&gt;
&lt;br /&gt;
mount 10.0.0.1:/home/ /home/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28327</id>
		<title>Cluster der kan alt/Installation af CUDA</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28327"/>
				<updated>2014-10-19T15:59:13Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af cuda=&lt;br /&gt;
Follow this tutorial: http://www.quantstart.com/articles/Installing-Nvidia-CUDA-on-Ubuntu-14-04-for-Linux-GPU-Computing&lt;br /&gt;
&lt;br /&gt;
Note: Suggest that you navigate to sub-directories in the samples directory and &amp;quot;make&amp;quot; individual projects.  To &amp;quot;make&amp;quot; the whole samples directory (as the tutorial suggests) takes around an hour!&lt;br /&gt;
&lt;br /&gt;
Note: .bash_profile is actually just called .profile&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28326</id>
		<title>Cluster der kan alt/Installation af CUDA</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28326"/>
				<updated>2014-10-19T15:58:41Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Installation af cuda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af cuda=&lt;br /&gt;
Follow this tutorial: http://www.quantstart.com/articles/Installing-Nvidia-CUDA-on-Ubuntu-14-04-for-Linux-GPU-Computing&lt;br /&gt;
&lt;br /&gt;
Note: Suggest that you navigate to sub-directories in the samples directory and &amp;quot;make&amp;quot; individual projects.  To &amp;quot;make&amp;quot; the whole samples directory (as the tutorial suggests) takes around an hour!&lt;br /&gt;
&lt;br /&gt;
Note: .bash_profile is actually just called .profile&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://forums.nvidia.com/index.php?showtopic=198030 After]&lt;br /&gt;
&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28325</id>
		<title>Cluster der kan alt/Installation af CUDA</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28325"/>
				<updated>2014-10-19T15:57:38Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Installation af cuda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af cuda=&lt;br /&gt;
Follow this tutorial: http://www.quantstart.com/articles/Installing-Nvidia-CUDA-on-Ubuntu-14-04-for-Linux-GPU-Computing&lt;br /&gt;
&lt;br /&gt;
Suggest that you navigate to sub-directories in the samples directory and &amp;quot;make&amp;quot; individual projects.  To &amp;quot;make&amp;quot; the whole samples directory (as the tutorial suggests) takes around an hour!&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://forums.nvidia.com/index.php?showtopic=198030 After]&lt;br /&gt;
&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28324</id>
		<title>Cluster der kan alt/Installation af CUDA</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28324"/>
				<updated>2014-10-19T15:57:25Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Installation af cuda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af cuda=&lt;br /&gt;
Follow this tutorial: http://www.quantstart.com/articles/Installing-Nvidia-CUDA-on-Ubuntu-14-04-for-Linux-GPU-Computing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suggest that you navigate to sub-directories in the samples directory and &amp;quot;make&amp;quot; individual projects.  To &amp;quot;make&amp;quot; the whole samples directory (as the tutorial suggests) takes around an hour!&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://forums.nvidia.com/index.php?showtopic=198030 After]&lt;br /&gt;
&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28323</id>
		<title>Cluster der kan alt/Installation af CUDA</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28323"/>
				<updated>2014-10-19T15:56:21Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Installation af cuda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af cuda=&lt;br /&gt;
Follow this tutorial: http://www.quantstart.com/articles/Installing-Nvidia-CUDA-on-Ubuntu-14-04-for-Linux-GPU-Computing&lt;br /&gt;
Suggest that you navigate to sub-directories in the samples directory and &amp;quot;make&amp;quot; individual projects.  To &amp;quot;make&amp;quot; the whole samples directory (as the tutorial suggests) takes around an hour!&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://forums.nvidia.com/index.php?showtopic=198030 After]&lt;br /&gt;
&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28322</id>
		<title>Cluster der kan alt/Installation af CUDA</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28322"/>
				<updated>2014-10-19T15:54:29Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Kommandoer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af cuda=&lt;br /&gt;
Follow this tutorial: http://www.quantstart.com/articles/Installing-Nvidia-CUDA-on-Ubuntu-14-04-for-Linux-GPU-Computing&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://forums.nvidia.com/index.php?showtopic=198030 After]&lt;br /&gt;
&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28321</id>
		<title>Cluster der kan alt/Installation af CUDA</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_CUDA&amp;diff=28321"/>
				<updated>2014-10-19T15:52:57Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Installation af cuda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af cuda=&lt;br /&gt;
Follow this tutorial: http://www.quantstart.com/articles/Installing-Nvidia-CUDA-on-Ubuntu-14-04-for-Linux-GPU-Computing&lt;br /&gt;
&lt;br /&gt;
=Kommandoer=&lt;br /&gt;
&lt;br /&gt;
Følgende kommando downloader CUDA fra nvidias hjemmeside, direkte til maskinen istedet for at downloade den til vores maskine og så overføre den efterfølgende.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
wget http://developer.download.nvidia.com/compute/cuda/5_0/rel-update-1/installers/cuda_5.0.35_linux_64_ubuntu11.10-1.run&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
chmod bruges til at ændre skrive rettighederne, +x står for execution,   &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
chmod +x cuda_5.0.35_linux_64_ubuntu11.10-1.run&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installer dependencies&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
aptitude install freeglut3-dev build-essential gcc-4.4 g++-4.4 -y&lt;br /&gt;
ln -s /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/libglut.so&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Følgende kommando starter installationen af CUDA &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
./cuda_5.0.35_linux_64_ubuntu11.10-1.run&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hvis den siger der skal genstartes under forløbet, så genstart maskinen og kør installeren igen.&lt;br /&gt;
tilføj følgende til .bashrc&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
export PATH=/usr/local/cuda/bin:$PATH&lt;br /&gt;
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH&lt;br /&gt;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/libnvvp/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test ved at lave en make /usr/local/cuda/samples/0_Simple/clock og kør ./clock&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://forums.nvidia.com/index.php?showtopic=198030 After]&lt;br /&gt;
&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28320</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28320"/>
				<updated>2014-10-19T15:47:50Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Lab environment on local PC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''LAST UPDATE AUTUMN 2014 (pre-course edits)''' Comments, corrections and additions welcome! :-)&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 14.04.1 64Bit (ubuntu-14.04.1-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloaded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt cacher and SSH auto login|Install and configure NFS server, apt-cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28319</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28319"/>
				<updated>2014-10-19T15:47:19Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Lab environment on local PC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''LAST UPDATE AUTUMN 2014 (pre-course edits)''' Comments, corrections and additions welcome! :-)&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 12.04.3 64Bit (ubuntu-12.04.3-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloaded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt cacher and SSH auto login|Install and configure NFS server, apt-cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28318</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28318"/>
				<updated>2014-10-19T15:45:57Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Lab environment on local PC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''UPDATE FALL 2013''' Under construction&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 12.04.3 64Bit (ubuntu-12.04.3-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloeded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt cacher and SSH auto login|Install and configure NFS server, apt-cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28317</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28317"/>
				<updated>2014-10-19T15:44:45Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: Reverted edits by Pasa (talk) to last revision by Thni&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''UPDATE FALL 2013''' Under construction&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 12.04.3 64Bit (ubuntu-12.04.3-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloeded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt cacher and SSH auto login|Install and configure NFS server, Apt-cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28316</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28316"/>
				<updated>2014-10-19T15:43:52Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Lab environment on local PC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''LAST UPDATE AUTUMN 2014 (pre-course edits)''' Comments, corrections and additions welcome! :-)&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 14.04.1 64Bit (ubuntu-14.04.1-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloaded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt-Cacher and SSH auto login|Install and configure NFS server, Apt cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28315</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28315"/>
				<updated>2014-10-19T15:42:05Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Lab environment on local PC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''LAST UPDATE AUTUMN 2014 (pre-course edits)''' Comments, corrections and additions welcome! :-)&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 14.04.1 64Bit (ubuntu-14.04.1-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloaded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt-cacher and SSH auto login|Install and configure NFS server, Apt cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28314</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28314"/>
				<updated>2014-10-19T15:41:22Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Lab environment on local PC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''LAST UPDATE AUTUMN 2014 (pre-course edits)''' Comments, corrections and additions welcome! :-)&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 14.04.1 64Bit (ubuntu-14.04.1-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloaded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt-cacher and SSH auto login|Install and configure NFS server, Apt-cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28313</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28313"/>
				<updated>2014-10-19T15:40:48Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Lab environment on local PC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''LAST UPDATE AUTUMN 2014 (pre-course edits)''' Comments, corrections and additions welcome! :-)&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 14.04.1 64Bit (ubuntu-14.04.1-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloaded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt-cacher and SSH auto login|Install and configure NFS server, apt-cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/dsh&amp;diff=28312</id>
		<title>Cluster der kan alt/dsh</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/dsh&amp;diff=28312"/>
				<updated>2014-10-19T15:39:46Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Brug af dsh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Brug af dsh==&lt;br /&gt;
Dsh er installeret med Kickstart filen. ellers apt-get install dsh&lt;br /&gt;
For at bruge DSH, bruger man en maskine liste, hvor man skriver de servere ind, som man skal connecte til.&lt;br /&gt;
Der er en med fra standard, når man har installeret. &lt;br /&gt;
Den ligger i /etc/dsh/machine.list&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/dsh/machine.list&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Her skriver man de servere/maskiner ind som man vil bruge.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
node1&lt;br /&gt;
node2&lt;br /&gt;
node3&lt;br /&gt;
node4&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28311</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28311"/>
				<updated>2014-10-19T15:37:45Z</updated>
		
		<summary type="html">&lt;p&gt;Pasa: /* Lab environment on local PC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''LAST UPDATE AUTUMN 2014 (pre-course edits)''' Comments, corrections and additions welcome! :-)&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 14.04.1 64Bit (ubuntu-14.04.1-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloaded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, apt-cacher and SSH auto login|Install and configure NFS server, apt-cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Pasa</name></author>	</entry>

	</feed>