MTK a MTK GSMGPRS MTK b OS L

  • Slides: 39
Download presentation

MTK方案简介 a Ø Ø Ø 联发科技介绍 MTK多媒体手机平台 GSM/GPRS手机软件方案 MTK软件分层介绍 b Ø Ø Ø 软件结构图表

MTK方案简介 a Ø Ø Ø 联发科技介绍 MTK多媒体手机平台 GSM/GPRS手机软件方案 MTK软件分层介绍 b Ø Ø Ø 软件结构图表 OS L 1 protocol stack Device driver L 2 L 3 L 4 protocol stack MMI MTK 方案Task架构 c Ø Ø MMI task 消息处理过程 example

联发多媒体手机平台 3 G GSM/GPRS/WCDMA Multimedia Phone MT 6219 GSM/GPRS Video Platform 2. 5 G

联发多媒体手机平台 3 G GSM/GPRS/WCDMA Multimedia Phone MT 6219 GSM/GPRS Video Platform 2. 5 G MT 6218 GSM/GPRS Multimedia Platform MT 6205 GSM Low-End Platform

GSM/GPRS 手机软件方案 人机界面 GSM/GPRS Email Client WAP/MMS 短信/EMS 中文输入 SIM Tool Kit Java On-Time

GSM/GPRS 手机软件方案 人机界面 GSM/GPRS Email Client WAP/MMS 短信/EMS 中文输入 SIM Tool Kit Java On-Time FAT 协议层 驱动 RF/UART DSP/Layer 1 联发科技提供给客户 LCD/USB/Ir. DA/etc Nucleus RTOS 联发科技已集成 客户须取得原开发 商之受权

三大组成单元 n ① ② ③ ④ ⑤ n n MS (Mobile Station) 执行软件: 运行于MS上

三大组成单元 n ① ② ③ ④ ⑤ n n MS (Mobile Station) 执行软件: 运行于MS上 操作系统 Nucleus 物理层协议栈 驱动程序 gsm协议栈 MMI META : The Mobile Engineering Testing Architecture Catcher

外设功能解释 n n n n n SIM: Subscriber Identity Module UART: Universal Asynchronous Receiver/Transmitter

外设功能解释 n n n n n SIM: Subscriber Identity Module UART: Universal Asynchronous Receiver/Transmitter SPI: Serial Port Interface LCD: Liquid Crystal Display GPIO: General Purpose Input/Output GPT: General Purpose Timer RTC: Real Time Clock WDT: Watch Dog Timer PWM: Pulse Width Modulation Alerter Keypad PMIC: Power Management IC BMT: Battery Charging Management task AUX task: Auxiliary task ADC Sched. : Analog to Digital Converter Scheduler USB task: The USB 1. 1 protocol and driver Ir. DA task: The Ir. DA and driver Camera: Camera driver for integrating with 3 rd party camera module MSDC: Memory card driver, supporting SD, MMC cards and Memory Stick JPEG Decoder: Software for controlling hardware JPEG decoder

模块介绍 n n n RMI Remote MMI,PC端通过UART口与协议栈进行通 讯 FMI Feature rich MM L 4

模块介绍 n n n RMI Remote MMI,PC端通过UART口与协议栈进行通 讯 FMI Feature rich MM L 4 MMI通过L 4与gsm/gprs协议栈进行通讯,包括以下 子模块 ① ② ③ ④ ATCI: AT Command Interpreter, 解释来自PC端的命令并命令 L 4做相应的动作 L 4 A: L 4 adaptation Layer, MMI与L 4 A通过消息通信 L 4 C: L 4 Control entity, 处理所有的应用程序请求和响应 UEM: User equipments adaptation, 驱动相关的适配层

⑤ ⑥ ⑦ ⑧ ⑨ ⑩ n n n PHB: Phone book management, 电话簿相关的处理,如分类等

⑤ ⑥ ⑦ ⑧ ⑨ ⑩ n n n PHB: Phone book management, 电话簿相关的处理,如分类等 SMU: SIM management Unit, 安全性管理以及STK CSM: Circuit switching protocol stack management电路交换协 议栈管理 RAC: Registration access control SMSAL: Short message service application layer TCM: Terminal context management NVRAM Nor-volatile RAM, 是MMI到Flash的一个适配 层, 保存一些默认设置 SIM Subscriber identity module. Handle SIM behavior as ETSI 11. 11 description DATA 电路交换数据服务,包括以下子模块

① ② ③ ④ n n n FAX: Group 3 Facsimile TDT: Transparent circuit

① ② ③ ④ n n n FAX: Group 3 Facsimile TDT: Transparent circuit switching data L 2 R: Layer 2 relay protocol for non-transparent circuit switching data RLP: Radio link protocol for non-transparent circuit switching data CC Circuit-switched call control 电路交换呼叫控制 SS supplementary service 附加服务 SMS short message service 短消息服务 SM session management 会话管理 MM/GMM mobility management 移动性能管理 SNDCP sub-network dependent convergence protocol

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

n n LLC Logical link control 逻辑连接控制 RR Radio resource management, 包括以下子模块 ① ② ③ ④ ⑤ ⑥ n 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 L 1 A PPP Point to Point protocol layer, 客户端点对点协议

MMI应用程序 Phonebook Message Call History n Setting User profile Fun and game n Organizer

MMI应用程序 Phonebook Message Call History n Setting User profile Fun and game n Organizer Service Shortcut Camera n …………. n

系统初始化 Hardware boot and setup system stack etc n Nucleus Plus RTOS initialization n

系统初始化 Hardware boot and setup system stack etc n Nucleus Plus RTOS initialization n Hardware Initialization n Tasks/Modules initialization/configuration n Tasks Creation n TCT_schedule() for scheduler to context switch n

MTK Customer创建task typedef struct { kal_char *comp_name_ptr; kal_char *comp_qname_ptr; kal_uint 32 comp_priority; kal_uint 16

MTK Customer创建task typedef struct { kal_char *comp_name_ptr; kal_char *comp_qname_ptr; kal_uint 32 comp_priority; kal_uint 16 comp_stack_size; kal_uint 8 comp_ext_qsize; kal_uint 8 comp_int_qsize; kal_create_func_ptr comp_create_func; kal_bool comp_internal_ram_stack; } comptask_info_struct; const comptask_info_struct custom_comp_config_tbl[ MAX_CUSTOM_TASKS ] = { /* INDX_CUSTOM 1 */ {"CUST 1", "CUST 1 Q", 210, 1024, 10, 0, custom. MMI_create, KAL_FALSE}, NULL, KAL_FALSE}, }

Tast create kal_bool custom. MMI_create(comptask_handler_struct **handle) { static const comptask_handler_struct customcms_handler_info = { MMI_task,

Tast create kal_bool custom. MMI_create(comptask_handler_struct **handle) { static const comptask_handler_struct customcms_handler_info = { MMI_task, /* task entry function */ NULL, /* task initialization function */ NULL, /* task configuration function */ NULL, /* task reset handler */ NULL, /* task termination handler */ }; *handle = (comptask_handler_struct *)&customcms_handler_info; return KAL_TRUE; }

注册消息事件 n Set. Protocol. Event. Handler (mmi_msg_handle_new_msg_ind, MSG_ID_SMS_NEW_MSG_INDEX_IND); for(count = 0; count < max.

注册消息事件 n Set. Protocol. Event. Handler (mmi_msg_handle_new_msg_ind, MSG_ID_SMS_NEW_MSG_INDEX_IND); for(count = 0; count < max. Protocol. Event; count++) { if(protocol. Event. Handler[count]. event. ID == event. ID) { is. New. Event = FALSE; break; } } protocol. Event. Handler[count]. event. ID = event. ID; protocol. Event. Handler[count]. entry. Func. Ptr = func. Ptr;

发送消息 typedef struct ilm_struct { module_type src_mod_id; module_type dest_mod_id; sap_type sap_id; msg_type msg_id; local_para_struct

发送消息 typedef struct ilm_struct { module_type src_mod_id; module_type dest_mod_id; sap_type sap_id; msg_type msg_id; local_para_struct *local_para_ptr; peer_buff_struct *peer_buff_ptr; } ilm_struct; msg_send_ext_queue(send_ilm);

MMI task 等候消息 if(!Osl. Read. Circular. Q(&Message)) { Osl. Receive. Msg. Ext. Q(qid, &Message);

MMI task 等候消息 if(!Osl. Read. Circular. Q(&Message)) { Osl. Receive. Msg. Ext. Q(qid, &Message); Osl. Get. My. Task. Index( &my_index ); Osl. Stack. Set. Active. Module. ID( my_index, MOD_MMI ); }

处理消息 void Protocol. Event. Handler(U 16 event. ID, void* Msg. Struct, int mod_src, void

处理消息 void Protocol. Event. Handler(U 16 event. ID, void* Msg. Struct, int mod_src, void *peer. Buf) { Execute. Curr. Protocol. Handler((U 16)event. ID, Msg. Struct, mod_src, peer. Buf); } for(count = 0; count < max. Protocol. Event; count++) { if(protocol. Event. Handler[count]. event. ID == event. ID) { curr. Func. Ptr = (Ps. Ext. Peer. Func. Ptr)protocol. Event. Handler[count]. entry. Func. Ptr; break; } } if ( (curr. Func. Ptr) && (!interrup_result) ) { MMI_TRACE( (MMI_TRACE_G 1_FRM, MMI_FRM_INFO_EVENT_EXECURPTO_HDLR, event. ID)); //(*curr. Func. Ptr)(Msg. Struct, mod_src); (*curr. Func. Ptr)(Msg. Struct, mod_src, peer. Buf); }

THANKS!

THANKS!