0% found this document useful (0 votes)
192 views

SIMCOM Modem

This document introduces Embedded AT technology for SIM800 wireless modules. It allows programs originally requiring an external MCU to be embedded into the wireless module itself, reducing costs. It utilizes RTOS multithreading and messaging techniques for more efficient development. Hardware APIs simplify development. The architecture has an embedded application and core system in one binary file. It provides many system, modem, audio, UART, flash, file system, peripheral, timer, socket and SMS APIs. The compiler is RVCT 3.1 and downloads use the SIMCom tool. Compiled files go to the output folder.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
192 views

SIMCOM Modem

This document introduces Embedded AT technology for SIM800 wireless modules. It allows programs originally requiring an external MCU to be embedded into the wireless module itself, reducing costs. It utilizes RTOS multithreading and messaging techniques for more efficient development. Hardware APIs simplify development. The architecture has an embedded application and core system in one binary file. It provides many system, modem, audio, UART, flash, file system, peripheral, timer, socket and SMS APIs. The compiler is RVCT 3.1 and downloads use the SIMCom tool. Compiled files go to the output folder.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

SIMCOM EAT

Embedded AT 技术简介

为什么使用Embedded AT? 充分利用SIM800无线模块的资源,将原本需要外部


MCU完成的程序移植内嵌到无线模块内部,以达到节约成本的目的。利用RTOS的
多线程,消息等技术,开发更高效。利用硬件的API接口,减少开发难度。

2
Embedded AT 技术简介

3
Embedded AT软件架构
General Software Architecture

Embedded Application (one binary file)


EVENT_TIMER

EVENT_INTR
EVENT_KEY

Invoke API
functions

APIs
Eat_get_event
FLASH TIMER Periphery UART MODEM System
...
API API API API API API
data

CORE SYSTEM (one binary file) data

4
Embedded AT 主要硬件特性(800H)
 ARM7EJ-S run at 360MHz
 Module flash 4MB
 User locatable resource:
- 500KByte of RAM memory
- 1.3MByte of code memory (flash)
- 300KByte of file system
 Supports up to 29 GPIO pins*, 5 GPIO INT
Periphery Interface
-1 SPI/Display interface or SD card interface
-1 I2C
-1 PWM
-2 UART and 1 USB
-1 ADC
-2 Bakclight
-5*5 Keypad
5
Embedded AT 主要软件特性(一)
● System API(EVENT,MEMORY,SEMAPHORE,SLEEP,……)
eat_get_event, eat_get_event_num,eat_get_event_for_user
eat_create_sem,eat_sem_get, eat_sem_put
eat_reset_module, eat_power_down, eat_sleep_enable
● Modem API
eat_modem_write, eat_modem_read
● Audio API
eat_audio_play_tone_id, eat_audio_stop_tone_id
eat_audio_play_data, eat_audio_stop_data
● UART API
eat_uart_open, eat_uart_close, eat_uart_set_config,
eat_uart_write,wat_uart_read,eat_uart_set_debug

6
Embedded AT 主要软件特性(二)
● Flash API
eat_flash_erase, eat_flash_write, eat_update_app, eat_update_app_ok
● File system API
eat_fs_Open, eat_fs_Close, eat_fs_Read, eat_fs_Write, eat_fs_Seek,
eat_fs_GetFileSize,eat_fs_GetFilePosition, eat_fs_CreateDir,etc.
● Periphery API
eat_gpio_int_callback_func, eat_adc_callback_func,
eat_gpio_setup,eat_gpio_write, eat_gpio_read, eat_pin_set_mode,
eat_spi_init, eat_spi_read, eat_spi_write, eat_lcd_light_sw, eat_adc_get,
eat_pwm_start, eat_pwm_stop, etc.
● Timer API
eat_timer_start, eat_timer_stop, eat_get_current_time, eat_get_rtc,
eat_set_rtc, eat_gpt_start, eat_gpt_stop,etc.

7
Embedded AT 主要软件特性(三)
● Socket API
eat_gprs_bearer_hold, eat_gprs_bearer_release, eat_soc_connect,
eat_soc_getsockopt, eat_soc_listen, eat_soc_accept, eat_soc_recv,
eat_soc_sendto, eat_soc_recvfsrom, eat_soc_select, eat_soc_select,
eat_soc_gethostbyname, eat_soc_close, etc.
● SMS API
eat_set_sms_formate, at_send_pdu_sms, eat_set_sms_sc,
eat_set_sms_storage, eat_send_text_sms, eat_read_sms,
eat_delete_sms, eat_sms_register_new_message_callback,
eat_sms_decode_tpdu, eat_set_sms_cnmi, eat_acsii_to_gsm7bit,
eat_acsii_to_ucs2, etc.
● Other API
eat_network_get_creg, eat_network_get_ber, eat_network_get_csq,
eat_network_get_cgatt, etc.

8
Embedded AT编译环境说明
编译器为RVCT,版本为:ARM/Thumb C/C++ Compiler, RVCT3.1
[Build 569]
下载工具:SIMCom_Multiupdate_tool_for_MTK_platform Vx.xx

安装包目录结构
build: 编译配置文件
core: SIMCOM提供的头文件及
库文件
demo: Demo源程序
Doc: 帮助文档
SIMxxx.bat:编译脚本,在命令行
模式下运行脚本进行编译。

output: 编译生成临时及目标文件,
编译时生成

9
编译器安装

RVCT3.1 编译器环境的搭建

一 安装
1. 把文件夹 RVCT_EAT 和 Flexlm 拷贝到系统盘根目录下;

2. 修改 Flexlm\license.dat 文件
开始 -> 运行 -> CMD -> ipconfig/all,Physical Address一项为MAC地址,是有线网络的MAC,
不是WIFI或虚拟网络。
用记事本打开 license.dat,找到 HOSTID=00023F0468D4,共有 19 处,后面的数字替换成 MAC
地址,保存。

3.
打开 cmd,进入 RVCT 目录 C:\RVCT_EAT \Programs\3.1\569\win_32-pentium,并输入 armcc
-vsn:

如果能显示以上内容,则可以正常使用。

二 错误处理
1. 提示 license 错误

10
示例
#pragma arm section rodata = "APP_CFG" SIM800 and
APP_ENTRY_FLAG SIM800H add
#pragma arm section rodata

#pragma arm section rodata="APPENTRY"


const EatEntry_st AppEntry = Entry function array
{ app_main,
app_func_ext1,
...};
#pragma arm section rodata

11
示例
void app_func_ext1(void *data)
{
eat_uart_set_debug(EAT_UART_2); Hardware initialize
eat_uart_set_at_port(EAT_UART_1);// UART1 is as AT
PORT
}

void app_main(void *data)


{ ...
APP_InitRegions();//Init app RAM, First Main thread
APP_init_clib(); //Init C lib , Second
while(EAT_TRUE)
{ eat_get_event(&event);
switch(event.event)
{
case EAT_EVENT_MDM_READY_RD:
{ progress(); } break;
case ...
}
}}
12
编译

生成的临时文件及log在outpu目录

13
下载
• 选择core\SIM800H32_EMBEDDEDAT\*.cfg 文件

14
下载
• 设置好端口,并先点击Download,再给模块上电

15
谢谢!

You might also like