Filename: hal_MSP-EXP430F5438.h\r
\r
Copyright 2010 Texas Instruments, Inc.\r
- \r
+\r
This is the master header file and also the only necessary file to be included\r
-in order to use MSP-EXP430F5438 HAL. \r
+in order to use MSP-EXP430F5438 HAL.\r
***************************************************************************/\r
#ifndef HAL_MSP_EXP430F5438_H\r
#define HAL_MSP_EXP430F5438_H\r
\r
-#include "msp430.h" \r
+#include "msp430.h"\r
\r
-#include "hal_PMM.h"\r
+//#include "hal_PMM.h"\r
#include "hal_UCS.h"\r
\r
#include "hal_lcd.h"\r
#include "hal_buttons.h"\r
-#include "hal_adc.h"\r
+//#include "hal_adc.h"\r
#include "hal_board.h"\r
-#include "hal_usb.h"\r
+//#include "hal_usb.h"\r
#include "hal_buttons.h"\r
-#include "hal_rf.h"\r
-#include "hal_rtc.h" \r
-#include "hal_tlv.h" \r
+//#include "hal_rf.h"\r
+//#include "hal_rtc.h"\r
+//#include "hal_tlv.h"\r
\r
#endif /* HAL_MSP_EXP430F5438_H */\r
-/** \r
+/**\r
* @file hal_board.c\r
- * \r
+ *\r
* Copyright 2010 Texas Instruments, Inc.\r
******************************************************************************/\r
#include "msp430.h"\r
#include "hal_MSP-EXP430F5438.h"\r
\r
/**********************************************************************//**\r
- * @brief Initializes ACLK, MCLK, SMCLK outputs on P11.0, P11.1, \r
+ * @brief Initializes ACLK, MCLK, SMCLK outputs on P11.0, P11.1,\r
* and P11.2, respectively.\r
- * \r
+ *\r
* @param none\r
- * \r
+ *\r
* @return none\r
*************************************************************************/\r
void halBoardOutputSystemClock(void) //outputs clock to testpoints\r
{\r
CLK_PORT_DIR |= 0x07;\r
- CLK_PORT_SEL |= 0x07; \r
+ CLK_PORT_SEL |= 0x07;\r
}\r
\r
/**********************************************************************//**\r
* @brief Stops the output of ACLK, MCLK, SMCLK on P11.0, P11.1, and P11.2.\r
- * \r
+ *\r
* @param none\r
- * \r
+ *\r
* @return none\r
*************************************************************************/\r
void halBoardStopOutputSystemClock(void)\r
-{ \r
+{\r
CLK_PORT_OUT &= ~0x07;\r
CLK_PORT_DIR |= 0x07; \r
- CLK_PORT_SEL &= ~0x07; \r
+ CLK_PORT_SEL &= ~0x07;\r
}\r
\r
/**********************************************************************//**\r
- * @brief Initializes all GPIO configurations. \r
- * \r
+ * @brief Initializes all GPIO configurations.\r
+ *\r
* @param none\r
- * \r
+ *\r
* @return none\r
*************************************************************************/\r
void halBoardInit(void)\r
-{ \r
+{\r
//Tie unused ports\r
PAOUT = 0;\r
- PADIR = 0xFFFF; \r
+ PADIR = 0xFFFF;\r
PASEL = 0;\r
- PBOUT = 0; \r
+ PBOUT = 0;\r
PBDIR = 0xFFFF;\r
PBSEL = 0;\r
- PCOUT = 0; \r
+ PCOUT = 0;\r
PCDIR = 0xFFFF;\r
- PCSEL = 0; \r
- PDOUT = 0; \r
+ PCSEL = 0;\r
+ PDOUT = 0;\r
PDDIR = 0xFFFF;\r
- PDSEL = 0x0003; \r
- PEOUT = 0; \r
- PEDIR = 0xFEFF; // P10.0 to USB RST pin, \r
+ PDSEL = 0x0003;\r
+ PEOUT = 0;\r
+ PEDIR = 0xFEFF; // P10.0 to USB RST pin,\r
// ...if enabled with J5\r
- PESEL = 0; \r
+ PESEL = 0;\r
P11OUT = 0;\r
P11DIR = 0xFF;\r
- PJOUT = 0; \r
+ PJOUT = 0;\r
PJDIR = 0xFF;\r
P11SEL = 0;\r
- \r
- AUDIO_PORT_OUT = AUDIO_OUT_PWR_PIN ;\r
- USB_PORT_DIR &= ~USB_PIN_RXD; // USB RX Pin, Input with \r
- // ...pulled down Resistor\r
- USB_PORT_OUT &= ~USB_PIN_RXD;\r
- USB_PORT_REN |= USB_PIN_RXD;\r
}\r
/* Demo application includes. */\r
#include "serial.h"\r
\r
-/* HAL includes. */\r
-#include "hal_usb.h"\r
-\r
/* Constants required to setup the hardware. */\r
#define serTX_AND_RX ( ( unsigned portCHAR ) 0x03 )\r
\r
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
\r
- USB_PORT_SEL |= USB_PIN_RXD + USB_PIN_TXD;\r
- USB_PORT_DIR |= USB_PIN_TXD;\r
- USB_PORT_DIR &= ~USB_PIN_RXD;\r
-\r
/* Reset UART. */\r
UCA1CTL1 |= UCSWRST;\r
\r
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1"?>\r
+\r
+<Project>\r
+ <Desktop>\r
+ <Static>\r
+ <Debug-Log>\r
+ \r
+ \r
+ <PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>\r
+ <Build>\r
+ \r
+ \r
+ \r
+ \r
+ <ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1216</ColumnWidth1><ColumnWidth2>324</ColumnWidth2><ColumnWidth3>81</ColumnWidth3><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows></Build>\r
+ <Workspace>\r
+ <ColumnWidths>\r
+ \r
+ \r
+ \r
+ \r
+ <Column0>247</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>\r
+ </Workspace>\r
+ <Disassembly>\r
+ \r
+ \r
+ \r
+ <PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><MixedMode>1</MixedMode><CodeCovShow>1</CodeCovShow><InstrProfShow>1</InstrProfShow></Disassembly>\r
+ <Register><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows></Register><Memory><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory><Watch><Format><struct_types/><watch_formats><Fmt><Key>{W}Watch-0:TA1CTL</Key><Value>4</Value></Fmt><Fmt><Key>{W}Watch-0:ulSP_PC_Combined</Key><Value>4</Value></Fmt></watch_formats></Format><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>134</Column0><Column1>139</Column1><Column2>124</Column2><Column3>100</Column3></Watch><Breakpoints><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows></Breakpoints><TASKVIEW><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>200</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3><Column4>100</Column4><Column5>100</Column5><Column6>100</Column6><Column7>150</Column7></TASKVIEW><TerminalIO><InputSource>1</InputSource><InputMode>10</InputMode><Filename>$PROJ_DIR$\TermIOInput.txt</Filename><InputEcho>1</InputEcho><ShowReset>0</ShowReset></TerminalIO><DeviceInformationWindow><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>150</Column0><Column1>150</Column1></DeviceInformationWindow><StateStorageDialog><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows></StateStorageDialog><SequencerDialog><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><SequencerMask>0</SequencerMask><Advanced>0</Advanced></SequencerDialog></Static>\r
+ <Windows>\r
+ \r
+ \r
+ \r
+ <Wnd1>\r
+ <Tabs>\r
+ <Tab>\r
+ <Identity>TabID-11539-27703</Identity>\r
+ <TabName>Workspace</TabName>\r
+ <Factory>Workspace</Factory>\r
+ <Session>\r
+ \r
+ <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode></NodeDict></Session>\r
+ </Tab>\r
+ </Tabs>\r
+ \r
+ <SelectedTab>0</SelectedTab></Wnd1><Wnd2><Tabs><Tab><Identity>TabID-12395-27916</Identity><TabName>Terminal I/O</TabName><Factory>TerminalIO</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd2><Wnd4><Tabs><Tab><Identity>TabID-25408-8444</Identity><TabName>Tasks</TabName><Factory>TASKVIEW</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd4></Windows>\r
+ <Editor>\r
+ \r
+ \r
+ \r
+ \r
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\MSP-EXP430F5438_HAL\hal_lcd.c</Filename><XPos>0</XPos><YPos>809</YPos><SelStart>27981</SelStart><SelEnd>27996</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>353</YPos><SelStart>13834</SelStart><SelEnd>13834</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\queue.c</Filename><XPos>0</XPos><YPos>451</YPos><SelStart>19345</SelStart><SelEnd>19345</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>54</YPos><SelStart>3921</SelStart><SelEnd>3921</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\lnk430F5438A_mod.xcl</Filename><XPos>0</XPos><YPos>177</YPos><SelStart>5081</SelStart><SelEnd>5081</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>1590</YPos><SelStart>50218</SelStart><SelEnd>50218</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\MSP430X\port.c</Filename><XPos>0</XPos><YPos>163</YPos><SelStart>7271</SelStart><SelEnd>7271</SelEnd></Tab><ActiveTab>6</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>\r
+ <Positions>\r
+ \r
+ \r
+ \r
+ \r
+ \r
+ <Top><Row0><Sizes><Toolbar-012aad68><key>iaridepm.enu1</key></Toolbar-012aad68><Toolbar-0917a2f0><key>430fet1</key></Toolbar-0917a2f0></Sizes></Row0><Row1><Sizes><Toolbar-078c7038><key>debuggergui.enu1</key></Toolbar-078c7038></Sizes></Row1><Row2><Sizes/></Row2><Row3><Sizes/></Row3><Row4><Sizes/></Row4><Row5><Sizes/></Row5><Row6><Sizes/></Row6><Row7><Sizes/></Row7><Row8><Sizes/></Row8><Row9><Sizes/></Row9><Row10><Sizes/></Row10></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>532</Bottom><Right>321</Right><x>-2</x><y>-2</y><xscreen>121</xscreen><yscreen>150</yscreen><sizeHorzCX>72024</sizeHorzCX><sizeHorzCY>152749</sizeHorzCY><sizeVertCX>192262</sizeVertCX><sizeVertCY>543788</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>532</Bottom><Right>399</Right><x>-2</x><y>-2</y><xscreen>121</xscreen><yscreen>150</yscreen><sizeHorzCX>72024</sizeHorzCX><sizeHorzCY>152749</sizeHorzCY><sizeVertCX>238690</sizeVertCX><sizeVertCY>543788</sizeVertCY></Rect></Wnd2></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>382</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>384</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>391039</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd4></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
+ </Desktop>\r
+</Project>\r
+\r
+\r
--- /dev/null
+[DebugChecksum]\r
+Checksum=-802929519\r
+[DisAssemblyWindow]\r
+NumStates=_ 1\r
+State 1=_ 1\r
+[InstructionProfiling]\r
+Enabled=_ 0\r
+[CodeCoverage]\r
+Enabled=_ 0\r
+[State Storage]\r
+Control Register=0\r
+[Sequencer]\r
+Control Register=0\r
+NextState0=0\r
+NextState1=0\r
+[Action Register]\r
+Break=1\r
+State Storage=0\r
+[Profiling]\r
+Enabled=0\r
+[StackPlugin]\r
+Enabled=0\r
+OverflowWarningsEnabled=1\r
+WarningThreshold=90\r
+SpWarningsEnabled=0\r
+WarnHow=0\r
+UseTrigger=1\r
+TriggerName=main\r
+LimitSize=0\r
+ByteLimit=50\r
+[TermIOLog]\r
+LoggingEnabled=_ 0\r
+LogFile=_ ""\r
+[CallStackLog]\r
+Enabled=0\r
+[DriverProfiling]\r
+Enabled=0\r
+Mode=303237632\r
+Graph=0\r
+Symbiont=0\r
+[Log file]\r
+LoggingEnabled=_ 0\r
+LogFile=_ ""\r
+Category=_ 0\r
+[Breakpoints]\r
+Count=0\r
+[FET]\r
+Clock mode=14\r
+Extended Clock mode=4047\r
+Secure Password=\r
+Extended Clock Control Enable=1\r
+Advanced Extended Clock Control=0\r
+Emulation mode=0\r
+Free running=0\r
+Shutting Down=1\r
+[Memory Dump]\r
+Start address=\r
+Lenghth=\r
+Address info=0\r
+Format=0\r
+Dump registers=0\r
+PC=0\r
+SP=0\r
+SR=0\r
+all registers=0\r
+File name=\r
+[Aliases]\r
+Count=0\r
+SuppressDialog=0\r
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1"?>\r
+\r
+<Workspace>\r
+ <ConfigDictionary>\r
+ \r
+ <CurrentConfigs><Project>RTOSDemo/Release</Project></CurrentConfigs></ConfigDictionary>\r
+ <Desktop>\r
+ <Static>\r
+ <Workspace>\r
+ <ColumnWidths>\r
+ \r
+ \r
+ \r
+ \r
+ <Column0>401</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>\r
+ </Workspace>\r
+ <Build>\r
+ \r
+ \r
+ \r
+ \r
+ <ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1216</ColumnWidth1><ColumnWidth2>324</ColumnWidth2><ColumnWidth3>81</ColumnWidth3></Build>\r
+ <TerminalIO/>\r
+ <Debug-Log><ColumnWidth0>18</ColumnWidth0><ColumnWidth1>1624</ColumnWidth1></Debug-Log><Find-in-Files><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-in-Files></Static>\r
+ <Windows>\r
+ \r
+ \r
+ <Wnd0>\r
+ <Tabs>\r
+ <Tab>\r
+ <Identity>TabID-18858-27566</Identity>\r
+ <TabName>Workspace</TabName>\r
+ <Factory>Workspace</Factory>\r
+ <Session>\r
+ \r
+ <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/F5XX_6XX_Core_Lib</ExpandedNode><ExpandedNode>RTOSDemo/MSP-EXP430F5438_HAL</ExpandedNode><ExpandedNode>RTOSDemo/Output</ExpandedNode><ExpandedNode>RTOSDemo/UserExperienceDemo</ExpandedNode></NodeDict></Session>\r
+ </Tab>\r
+ </Tabs>\r
+ \r
+ <SelectedTab>0</SelectedTab></Wnd0><Wnd1>\r
+ <Tabs>\r
+ <Tab>\r
+ <Identity>TabID-25947-27638</Identity>\r
+ <TabName>Build</TabName>\r
+ <Factory>Build</Factory>\r
+ <Session/>\r
+ </Tab>\r
+ <Tab><Identity>TabID-5978-12679</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-22019-23227</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs>\r
+ \r
+ <SelectedTab>0</SelectedTab></Wnd1></Windows>\r
+ <Editor>\r
+ \r
+ \r
+ \r
+ \r
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\MSP-EXP430F5438_HAL\hal_lcd.c</Filename><XPos>0</XPos><YPos>809</YPos><SelStart>27981</SelStart><SelEnd>27996</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>353</YPos><SelStart>13834</SelStart><SelEnd>13834</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\queue.c</Filename><XPos>0</XPos><YPos>451</YPos><SelStart>19345</SelStart><SelEnd>19345</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>54</YPos><SelStart>3921</SelStart><SelEnd>3921</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\lnk430F5438A_mod.xcl</Filename><XPos>0</XPos><YPos>177</YPos><SelStart>5081</SelStart><SelEnd>5081</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>1590</YPos><SelStart>50218</SelStart><SelEnd>50218</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\MSP430X\port.c</Filename><XPos>0</XPos><YPos>163</YPos><SelStart>7271</SelStart><SelEnd>7271</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\MSP-EXP430F5438_HAL\hal_MSP-EXP430F5438.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>669</SelStart><SelEnd>669</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\MSP-EXP430F5438_HAL\hal_board.c</Filename><XPos>0</XPos><YPos>44</YPos><SelStart>1725</SelStart><SelEnd>1725</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\serial.c</Filename><XPos>0</XPos><YPos>83</YPos><SelStart>4515</SelStart><SelEnd>4515</SelEnd></Tab><ActiveTab>9</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>\r
+ <Positions>\r
+ \r
+ \r
+ \r
+ \r
+ \r
+ <Top><Row0><Sizes><Toolbar-012aad68><key>iaridepm.enu1</key></Toolbar-012aad68></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>645</Bottom><Right>475</Right><x>-2</x><y>-2</y><xscreen>331</xscreen><yscreen>267</yscreen><sizeHorzCX>197024</sizeHorzCX><sizeHorzCY>271894</sizeHorzCY><sizeVertCX>283929</sizeVertCX><sizeVertCY>658859</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>293</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>295</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>300407</sizeHorzCY><sizeVertCX>197024</sizeVertCX><sizeVertCY>271894</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
+ </Desktop>\r
+</Workspace>\r
+\r
+\r