pn7010 - technical document - giga web viewdc power input / ignition-check input / 2 serial ports....

17
1 PN7010 - Technical Document (Ver.1.0)

Upload: duongxuyen

Post on 06-Feb-2018

232 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

PN7010- Technical Document

(Ver.1.0)

1

Page 2: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

Contents

Revision History................................................................................................................................31. Overview......................................................................................................................................... 4

1.1 Product Design......................................................................................................................41.2 System.................................................................................................................................... 41.3 Hardware Description...........................................................................................................51.4 I/O Interface...........................................................................................................................6

1.4.1 Interface on Bottom.....................................................................................................61.4.2 10-pin SIO Port.............................................................................................................61.4.3 Side SIO Port (EXT-IR Port).........................................................................................61.4.4 External Cable Connection..........................................................................................71.4.5 AV-In...............................................................................................................................71.4.6 Rear Camera..................................................................................................................7

2. System Applications.....................................................................................................................83. Development Environment..........................................................................................................8

3.1 API (Application Programming Interface).........................................................................83.1.1 System Info...................................................................................................................83.1.2 Backlight......................................................................................................................103.1.3 Volume.........................................................................................................................143.1.4 Battery.........................................................................................................................153.1.5 Sample Program.........................................................................................................17

3.2 Serial Communication.........................................................................................................183.2.1 Storage........................................................................................................................183.2.2 UART.............................................................................................................................18

4. OS Update process......................................................................................................................18

2

Page 3: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

Revision HistoryRevisio

nIssue Date Author Change

1.0 2014-06-09

Don Seo Initial draft

3

Page 4: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

1. Overview1.1 Product Design

1.2 System1) Microsoft® Windows® CE 6.0 Core version2) Microsoft .NET Compact Framework: Version 2.0 / Version 3.53) Microsoft SQL Compact: Version 3.54) System Applications5) Auto-start Application

“App.exe” (which should be your main application) located in ResidentFlash or SD card is automatically launched.If there is no “App.exe” in ResidentFlash or SD card, “Explorer.exe” is automatically launched. So it is recommended to install “App.exe” only in ResisdentFlash and save related applications, files and/or data in SD card.

4

Page 5: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

1.3 Hardware DescriptionItem Specification

Display 7-inch TFT LCD (800x480px) with touch screenProcessor Telechips TCC8803 2.1GHz (ARM A8, 1.2GHz Core + 1GHz DSP)Operating System Microsoft Windows CE.Net 6.0 coreGPS Antenna High Performance Built-in GPS Antenna

External GPS Antenna – MCX type (optional)GPS Chipset High Sensitivity U-Blox 6Internal Memory 256MB DDR2 RAM

512MB ROM NAND FlashExternal Memory SD Card Slot (up to 16GB support)

External SD Box (optional)Wi-Fi (optional) 802.11 b/g/n SupportAudio Earphone Jack with Stereo Output

Built-in Two 1.5W SpeakerInterface USB 2.0 Host & Slave Ports

R-Cam Port for a Rear Parking CameraAV-out Port for Dual Display (optional)2 Serial (RS232, TTL) Connectivity

Power Rechargeable1600mAh Li-polymer Battery (optional)12~24V & 1.5A DC Car Charger or AC Home Charger (optional)12~24V Power Input on SIO Port (optional)

Size / Weight 182 x 115 x 21 mm / 367 grams

5

Page 6: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

1.4 I/O Interface1.4.1 Interface on Bottom

No Name Description1 Battery Switch Turn on/off the internal battery.2 SIO Port DC power input / ignition-check input / 2 serial ports3 USB Slave Port Connect a mini-USB cable4 Debug Port Engineering purpose only5 Ext. SD/USB Box Connect an extended SD/USB box (optional)

1.4.2 10-pin SIO PortPin# Name Description

1 GND Ground line for power2 DC 12~24V 12~24V power input line3 GND (SIO#1) Ground line for RS232 serial communication4 TX1 (SIO#1) Transmit data as RS232C level (Vcc_-6~6V) on COM4 port5 RX1 (SIO#1) Receive data as RS232C level on COM4 port6 GND (SIO#2) Ground line for TTL serial communication7 TX2 (SIO#2) Transmit data as TTL level (Vcc_0~3.3V) on COM3 port8 RX2 (SIO#2) Receive data as TTL level (Vcc_0~3.3V) on COM3 port9 GPIO1 Ignition input line (TBD)10 GPIO2

1.4.3 Side SIO Port (EXT-IR Port)

6

① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤① ② ③ ④ ⑤

Page 7: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

1.4.4 External Cable Connection

10-pin cable for power supply and SIO ports Serial Cable for side SIO port USB cable for active sync Extended SD/USB Box

1.4.5 AV-In Pin

information

1.4.6 Rear Camera It can be auto detected. Pin

information

2. System ApplicationsThe following system applications are located in \ResisdentFlash\apps.

Application Description

7

10pin cable

Serial cable

USB cable

ExtendedSD/USB box

Page 8: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

AVin AV-in applicationBrowser Demo version of Opera miniConfiguration Configuration applicationProcessManager hidden application controlling systemRCAM Video-in application for rearview cameraVolumeDisplay Volume control applicationwifiConfig Configuration application for WiFi connectivity

3. Development EnvironmentFor application development, SDK (“TCC89x_Magellan_WinCE600_SDK.msi”.) should be installed in PC.

3.1 API (Application Programming Interface)3.1.1 System Info

UUID+ Define

#define DISK_GET_SERIALNUM_IOCTLCode(4,METHOD_BUFFERED)

+ ControlDWORD ReadUUID(UCHAR * pUuidBuf){HANDLE hNandDrv;UCHAR Buffer[32];DWORD returned_bytes;DWORD cnt = 0;

memset(Buffer, 0x00, sizeof(Buffer));hNandDrv = CreateFile(L"DSK1:",

GENERIC_READ|GENERIC_WRITE, NULL,

NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_WRITE_THROUGH, NULL);

if( hNandDrv == NULL){RETAILMSG(0,(_T("Cannot Open NAND Driver...\r\n")));return 0;}

if(DeviceIoControl(hNandDrv, DISK_GET_SERIALNUM, NULL, 0, Buffer, sizeof(Buffer), &returned_bytes, NULL ) == 0){RETAILMSG(TRUE, (_T("Get NAND Serial Number Failed...")));CloseHandle(hNandDrv);return 0 ;}

CloseHandle(hNandDrv);memcpy(pUuidBuf, Buffer, 32);

return returned_bytes;}

8

Page 9: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

PRODUCT ID+ Control

DWORD CVersion::ReadKernelVersion (void){ HKEY hKey; LONG lResult; DWORD dwType; DWORD dwVal=0; DWORD dwLen;

lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\cns_link\\Version", 0,KEY_ALL_ACCESS, &hKey); if(ERROR_SUCCESS == lResult) {

TCHAR szTest[100]={0,};dwType = REG_SZ;

dwLen = 100;RegQueryValueEx(hKey, L"Kernel", NULL, &dwType,(PBYTE)szTest, &dwLen);GetDlgItem(IDC_VER_ST_OS)->SetWindowText(szTest);

dwLen = 100;RegQueryValueEx(hKey, L"KernelDate", NULL, &dwType,(PBYTE)szTest,

&dwLen);GetDlgItem(IDC_OS_DATE)->SetWindowText(szTest);

dwLen = 100;RegQueryValueEx(hKey, L"Model", NULL, &dwType,(PBYTE)szTest, &dwLen);GetDlgItem(IDC_MODEL)->SetWindowText(szTest);

dwLen = 100;RegQueryValueEx(hKey, L"CPU", NULL, &dwType,(PBYTE)szTest, &dwLen);GetDlgItem(IDC_CPU)->SetWindowText(szTest);

dwLen = 100;RegQueryValueEx(hKey, L"Memory", NULL, &dwType,(PBYTE)szTest,

&dwLen);GetDlgItem(IDC_RAM)->SetWindowText(szTest);

RegCloseKey(hKey); }return 0;}

3.1.2 Backlight LCD ON/OFF

+ Define#define IOCTL_BACKLIGHT_ON_OFF CTL_CODE( FILE_DEVICE_SERVICE, 0x0A00+0x1001, METHOD_BUFFERED, FILE_ANY_ACCESS )

+ Controlint onoff = 0;unsigned long m_RetSize;HANDLE pBLK;

onoff = 0;pBLK = CreateFile(L"BKL1:", GENERIC_READ | GENERIC_WRITE, NULL, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

9

Page 10: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

DeviceIoControl(pBLK, IOCTL_BACKLIGHT_ON_OFF, &onoff, sizeof(int), NULL, NULL, &m_RetSize,NULL);CloseHandle(pBLK);

BRIGHT CONTROL(Source) + Note

Need "IniFileIO.h" and "IniFileIO.cpp"+ Define

#define CTLW_CHANGE_BACKLIGHT 101

//Global Variableint dwRegDayLightLevel;int dwRegNightLevel;

//MessageUINT MSG_ConfigtoProcessManager;

+ Functionint InitBackLightSetting(){

int readValue,nightTime, dayTime = 0;CString strSection, strKey, strKey2; SYSTEMTIME Time;

GetLocalTime(&Time);

strSection = _T("BackLight");strKey = _T("NIGHT_MODE");readValue = GetPrivateProfileInt(strSection, strKey, 0,PATH_INI);

strKey2 = _T("PMTIME");nightTime = GetPrivateProfileInt(strSection, strKey2, 0,PATH_INI);strKey2 = _T("AMTIME");dayTime = GetPrivateProfileInt(strSection, strKey2, 0,PATH_INI);

if(readValue) //USE NIGHT MODE{

if((nightTime > Time.wHour) && (dayTime < Time.wHour)) //DAYstrKey = _T("DAY");

elsestrKey = _T("NIGHT"); //NIGHT

readValue = GetPrivateProfileInt(strSection, strKey, 0,PATH_INI);}else{

strKey = _T("DAY");readValue = GetPrivateProfileInt(strSection, strKey, 0,PATH_INI);

}return readValue;

}

+ Initialize//DAYdwRegDayLightLevel = GetPrivateProfileInt(_T("BackLight"), _T("DAY"), 4,PATH_INI);

//NIGHTdwRegNightLevel = GetPrivateProfileInt(_T("BackLight"), _T("NIGHT"), 4,PATH_INI);

10

Page 11: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

MSG_ConfigtoProcessManager = RegisterWindowMessage(_T("MSG_ConfigtoProcessManager"));

+ Control(Bright)CString strSection, strKey;CString strReadValue;

#if 1 //DAY{

strSection = _T("BackLight");strKey = _T("DAY");

if(dwRegDayLightLevel<11-1) dwRegDayLightLevel++;

WritePrivateProfileInt(strSection, strKey, dwRegDayLightLevel, PATH_INI);

strReadValue.Format(_T("%d"), dwRegDayLightLevel);GetDlgItem(IDC_STATIC_BACKLIGHT)->SetWindowText(strReadValue);

}#else //NIGHT{

strSection = _T("BackLight");strKey = _T("NIGHT");

if(dwRegNightLevel<11-1) dwRegNightLevel++;

WritePrivateProfileInt(strSection, strKey, dwRegNightLevel, PATH_INI);

strReadValue.Format(_T("%d"), dwRegNightLevel);GetDlgItem(IDC_STATIC_BACKLIGHT)->SetWindowText(strReadValue);

}#endif

::PostMessage(HWND_BROADCAST, MSG_ConfigtoProcessManager, CTLW_CHANGE_BACKLIGHT, NULL);

+ Control(Dark)CString strSection, strKey;CString strReadValue;

#if 1 //DAY{

strSection = _T("BackLight");strKey = _T("DAY"); //NIGHT MODE : _T("NIGHT")

if(dwRegDayLightLevel>0) dwRegDayLightLevel--;

WritePrivateProfileInt(strSection, strKey, dwRegDayLightLevel, PATH_INI);

strReadValue.Format(_T("%d"), dwRegDayLightLevel);GetDlgItem(IDC_STATIC_BACKLIGHT)->SetWindowText(strReadValue);

}#else //NIGHT{

strSection = _T("BackLight");strKey = _T("NIGHT");

if(dwRegNightLevel>0) dwRegNightLevel--;

11

Page 12: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

WritePrivateProfileInt(strSection, strKey, dwRegNightLevel, PATH_INI);

strReadValue.Format(_T("%d"), dwRegNightLevel);GetDlgItem(IDC_STATIC_BACKLIGHT)->SetWindowText(strReadValue);

}#endif

::PostMessage(HWND_BROADCAST, MSG_ConfigtoProcessManager, CTLW_CHANGE_BACKLIGHT, NULL);

3.1.3 Volume Note

Need "IniFileIO.h" and "IniFileIO.cpp"

Read to System VolumeCString strSection, strKey;strSection = _T("Sound");strKey = _T("SystemVolume");int gVolumeLevel = GetPrivateProfileInt(strSection, strKey, 0,PATH_INI);

Read to Mute StatusCString strSection, strKey;strSection = _T("Sound");strKey = _T("MUTE");int readValue = GetPrivateProfileInt(strSection, strKey, 0,PATH_INI);

Mute On+ Define

#define WM_PROCESSMESSAGE WM_USER+243#define PROCESS_MUTEON 0x8E

+ Control::PostMessage(HWND_BROADCAST, WM_PROCESSMESSAGE, PROCESS_MUTEON, NULL);

Mute Off+ Define

#define WM_PROCESSMESSAGE WM_USER+243#define PROCESS_MUTEOFF 0x8D

+ Control::PostMessage(HWND_BROADCAST, WM_PROCESSMESSAGE, PROCESS_MUTEOFF, NULL);

Volume UP+ Define

#define WM_PROCESSMESSAGE WM_USER+243#define PROCESS_VOLUMEUP 0x78

+ Control::SendMessage(HWND_BROADCAST, WM_PROCESSMESSAGE, PROCESS_VOLUMEUP, NULL);

//Read Value of VolumeCString strSection, strKey;strSection = _T("Sound");strKey = _T("SystemVolume");int readValue = GetPrivateProfileInt(strSection, strKey, 0,PATH_INI);

Volume Down+ Define

12

Page 13: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

#define WM_PROCESSMESSAGE WM_USER+243#define PROCESS_VOLUMEDOWN 0x79

+ Control::SendMessage(HWND_BROADCAST, WM_PROCESSMESSAGE, PROCESS_VOLUMEDOWN, NULL);

//Read Value of VolumeCString strSection, strKey;strSection = _T("Sound");strKey = _T("SystemVolume");int readValue = GetPrivateProfileInt(strSection, strKey, 0,PATH_INI);

3.1.4 Battery Note

Need for links to "CommonLib.lib" and "CommonLib.dll"

Read Value+ Define

#pragma comment(lib, "CommonLib.lib")__declspec(dllimport) DWORD _GetBattery_(void);

DWORD g_dwBattery;

enum _PROGRESS_POSITION_{

_LEVEL_0 = 0,_LEVEL_1 = 25,_LEVEL_2 = 50,_LEVEL_3 = 75,_LEVEL_4 = 100,

};

enum _PROGRESS_BATTERYSTATUS_{

_BATTERY_CHARGING,_BATTERY_CHARGING_BATLOW,_BATTERY_CHARGING_BATFULL,_BATTERY_USE,_BATTERY_USE_BATLOW,_BATTERY_USE_POWEROFF,

};

+ Function(MFC)void SetProgress(WORD Level, WORD BatteryStatus){

switch(BatteryStatus){case _BATTERY_CHARGING:

GetDlgItem(IDC_STATIC_BATSTATUS)->SetWindowText(_T("Charging")); break;

case _BATTERY_USE:GetDlgItem(IDC_STATIC_BATSTATUS)->SetWindowText(_T("Battery use")); break;

case _BATTERY_CHARGING_BATFULL:GetDlgItem(IDC_STATIC_BATSTATUS)->SetWindowText(_T("Battery Full")); break;

case _BATTERY_CHARGING_BATLOW:GetDlgItem(IDC_STATIC_BATSTATUS)->SetWindowText(_T("Charging Low"));

13

Page 14: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

break;case _BATTERY_USE_BATLOW:

GetDlgItem(IDC_STATIC_BATSTATUS)->SetWindowText(_T("Use Low"));break;

case _BATTERY_USE_POWEROFF:GetDlgItem(IDC_STATIC_BATSTATUS)->SetWindowText(_T("Power off")); break;

}m_wndProgress.SetPos(Level);return;

}

+ Controlg_dwBattery = _GetBattery_();if(g_dwBattery == 0)SetProgress(_LEVEL_0, _BATTERY_USE_POWEROFF);else if(g_dwBattery == 11) SetProgress(_LEVEL_0, _BATTERY_USE_BATLOW);else if(g_dwBattery == 100) SetProgress(_LEVEL_0, _BATTERY_USE);else if(g_dwBattery == 101) SetProgress(_LEVEL_1, _BATTERY_USE);else if(g_dwBattery == 102) SetProgress(_LEVEL_2, _BATTERY_USE);else if(g_dwBattery == 103) SetProgress(_LEVEL_3, _BATTERY_USE);else if(g_dwBattery == 104) SetProgress(_LEVEL_4, _BATTERY_USE);else if(g_dwBattery == 21) SetProgress(_LEVEL_0, _BATTERY_CHARGING_BATLOW);else if(g_dwBattery == 200) SetProgress(_LEVEL_0, _BATTERY_CHARGING);else if(g_dwBattery == 201) SetProgress(_LEVEL_1, _BATTERY_CHARGING);else if(g_dwBattery == 202) SetProgress(_LEVEL_2, _BATTERY_CHARGING);else if(g_dwBattery == 203) SetProgress(_LEVEL_3, _BATTERY_CHARGING);else if(g_dwBattery == 204) SetProgress(_LEVEL_4, _BATTERY_CHARGING);else if(g_dwBattery == 205) SetProgress(_LEVEL_4, _BATTERY_CHARGING_BATFULL);

3.1.5 Sample ProgramWinCE MFC sample program is provided.

14

Page 15: PN7010 - Technical Document - Giga   Web viewDC power input / ignition-check input / 2 serial ports. 3. ... (WORD Level, WORD BatteryStatus) ... Technical Document

3.2 Serial Communication3.2.1 Storage

Item Name RemarksNAND1 ResidentFlash FixedNAND2 ResidentFlash2 FixedSD1 SDMMCDisk FixedSD2 SDMMCDisk FixedUSB1 USB Disk, USB Disk2, … FlexibleUSB2 USB Disk, USB Disk2, … Flexible

3.2.2 UARTIt can be set up in ‘Serial.reg’.

Item Descriptions RemarksHW DriverSpecification

channel0 (DMA) - port 0 (Flow Control) - COMx => Debugchannel1 (DMA) - port 1 (Flow Control) - COM3 => TRIPchannel2 (DMA) - port 4 (Flow Control) - COM2 => GPS 2channel3 (DMA) - port 5 (Flow Control) - COM1 => GPS 1channel4 (NO DMA) - port 2 (NO F/C) - NCchannel5 (NO DMA)- port 3 (NO F/C) - COM4 => Spare

4. OS Update process1) Copy OS files on the root of the SD card.2) Insert the SD card in the device.3) Start the device, then the update process will start automatically.4) Once the update is completed, remove the SD card from the device.

15