MTK平台手机硬件培训72614共40页文档

合集下载

MTK软件培训课程(三)MTK驱动架构分析精品PPT课件

MTK软件培训课程(三)MTK驱动架构分析精品PPT课件
除了Camera模块外,Idle screen和Media Player 等也使用GDI。
GDI和pixtel_UI的关系
GDI的实现
使用GDI_HANDLE,gdi_handle来操作 GDI对象,GDI的对象可以是layer,gif, jpeg等。 GDI函数返回一个GDI_RESULT GDI函数使用互斥来保护,进入GDI函数 时调用GDI_ENTER_CRITICAL_SECTION()退 出函数时调用GDI_EXIT_CRITICAL_SECTION()
Media Task线程从med_create开始创建,其实 med_create函数只是将入口地址传递给库里的 函数,由里面的函数来创建线程。
Med_create中传入了以下的函数:
med_task_main,
/* 线程入口,消息泵 */
med_init,/*源自初始化 ,指定空间分配*/NULL,
设置当前活动模块,通过stack_set_active_module_id 分发消息,通过消息号,找到对应的消息处理函数,
使用med_main函数。程序里面有很大的一个消息索 引 释放返回消息数据内存区域,free_ilm
Media Task消息
从med_maincam_main相应的消息处 理函数,这时从MDI发过来的一个消息 才被识别,并进入相应的消息处理函数。 这时,我们回过头来再来看我们前面在 MDI章节所分析的Preview实现的例子, 会更清晰一些。 原来的例子:Preview实现
Media Task
Media Task模块分成4个部分:
Camera Audio Image Video
Media Task
Media Task模块有以下的作用:

mtk平台mmi培训资料(中文)

mtk平台mmi培训资料(中文)

/* Code Body */ /*---------------------------------------------------------------*/ gdi_layer_lock_frame_buffer(); SetupCategoryKeyHandlers(); MMI_title_string = (UI_string_type) title; MMI_title_icon = (PU8) get_image(title_icon); change_left_softkey(left_softkey, left_softkey_icon); change_right_softkey(right_softkey, right_softkey_icon); //Create List create_fixed_icontext_menuitems(); associate_fixed_icontext_list(); ShowListCategoryScreen( (UI_string_type) title, get_image(title_icon), get_string(left_softkey), get_image(left_softkey_icon), get_string(right_softkey), get_image(right_softkey_icon), number_of_items); for (i = 0; i < number_of_items; i++) { add_fixed_icontext_item((UI_string_type) list_of_items[i], wgui_get_list_menu_icon(i, list_of_icons[i])); } h_flag = set_list_menu_category_history(MMI_CATEGORY_CUSTOM_LIST, history_buffer); if (h_flag)

MTK培训文档

MTK培训文档

Man Machine InterfaceAgendaMTK Software ArchitectureMTK MMI ArchitectureExample to Write an Application Third Party SoftwareToolQ&AMTK Software ArchitectureMTK Software ArchitectureSoftware ArchitectureKAL and OSLDate TypeTask ManagementSoftware ArchitectureSoftware Architecture –abbreviationsRMI: Remote MMI, i.e., PC side, which uses AT commands to communicate with Protocol stack.L4: The adaptation layer between MMI/AT and protocol stack.L4A: Layer 4 Adaptation to translate primitives sent from upper layers to function calls.L4C: Layer 4 Controller, coordinates all L4 modules to serve upper layers.ATCI: AT Command Interpreter.UEM: User Equipments module used to abstract basic device drivers like keypad, LED, GPIO.PHB: Phone Book management.SMU: Security Management (SIM, STK).CSM: Call Service Management (bearer capability handling, CSD/FAX service, CC, SS).RAC: Registration Access Control (GSM/GPRS registration management,PLMN list/selection, RSSI report)SMSAL: SMS Application Layer (message storage, MO/MT messages, CB).TCM: Terminal Context Management (PDP context profiles, context activate/deactivate, relay of packet data), interface to PPP/TCPIP/SNDCP.ENG: Engineer Mode to log information.KAL (Kernel Abstraction Layer)Target Real TimeOperating System GSMHandset Software GSMHandset SoftwareKernel Abstraction Layer (KAL)Target Real Time Operating SystemXTest/DebugFacilitiesPortabilityCommon design philosophyTest/Debug facilitiesEasier code integrationKAL ServicesKALServicesTest / Logging / Simulation facilities Exception handling Resource / MemorymanagementTask management /communication /synchronizationTimer ControlTask-ATask-BReference:KAL_ProgrammingGuide_20041005.pdfSystemServiceUserManual_20050527.pdfOSLNucleus,or other RTOSKALOSLPC simulator –simulate the OSL services on Win32 to facilitate development and debugging MMI task on PC.N.B.to ensure all programs within MMI task can run correctly on PC, use of OSL APIs is MUST.Data TypesGeneral data types:Kal_non_specific_general_types.hKAL specific data types and functions’prototypes: Kal_release.hOSL specific data types used within MMI Tasks: PixtelDataTypes.hTask Management & Identificationmodule_type and task_indx_typeDefined in “Stack_config.h”Used to define index of all modules and all tasksmod_task_g[RPS_TOTAL_STACK_MODULES]Defined in “syscomp_config.c”Used to map MODULE-ID to TASK-IDsys_comp_config_tbl[RPS_TOTAL_STACK_TASKS + 1]Defined in “syscomp_config.c”Used to define information of all tasks, e.g., task’s name, task queue’s name, priority, size of external/internal queue, task creation function, whether to use internal ram.custom_comp_config_tbl[MAX_CUSTOM_TASKS]Used for customer defined modules or tasks.task_info_g[RPS_TOTAL_STACK_TASKS + 1]Global array containing component task information, which will be filled in while callingstack_init_comp_info().module_info_g[MAX_MULTIMOD_TASK_NUM]Global array containing component task information, which will be filled in while callingstack_init_module_info().Task RoutinesTask CommunicationApp_ltlcom.hData structure ofmassage used for inter-layer communicationApp_ltlcom.h Data structure of massage used for inter-layer communication Stack_ltlcom.hMacro and API used to send/free messagesStack_ltlcom.h Macro and API used to send/free messagesTo allocate memory from shared memory pool.Ctrl_buff_pool.hDefine size and number of control buffer (memory pool)To allocate memory from shared memory pool.Ctrl_buff_pool.h Define size and number of control buffer (memory pool)To initialize specificmodule’s parameter pointer and peer buffer pointer before use it. (module_ilm_g [module_id])To initialize specific module’s parameter pointer and peer buffer pointer before use it. (module_ilm_g [module_id])Send message to other taskSend message to other taskTo receive message from external queueTo receive message from external queue To receive message from internal queueTo receive message from internal queue QueueGprot.hUsage of OSL send/receive internal/ external msg.QueueGprot.h Usage of OSL send/receive internal/ external msg.MTK MMI ArchitectureMTK MMI ArchitectureMMI Task structureMMI and L4 Communication MMI Architecture¾FrameworkProvides OS abstractionEvent HandlersHistory ManagerNVRAM AccessFile System Management ¾UI, ResourceMMI DirectoriesTask structureTask struct(sys_comp_config_tbl ):typedef struct {kal_char *comp_name_ptr;kal_char *comp_qname_ptr;kal_uint32 comp_priority;//3-255kal_uint16 comp_stack_size;kal_uint8 comp_ext_qsize;kal_uint8 comp_int_qsize;kal_create_func_ptr comp_create_func;kal_bool comp_internal_ram_stack;} comptask_info_struct;KAL_FALSEmmi_create 100304096TASK_PRIORITY_MMI“MMI Q”"MMI"MMI TaskLayer 4 AdapterExample:MOD_MMI--->MOD_L4Cmmi_frm_sms_send_message( )PRT_MSG_ID_MMI_SMS_SEND_MSG_REQ---------------------------------L4a_callback.cl4a_recv_msg_ft[MSG_ID_MMI_MESSAGE_SUM]_call_MSG_ID_MMI_SMS_SEND_MSG_REQ_( )---------------------------------MOD_L4C--->MOD_SMSALl4c_sms_exe_post_msg_req( )MSG_ID_L4CSMSAL_SEND_REQMMI and L4 Communication(1/3)How To CommunicateSend/Receive messages thru the message Queue .#define OslMsgSendExtQueue msg_send_ext_queue #define OslReceiveMsgExtQ receive_msg_ext_q SetProtocolEventHandler(FuncCB, msg_id);Communication Datatypedef struct ilm_struct{oslModuleType oslSrcId; // Source module ID.oslModuleType oslDestId; // Destination module ID.oslMsgType oslSapId; // service access point.oslMsgType oslMsgId; // message name ID.oslParaType *oslDataPtr; //local parameter bufferoslPeerParaPtr *oslPeerBuffPtr; //peer buffer pointer } ilm_struct;MOD_MMI, MOD_L4C, MMI_L4C_SAP, MSG_ID_XXX, local_para_ptr, peer_buf_ptr, MMIL4CQueueHow to listen a message from MMI Queue: From task create and entry a message loop.OslReadCircularQ(&Message);OslReceiveMsgExtQ(mmi_qid, &mmi_message);How to write a message to MMI Circular Queue: When NVRAM receive other messages.OslWriteCircularQ(&ilm_ptr);How to receive a message from L4C: Register a response message callback.SetProtocolEventHandler(FuncCB, msg_id);How to send a message to L4C:Step1: Construct a local parameter buffer.Step2: Assign required values into local parameter buffer.Step3: Send out the message to the L4C module.OslMsgSendExtQueue(&Message);Message Info = Header info + Data info Local parameter Header info:#define LOCAL_PARA_HDR \kal_uint8ref_count; \kal_uint16msg_len;peer buffer parameter Header info :#define PEER_BUFF_HDR \kal_uint16pdu_len; \kal_uint8ref_count; \kal_uint8 pb_resvered; \kal_uint16free_header_space; \kal_uint16free_tail_space;Local parameter:Header info + Data info:Ex: typedef struct{LOCAL_PARA_HDRkal_uint8volume_type;kal_uint8volume_level;} mmi_eq_set_volume_req_struct;How To Create Local Parameter:Dynamic to allocate memory buffer:OslConstructDataPtr(sizeof(mmi_at_alarm_query_res_req_struct); When to Free Local Parameter:While L4 receive the information, after finishing to process themessage, L4 task will automatically free this buffer.OslFreeDataPtr(sizeof(mmi_at_alarm_query_res_req_struct);Peer buffer parameter:Header info + Data infoEx: typedef struct{PEER_BUFF_HDRvoid *ptr;} mmi_example;How To Create Peer Buffer Parameter: Dynamic to allocate memory buffer:Ps: The MMI did not use this buffer to communicate with L4.construct_peer_buff(pdu_len, header_len, tail_len, direction); When will Free Peer Buffer:While receive the information, after finishing to process the message, L4 task will automatically free this buffer.free_peer_buff(peer_buff);Example –Set VolumeSet a volume request:void SetVolumeLevelReq(volume_type_enum volume_type,U8 volume_level){MYQUEUE Message;mmi_eq_set_volume_req_struct*setVolumeLevelReq;Message.oslMsgId= MSG_ID_MMI_EQ_SET_VOLUME_REQ;//Message ID, reference the l4a.h filesetVolumeLevelReq= OslConstructDataPtr(sizeof(mmi_eq_set_volume_req_struct));//Create local parameter buffersetVolumeLevelReq->volume_type = volume_type;setVolumeLevelReq->volume_level = volume_level;Message.oslDataPtr= (oslParaType*)setVolumeLevelReq; //Local parameter buffer Message.oslPeerBuffPtr= NULL; //Peer parameter bufferMessage.oslSrcId=MOD_MMI; //Send from Source moduleMessage.oslDestId=MOD_L4C; //Send to destination moduleOslMsgSendExtQueue(&Message); //Send to L4 task}MMI Architecture...HandlerFrameworkEvent HandlerFile System ManagementNVRAM AccessOSL WrapperHistory ManagerMMI QueueL4QueueLayer 4 / Network SimulatorUI LayerApplication...Call ManagerInstant MessageVideo CalendarFile ManagerCamera Alarm Function ListCategory ScreensTimer FuncRequest TimerRegister HandlerImageFont ThemeGraphics LibraryGDIInterface Operating System (Nucleus)R e s o u r c e T a b l eKeyPixtel InterfaceCore Functionality Provided by FrameworkOSL wrapper : make MMI code adaptive QueueTimerManagement of event handlerScreen management –History mechanismNVRAM accessFile system managementProvides OS abstractionProvides OS abstractionProvides wrappers to all operating system dependent calls to be made by the application.Queue¾QueueGprot.hTimer¾WrapperGprot.h¾MMIFrameworkComponents.pdfQueueExternal queue(Inter-task queue, mod to mod(In the diff task)) Reseive message:OslReceiveMsgExtQ(receive_msg_ext_q)Send message:OslMsgSendExtQueue(msg_send_ext_queue) Implement: mcu\adaptation\src\stack_ltlcom.cInternal queue(Intra-task queue, mod to mod(In the same task)) Reseive message:receive_msg_int_qSend message:msg_send_int_queueImplement: mcu\adaptation\src\stack_ltlcom.cCircular queue(MMI only, default size 30)Reseive message (From MMI Task):OslReadCircularQSend message (For NVRAM Access):OslWriteCircularQImplement: mcu\plutommi\MMI\Framework\Osl\OslSrc\Queue.cTimer Usage for MMI AppsStack TimerKAL serviceskal _XXX_timer () …Event Schedulerevshed _XXX_event () …L4StartTimer ()L4StopTimer () …OslStartSoftTimer ()OslStopSoftTimer () …MMI AppsEventGprot.h EventGprot.h StartTimer ()StopTimer () …StartMyTimer ()StopMyTimer () …WrapperGprot.h WrapperGprot.h WrapperGprot.hWrapperGprot.h WIN32OslIntStartSoftTimer ()OslIntStopSoftTimer () …L4Dr.hL4Dr.h event_shed.hevent_shed.h stack_timer.h stack_timer.h stack_XXX_timer () …kal_release.hkal_release.hEvent HandlersEvent HandlersRegisters and executes application call backs for various eventsProtocol events¾the basic event¾Indicate by unique protocol event IDKey events¾One kind of protocol eventHighlight events¾Man-made event, base on key event¾Associated with hint infoFramework Layer Layer4/NS MSGSet handlerApplication LayerSet handlerExcClearclearExcprotocolEventHandlereventID entryFuncPtrFigure. Protocol Event HandlerSet Event Handler:void SetProtocolEventHandler(PsFuncPtr funcPtr, U16 eventID){protocolEventHandler[countOfProtocolEvent].eventID= eventID;protocolEventHandler[countOfProtocolEvent].entryFuncPtr= funcPtr;}Execute Event Handler:void ExecuteCurrProtocolHandler(U16 eventID,void* MsgStruct,intmod_src, void* peerBuf){PsExtPeerFuncPtr currFuncPtr=(PsExtPeerFuncPtr)protocolEventHandler[count].entryFuncPtr;(*currFuncPtr)(MsgStruct, mod_src, peerBuf);}Event ID:Seeplutommi\mmi\AsyncEvents\AsyncEventsInc\ProtocolEvent s.hkey downKey repeatLong press key up TYPE CODELayer 4 / NSFramework LayerApplication LayerMSGExcExcExcSet key handlerprotocolEventHandlereventIDentryFuncPtr L4KeyHandleSet key handlerClearClearFigure. Key Event HandlerKey Press Event:Set Key Event Handler:void SetKeyHandler(FuncPtr funcPtr, U16 keyCode, U16 keyType){currKeyFuncPtrs[keyCode][keyType] = funcPtr;}Execute Key Event Handler:void ExecuteCurrKeyHandler(S16 keyCode, S16 keyType){(*currKeyFuncPtrs[keyCode][keyType])}KEY_REPEATKEY_LONG_PRESS KEY_EVENT_UP KEY_EVENT_DOWN KEY TYPEKEY_ENDKEY_SENDKEY_RIGHT _ARROWKEY_WAP | KEY_ENTER |KEY_IPKEY_DOWN_ARROWKEY_LEFT _ARROW KEY_RSKKEY_UP_ARROW KEY_POUNDKEY_0KEY_STARKEY_9KEY_8KEY_7KEY_6KEY_5KEY_4KEY_3KEY_2KEY_1KEY_CLEARKEY_LSKKEY CODEKEY_QUICK_ACS |KEY_CAMERAKEY_VOL_DOWNKEY_VOL_UP L4C QueueSend Key Press MsgProtocol Stack/L4MMI keypad bufApp ScreenRead Key Press MsgCall Event HandlerKey press events flow[keyCode, keyType][keyCode, keyType]ExecuteCurrKeyHandlerRefer files:Keypad_def.c, Kbd_table.hHighlight EventsFigure. Highlight HandlerLayer 4 / NSFramework LayerMSGApplication Layer — Main MenuCategory ScreenBusiness Logicstandard_animated_matrix_highlight_handler_type2ExecuteCurrHiliteHandler_Exthighlight_mainmenu_phonebookRegisterHighlightHandlerregister_fixed_matrix_highlight_handler SetHiliteHandlerMMI_list_highlight_handlerExecute handlerMMI_matrix_highlight_handler MMI_circular_3D_highlight_handlerFunction Entry maxHiliteInfoMMI_fixed_list_menu Menu Control Block MMI_fixed_matrix_menuprotocolEventHandlerL4KeyHandleeventIDentryFuncPtr key downKey repeatLong press key up TYPE CODEHistory ManagerHistory ManagerHelps application maintain screen flow and store intermediate data.typedef struct_historyNode{U16 scrnID;FuncPtr entryFuncPtr;U8 *inputBuffer;U8 *guiBuffer;} historyNode;Structure of history nodeScreen ID -of screen to be savedEntry Function Pointer –to redraw the screenInput Buffer –to save running text data for this screenGUI Buffer –to save UI related information for this screenHistory mechanismEntry new screen function: {EntryNewScreen():ClearAllInterruptEventHandler AddHistory()Entry Function Screen ID Gui Buffer OldExitFunction()ClearAllKeyHandler()Draw screenRegister new key handler}Go back history function:{EntryFunctiondecrement //Delete top screen}Please refer to “EntryNewScreen”Screen History Idle ScreenScreen 1Screen 2Top Screen:Entry Function Screen ID History BufferOther Data History buffer Event Handler Screen ID Exit Function Entry Function Curr Screen Other DataGui buffer Event Handler Screen ID Exit Function Entry Function New Screen delete SetRightSoftkeyFunction(GoBackHistory,KEY_EVENT_UP);History API ListEntryNewScreenU16 newscrnIDFuncPtr newExitHandlerFuncPtr newEntryHandler: NULL, if do not want add the new screen to history later void *peerBufAddHistory50Max capacity of history stack isOther APIDelete nodes from historyDelete ‘N’nodes from historyGo back ‘N’nodes in historyRetrieve history for a screenRetrieve input buffer for screenRetrieve UI buffer for screenDetail please refer to : \plutommi\MMI\Framework\History\HistoryInc\HistoryDef.hNVRAM AccessNVRAM AccessProvides wrappers for data storage and retrieval of data from NVRAM.Value¾ReadValue(nId,pBuffer,nDataType,pError);¾WriteValue(nId,pBuffer,nDataType,pError);Record¾WriteRecord(nFileId,nRecordId,pBuffer,nBufferSize,pError);¾ReadRecord(nFileId,nRecordId,pBuffer,nBufferSize,pError);NVRAM_Configuration_Guide_User.pdfNVRAM_Configuration_Guide_User.pdfFile System ManagementFile System ManagementProvides wrappers for data storage and retrieval of data from File SystemAPI¾Int FS_Open(const WCHAR * FileName, UINT Flag);¾int FS_Close(FS_HANDLE FileHandle);¾int FS_Read(FS_HANDLE FileHandle, void * DataPtr, UINT Length, UINT * Read);¾int FS_Write(FS_HANDLE FileHandle, void * DataPtr, UINT Length, UINT *Written);¾int FS_Seek(FS_HANDLE FileHandle, int Offset, int Whence);¾int FS_Delete(const WCHAR * FileName);¾int FS_GetFileSize(FS_HANDLE FileHandle, UINT * Size);FileSystem_Document_20050216_W05.09.pdfFileSystem_Document_20050216_W05.09.pdfUICategory ScreenCategory FunctionsThe category layer consists of a set of functions that an applicationcan use to define its User Interface.Each Category screen contains the following functions:Function to enter (display)Function to exitFunction to get the size of HistoryFunction to get the HistoryMMI ResourceImage, Audio, Strings, Fonts, Themes, Menu Tree.Category screen mechanismEvery category screen has a set of functions :ShowCategoryXXXScreen¾Register event handler ¾Pre-process UI element ¾Call redraw functionRedrawCategoryXXXScreen¾Draw screen using GDI functionsExitCategoryXXXScreen¾Reset function pointer¾Other operation depend on vary screensGetCategoryXXXHistorySize¾Be used to return the size of gui buffer & input bufferGetCategoryXXXHistory¾Be used to return the data of gui buffer & input bufferGetCategoryXXXData¾Be used to return input bufferExample: GetCategory157Data, GetCategory200Historyset_list_menu_category_history, get_list_menu_category_historyExample:void ShowCategory1Screen (STRING_ID Title,IMAGE_ID TitleIcon,STRING_ID LSKLabel,IMAGE_ID LSKIcon,STRING_ID RSKLabel,IMAGE_ID RSKIcon,INT NumberOfItems,STRING_ID*ListOfItems,BYTE*HistoryBuffer );Screen examplecategory3screencategory1screen category2screen ……ExitCategoryXXXScreen RedrawCategoryXXXScreen GetCategoryXXX1HistorySizeGetCategoryXXXHistory ShowCategoryXXXScreen ……CategoryXXX screen Category ScreenShowCategoryXXXScreen:{Init XXXScreen data;RedrawCategoryXXXScreen;}RedrawCategoryXXXScreen:{draw_title();show_fixed_list();show_left_softkey();show_right_softkey();}pixtel_UI_show_imagepixtel_UI_fill_rectangleCommon Screen:MMI ResourcesImages Audio Strings Fonts ThemesMenu TreeBMP PBM GIF JPEG MPEGimy midi mmf mp3mp4English S.Chinese T.Chinese Thai Arabic …8x913x1415x16ASCII Graphic 13x1411x1223x2415x16128x128128x160176x22096x64C 64x96C MMI Resources (1/5 :classification)Color SchemeButton Scrollbar Edit Icons Foreground BackgroundUI ObjectsImageList Text Font Main-menuSub-menuPhonebookSettings MessagesProfiles GamesCall HistoryServices Organizer MultimediaTitleStringStep 1: add string to ref_list.txtStep 2: add string ID to ENUM associated with appStep 3: using macro ADD_APPLICATION_STRING2Step 4: S8* my_string = GetString(MY_STR_ID);Using APP_BASE to guarantee the uniqueness of string ID ImageStep 1: put images in the folder assigned to appStep 2: add image ID to ENUM associated with appStep 3: using macro ADD_APPLICATION_STRING2Step 4: using image ID directly as parameterUsing APP_BASE to guarantee the uniqueness of image IDMenuParent menuUnique menu item IDHilite function and LSK handlerAssociated with screenAudioSkin LayoutAudio playerCalculatorFMRadioTheme Fonts TOOLS:MCT, MCU\tools\AudioResGen TOOLS:MCT, MCU\tools\AudioResGenMMI Resource (4/5 : Macro)ADD_APPLICATION_STRING2(STR_CAL_MONTH,"M","Chinese month");String ID, Value, DescriptionADD_APPLICATION_IMAGE2(IMG_CAL_ON,CUST_IMG_BASE_PATH"\\\ \EmptyImage.bmp","Icon for On Button.");Image ID, Path, DescriptionADD_APPLICATION_MENUITEM((MENU_CAL_TYPE, /* Menu ID */ORGANIZER_CALENDER_MENU, /* Parent ID*/1, /* Child number*/MENU_ID_CHILD_1, /* Child ID */SHOW, /* Hide or show*/NONMOVEABLE, /* Move attribute*/DISP_LIST, /* Display attribute*/CAL_STRING_LUNAR, /* String ID*/0)); /* ICON ID*/MMI Resource (5/5)World Clock Map Skin LayouterTheme Generator Audio Generator Font Merger,Font Splitter,Font Viewer,Font Customizer Preview Verify ImageMCT TOOL Mcu\tools\AudioResGen\*.*resource_audio.c resource_audio.h resource_audio.obj Audio City_Database.txt, City_Database_Coord.txt,Map, ref_list.txtplutommi\Customer\Images\PLUTO176X220\MainLCD\Video plutommi\Customer\Images\PLUTO176X220\MainLCD\FMRadio plutommi\Customer\Images\PLUTO128X160\MainLCD\Camera plutommi\Customer\Images\ProjectName\MainLCD\AudioPlayer New or old XXX.thm filepluto_large.bdf pluto_medium.bdf Pluto_small.bdf …….IDs: mcu\plutommi\mmi\AppXXX_dir\inc\AppXXXDef.hPopulate:mcu\plutommi\Customer\Res_MMI\Res_AppXXX.c String files : Mcu\\plutommi\Customer\CustResource\ref_list.txt IDs: mcu\plutommi\mmi\AppXXX_dir\inc\AppXXXDef.hPopulate:mcu\plutommi\Customer\Res_MMI\Res_AppXXX.cImage files : Mcu\plutommi\Customer\Images\IDs: mcu\plutommi\mmi\AppXXX_dir\inc\AppXXXDef.hPopulate:mcu\plutommi\Customer\Res_MMI\Res_AppXXX.cPRIMAL FILEStandaloneRes.cgui_wrapper.c CustMiscData.c resource_world_clock_city.c resource_video_skins.c resource_fmradio_skins.c resource_camera_skins.c resource_audply_skins.c themecomponents.h, ThemeRes.cresource_font_jtbl.c FontType.c FontRes.c,L_1_Large.h,L_1_Medium.h……CustMenuRes.c resource_str_jtbl.c CustStrMap.c CustStrRes.c resource_image_jtbl.c CustImgMap.c CustImgRes.c,custimgdatahw.h SOURCE FILEStandaloneRes.objgui_wrapper.obj resource_video_skins.obj resource_world_clock_city.obj resource_fmradio_skins.obj resource_camera_skins.objresource_font_jtbl.objFontType.obj resource_str_jtbl.objCustStrMap.obj resource_image_jtbl.obj CustImgMap.obj CustMiscData.objOtherresource_audply_skins.obj App ResourceThemeRes.objThemesFontRes.objFontsCustMenuTree_Out.c CustMenuTreeID_Out.cCustMenuRes.obj Menusenum_list.hCustResList_out.txtCustStrRes.objStringsCustImgRes.objImagesTEMPORARY FILECOMPONENTCLASS。

[精品]MTK平台软件架构(一手机公司的MTK内部培训资料)

[精品]MTK平台软件架构(一手机公司的MTK内部培训资料)


LLC Logical link control 逻辑连接控制 RR Radio resource management, 包括以下子模块



ቤተ መጻሕፍቲ ባይዱ

⑤ ⑥
RRM: Handles cell selection and PLMN selection RMPC: Handles the procedures in Idle/Dedicated state including the surrounding cell scheme and measurement reporting LAPDM: Handles the procedure defined in GSM layer 2 RLC: Radio link control protocol MAC: Medium access control protocol MPAL: Adaptation layer for RR and L1A
Phonebook Message Call History Setting User profile Fun and game Organizer Service Shortcut Camera …………………….

三、MTK 方案Task架构
系统初始化
Hardware boot and setup system stack etc Nucleus Plus RTOS initialization Hardware Initialization Tasks/Modules initialization/configuration Tasks Creation TCT_schedule() for scheduler to context switch

MTK平台射频培训解读

MTK平台射频培训解读
在静态传输条件下,发射机各功率等级的载频峰值功率及容限 值应满足下表的要求
GSM900 4类功率等级移动台 Power LEV 5 发射机输出 功率dBm 33 功率容限 ±2dB DCS1800 1类功率等级移动台 Power LEV 0 发射机输出 功率dBm 30 功率容限 ±2dB
6~15
16~19
基带处理器对射频控制信号包括:LB_TX(当GSM发射突发脉冲来的时候为 高电平),HB_TX(当DCS/PCS发射突发脉冲来的时候为高电平) PA_EN(PA使 能信号),BANDSW_DCS(PA GSM/DCS/PCS放大器频段选择信号。 )
8
五、射频电路元器件识别
天线主馈点 射频连接器
850、900接收滤波器
11
26MHZ的校准原理:
1)、让手机进入META模式,从.cfg文件中读取DACmin、DACmax,并计算出对应 delta Fmin和delta Fmax。 2)、计算出相应的斜率slope,并检查slop是否在正常范围内。 3)、如果slop在正常范围内,将频率设为26M并算出DAC值,在此DAC附近变化, 找出最小的delta F和对应的DAC,并检查此DAC是否在正常范围内。 4)、如果DAC在正常范围内,将DAC和slope写入NV
GSM850、900接 收
4
2、接收滤波电路
接收滤波电路用于频段预选,从天线接收到的众多频率分量中,选择所需要的GSM频段信号, 同时滤除带外非GSM系统杂散信号,滤波器采用我们公司目前常用的表面声波滤波器 SAW。
1930~1990
1805~1880
925~960
5
3、射频功放电路
PA使能 发射频段选择
13

腾讯MTK开发基础培训资料——经典

腾讯MTK开发基础培训资料——经典

Protocol vendors
(Optimay, Condat…)
Software platform vendors (Symbian, Stinger, Linux, Palm OS…)
PowerManagement IC
Base-band chip vendors (TI, Infineon, Philips, Conexant, Motorola, ADI, Intel…)
手机OS初始化流程(1)
BootLoader启动过程:(Bootarm.s)
a)初始化中断向量表,注册中断处理函数。 b)设置C语言的堆栈,设置ro,rw,zi。 c)拷贝flash的数据段到内部ram或外部ram。 d)最后跳转到Nucleus 系统初始化__main处(其源代码不可见)。
手机OS初始化流程(2)
部分客户需要
替代合作名单中的软件 (如中文之星输入法) 合作名单中没有的类型(如OCR扫描软件)
其他
SP公司自行开发并推广的软件(如音乐在线播放客户端)
Nucleus OS简介
Nucleus OS是美国源代码操作系统商ATI公司推出的 新一代嵌入式操作系统,属于抢先式实时多任务操 作系统内核, 95%的代码使用ANSI C编写,便于移 植,在RISC上只占40K,以其优异的性能及源代码 开放特性在各个领域获得了广泛的应用。 MTK 操作系统是基于Nucleus OS一个实时RTOS。 Necleus OS提供嵌入式操作系统的核心,提供内存管 理、进程调度、线程管理、定时器机制、中断处 理、、信号、MailBox、MMI初始化等核心机制。
大陆布局
深圳 :手机、数字电视、光存储技术支持中心 北京:手机软件研发(CMCC定制,智能手机) 合肥:GIS系统 上海:高清认证实验室、手机技术支持办事处

MTK生产流程和常见故障维修培训课件(PPT42页)

MTK生产流程和常见故障维修培训课件(PPT42页)
4. 校准
4.1 发射软件介绍 4.2 射频维修思路 4.3 校准典型故障分析
MTK生产流程和常见故障维修培训课 件(PPT 42页) 培训课 件培训 讲义培 训ppt教 程管理 课件教 程ppt
MTK生产流程和常见故障维修培训课 件(PPT 42页) 培训课 件培训 讲义培 训ppt教 程管理 课件教 程ppt
4.1 发射软件介绍
芯片型号
校准数据写入读出
MTK生产流程和常见故障维修培训课 件(PPT 42页) 培训课 件培训 讲义培 训ppt教 程管理 课件教 程ppt
数据库文件
MTK生产流程和常见故障维修培训课 件(PPT 42页) 培训课 件培训 讲义培 训ppt教 程管理 课件教 程ppt
4、当中央处理器满足工作电压、时钟、复位三个工作条 件后开始整体运行起来;并通过地址总线、控制总线、数 据总线执行相应的开机程序和自检程序
2.3 不下载故障判断及维修
不下载故障可以采用电压法和通过下载软件的提示来判断 故障原因
不能连接软件的可以用电压法测量信号来大致确定故障原 因
首先要观察H接口是否虚焊或脱落,若有则加焊或更换
2、按下开机键,把ON/OFF信号电平拉低,由ON/OFF控制 单元产生/RESET(低电平有效)复位信号传送给中央处理 器及存储器,将其有效复位;电源输出以下几路电压:VDD (2.8V)、AVDD (2.8V)、VCORE(1.8V)、VMEM (2.8V)、VTCXO(2.8V)
2.2 MTK手机开机原理
MTK生产流程和常见故障维修培训课 件(PPT 42页) 培训课 件培训 讲义培 训ppt教 程管理 课件教 程ppt
3. 写SN序列号
MTK生产流程和常见故障维修培训课 件(PPT 42页) 培训课 件培训 讲义培 训ppt教 程管理 课件教 程ppt

MTK芯片手机维修课件-PPT文档资料

MTK芯片手机维修课件-PPT文档资料

• 2、时钟电路 有正常的系统时钟。时钟信号是CPU按节拍处 理数据的基础,手机中时钟电路有两种:一种是 时钟VCO模块,内含振荡电路的元件及晶体。当 电源正常接通后,可自行振荡,形成26MHZ信 号输出;另一种是由中频集成电路与晶体组成, 中频IC得到电源后内部振荡电路供晶体起振,由 中频模块放大输出。26MHZ时钟一般经过电容、 电阻或放大电路供给CPU,另外也供给射频锁相 环电路作为基本时钟信号.
MTK芯片系列手机
MTK芯片系列手机的维修宝典
前言
• 目前在我们维修手机中MTK芯片组手机占 70%以上,MTK芯片组手机便宜、功能多、 技术不够成熟等,使手机很容易坏,给我 们维修业带来了生机, MTK芯片组手机在 我们维修中有很大的特点:一是集成化程 度高、二是外围元器件少等特点,了解 MTK芯片组的原理,做到知己知彼、百战 百胜、快速判断故障、果断处理故障,是 我们维修人员的必修课
二、MTK芯片组不开机维修
• 手机开机的工作条件,手机要正常持续开机,需 具备以下四个条件:一是电源IC工作正常;二是 时钟工作正常,三是逻辑电路正常,四是软件工 作正常。
• 1、 电源IC工作正常 • (1)MTK 电源IC供电正常,需有工作电压,即电池电压或外接 电源电压; • (2)有开机触发信号,MTK开机触发信号是低电平,开机触发 信号是送到电源IC上,在按下开机键时,开机触发信号就有了电 平的变化(从高电平变为低电平)。 • (3)电源IC内一般集成有多组受控或非受控稳压电路,当有开 机触发信号时,电源IC的稳压输出端应有多路电压输出。 电源18#(VMEM)=2.8V,供字库。 电源20#(VDD)=2.8V,供逻辑电路。 电源22#(VRTC)=1.5V,供实时钟电路。 电源24#(RESET)=2.8V, 复位电压 电源25#(VTCXO)=2.8V,供13M晶体4#。 电源27#(AVDD)=2.8V,供逻辑电路。 电源30#(VREF)=1.3V,参考电压。 电源33#(PWRBB)=1.5V开机维持电压,直通CPU的C1脚。 电源48#(VCORE)=1.8V,供CPU。 • (4)开机维持信号来自CPU,电源IC只有得到开机维持信号后 才能保持输出电压,否则,手机将不能持续开机。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

射频低噪声 放大 LNA 39dB 可选
IQ
接收中频滤波
IF=100kHz 带宽:200kHz
接收中频放大 滤波
增益可编程:
78dB 2dB step
IF 混频、I/Q 解调
->67.708kHz 模拟I/Q信号
接收镜像抑 制 RF混频 RF Mixer
射基 频带
模拟基带I/Q
信号滤波 部 部 分分
充电器插入中断输出
电池通道ADC
充电通道ADC
11
硬件电路原理 -电源管理 - Sim卡接口
SIMDATA,SIMRST,SIMCLK为基带处理器送过来的数据,复位和时钟信号,其中SIMDATA 为双向数据通道,SIMSEL控制MT6305 VSIM输出1.8V/3.0V给SIM卡供电,SIMVCC为VSIM的 使能信号,这些信号通过MT6305的电平转换以后通过SIO,SRST,SCLK跟SIM卡实现通信。
TX VCO 跟 PA之间的阻 抗匹配
7
硬件电路原理 -射频元器件识别
射频功放 PA RF3166
天线开关
天线测试 连接器
Saw filter
Transceiver MT6129D
VCTCXO
26MHz
8
硬件电路原理 -电源管理
Elephant整机供电系统由MT6305BN电源管理IC外加一颗3.3V LDO构成,能提供包括射频以外的其它各单 元电路所需要的工作电压,射频部分的工作电压由射频IC MT6129D内部的LDO提供(射频IC串行接口电 路和TCXO仍然由MT6305提供,射频PA由电池电压VBAT直接提供)。
9
硬件电路原理 -电源管理 - 开关机控制
Powerkey为整机的开关机控制,当开机时Pwoerkey下拉至GND,此时MT6305内部的各个供电模块被使能而开 始输出各路电压,包括基带的Vcore,Vdd,Avdd,Vmem,Vsim,Pmic_vtcxo,各单元电路因为得到电压开始 工作,手机运行程序实现开机,这时基带处理器送出高电平的BBwakeup信号维持各路LDO的输出从而维持开 机。当定时开机或闹钟时间到的时候基带处理器同样送出BBwakeup信号实现自动开机,CPU通过检测Kcol6实 现关机控制。VCXOEN为Pmic_vtcxo的使能信号,Vmsel上拉至Vdd控制Vm输出2.8V给Memory供电。Batuse接 地选择使用锂离子电池供电(充电)。KP_BL_PWM和GPIO3_VIB_EN分别为键盘灯和马达的使能信号。
开机维持和闹钟唤醒
PMIC_VTCXO LDO使能
选择VM输出2.8V给外 部MCP供电
键盘背光灯使能
振动马达使能
10
硬件电路原理 -电源管理 - 充电控制
MT6305通过#1CHRIN判断充电器的插入如果充电器电压正常就通过#6CHRDET向CPU发出中断,CPU通 过GPIO3_CHR_CTL控制MT6305,MT6305再通过#2 GATEDRV控制充电Mosfet U401来控制充电过程,通过 #4 Isense检测并控制充电电流的大小。ADC0_I-和ADC1_I+用于电池和充电通道的ADC检测,通过测试 ADC0和ADC1的电压差可以算出流经R413的充电电流。
MTK平台 GSM双频手机接收信号 处理流程
EN DA CLK VCXOEN
RFVCOEN
26MHz参考时钟 分频器
一本振锁 相环PLL
RF VCO Fvco=2Fch - 200k for GSM
Fvco=Fch - 100k for DCS
匹配及天 线开关
接收射频滤波SAW 925~960MHz for GSM 1805~1880MHz for DCS
模拟基带信 号A/DC及 滤波
GMSK解调、维特比信 道均缩、数字音频滤波 、D/AC
模拟 音频 放大 滤波
数字信号处理部分
0
MTK平台 GSM双频手机发送信号 处理流程
模拟音频放 大、滤波
AD/C 模数变换 及数字音频滤波
数字信号处
理部分
内置LDO使能 LDO2 输出电压2.8V
LDO2 输出电压2.8V
串行数据接口供电 输出基带参考时钟
VCTCXO供电2.8V
26M温补晶体振荡器
6
硬件电路原理 -射频 -发射功率放大
PA 工作频段选择
PA跟天线开关之 间的阻抗匹配
PA 发射使能
天线开关GSM发射控制
功率 & ramp 控制 天线开关DCS发射控制
分频 移相
26MHz参考时钟
RFVCO
RF锁相环 PLL
EN DA CLK RFVCOEN
发射功率


天线开 关:切换 收/发
VAPC PA_EN BS
LB_TX HB_TX
1
硬件电路原理 -射频
2
硬件电路原理 -射频 -前端开关
射频前端开关电路用于切换GSM/DCS/PCS的接收和发射,并抑制发射信号的带外杂散
12
硬件电路原理 -电源管理 - 内置LDO输出
1.8V 2.8V 2.8V 2.8V 2.8V 1.8/3.0V 1.5V
Motor 控制
背光灯 控制
13
硬件电路原理 -电源管理 - 外部LDO
话音压缩编码 R P E - LT P :
基射 信道编码、交织、 带 频
加密、突发脉冲形
13kbps
成、GMSK调制 模拟基带I、Q信号
部 分
部 分
I/Q调制/发 射中频滤波
发射偏移 上变频锁 相环OPLL
发射混频
TXVCO 880~915MHz for GSM 1710~1785MHz for DCS
GSM发射控制 DCS/PCS发射控制
PCS接收控制
3
硬件电路原理 -射频 -接收滤波
接收滤波电路用于频道预选,从天线接收到的众多频率分量中选择所需要的GSM频段信号而 滤除带外非GSM系统杂散信号,滤波器采用表面声波滤波器 SAW.
1930~1990
1805~1880
阻抗匹配
925~960
Transceiver内部LDO使能信号
4
硬件电路原理 -射频 -供电
Transceiver内置了两个2.8V LDO,射频芯片各主要单元电路供电不需要电源管理IC提供,而是 由自己的LDO提供,LDO的输入为VBAT,输出电压为2.8V
发射5dB衰减器 LDO1 输出电压2.8V
双向
I/Q信号
5
硬件电路原理 -射频 -供电
串行数据接口 RFVCO使能
相关文档
最新文档