物联网系统中空开产品定时和延时功能的实现方案

电子说

1.3w人已加入

描述

01

 概述

空气开关,又名空气断路器,是断路器的一种。是一种只要电路中电流超过额定电流就会自动断开的开关。空气开关是低压配电网络和电力拖动系统中非常重要的一种电器,它集控制和多种保护功能于一身。除能完成接触和分断电路外,尚能对电路或电气设备发生的短路、严重过载及欠电压等进行保护,同时也可以用于不频繁地启动电动机。

4G网络无线空气开关是一种结合了现代通信技术的断路器,它通过4G网络实现了无线远程控制功能,使得用户可以通过手机或其他智能设备对电路进行控制,包括开启、关闭以及监控电路的状态。这种空气开关不仅提供了远程控制的便利,还增加了电路的安全性和管理的灵活性。

4G空气开关的主要特点包括:

远程控制:用户可以通过4G网络,随时随地通过手机APP或其他智能设备对电路进行控制,无需近距离操作。

实时监控:能够实时监控电路的状态,包括电流、电压等参数,确保电路安全运行。

故障诊断:通过4G网络传输的数据,可以及时发现电路故障,提前预警,避免事故发生。

多种保护功能:具备短路保护、过载保护、失压保护等多种保护功能,确保电路和设备的安全。

02

 4G空气开关功能

当未来某个时刻需要空气开关进行分闸或者合闸,通过手动来控制可以达到目的,但是,可能会遇到操作不及时等问题。因此,空气开关都会提供定时功能,只需要设置好定时,到了时间,空气开关会响应相应的设置动作,合闸或者分闸。延时主要场景是,按照实际需求,需要合闸1小时,2小时等情况。

1 定时

设置一个定时器,定时器定时时间范围1分钟到24小时,超时后会合闸或者分闸

空气开关

2 延时

设置一个定时器,超时后,会执行延时超时相应动作

空气开关

03

组件的使用

1 Gitee链接地址

Demo位于amaziot_bloom_os_sdksamplelibraries8.4_timer_delay

Gitee源码地址:https://gitee.com/ning./hongdou

Github源码地址:https://github.com/ayumid/hongdou

编译指令:.build.bat -l .amaziot_bloom_os_sdksamplelibraries8.4_timer_delay

2 组件功能介绍

本组件实现空开产品中的定时,和延时功能,并进行相应的后续操作。

定时和延时本质是一样的,服务器提供未来某个时刻或者延时到未来某个时刻,都涉及当前时刻,未来时刻,间隔三个参数,因此实现两种功能使用下面相同的api。服务器不同的参数可以转换后调用本组件的API。

3 代码讲解

1 lib_am_ty_sw_timer_delay_timer_init

功能:该函数用于,初始化定时,延时任务,和相关资源。

参数:无

返回值:无

示例:

 

lib_am_ty_sw_timer_delay_timer_init();

 

2 lib_am_ty_sw_timer_delay_timer_task

功能:该函数用于,定时,延时任务

参数:无

返回值:无

示例:

 

ret = OSATaskCreate(&lib_am_ty_sw_timer_delay_timer_task_ref, lats_timer_delay_timer_task_stack, LATS_TASK_TIMER_TASK_STACK_SIZE, 120, "timer_delay_timer_task", lib_am_ty_sw_timer_delay_timer_task, NULL);

 

3 lib_am_ty_sw_timer_refresh

功能:该函数用于,检查数组中的定时,是否超时,需要动作。

参数:无

返回值:无

示例:

 

lib_am_ty_sw_timer_refresh();

 

4 lib_am_ty_sw_timer_delay_timer_cbk

功能:该函数用于,定时器超时回调函数。

参数:无

返回值:无

示例:

 

OSATimerStart(lib_am_ty_sw_timer_delay_timer_ref, 200, 200, lib_am_ty_sw_timer_delay_timer_cbk, 0);

 

4 Demo实战

4.1 创建一个Demo

复制8.3_interlocking示例工程,到同一个文件夹下,修改文件名为8.4_timer_delay,如图:

空气开关

4.2 修改makefile

增加文件组件所在目录头文件路径,和源文件路径,如图:

空气开关

4.3 增加头文件

使用代码编辑器,将新建的工程文件加入代码编辑器中,打开main.c,修改main.c,加入am.h等头文件,如图:

空气开关

4.4 修改代码

在Phase2Inits_exit 创建一个任务,如图:

空气开关

4.5 宏定义介绍

sample_td_uart_printf

输出日志到DEBUG 串口,日志比较少,可以输出到这个串口,如果日志比较多,需要输出到usb口,以免不必要的问题出现

sample_td_catstudio_printf

输出日志到USB 串口,使用catstudio查看,catstudio查看日志需要更新对应版本mdb.txt文件,软件打开filtter过滤日志,只查看用户输出的日志

SAMPLE_TD_TASK_STACK_SIZE

栈空间宏定义

4.6 全局变量介绍

sample_td_task_stack

任务栈空间,本例使用数组实现,用户在做项目时,可以预先估算下当先任务需要的大致栈空间,OS没有提供可以查看栈空间使用情况的API

sample_td_task_ref

任务指针

4.7 函数介绍

Phase1Inits_enter

底层初始化,本例空

Phase1Inits_exit

底层初始化,本例空

Phase2Inits_enter

底层初始化,本例空

Phase2Inits_exit

创建主任务,初始化消息队列,定时器,任务等。

代码片段:

 

int ret;

ret = OSATaskCreate(&sample_td_task_ref, sample_td_task_stack, SAMPLE_TD_TASK_STACK_SIZE, 120, "sample_td_task", sample_td_task, NULL);
ASSERT(ret == OS_SUCCESS);

sample_td_uart_printf("Phase2Inits_exitn");

 

td_wait_network_ready

驻网等待,定时器需要联网获取时间后才可以开始。

代码片段:

 

static void td_wait_network_ready(void)
{
    int count = 0;
    int ready = 0;

    while (!ready)
    {
        if (getCeregReady(isMasterSim0() ? IND_REQ_HANDLE : IND_REQ_HANDLE_1))
        {
            ready = 1;
        }
        sample_td_uart_printf("wait_network_ready: %d s", count++);
        if (count > 300)
            PM812_SW_RESET();

        OSATaskSleep(200);
    }
}

 

td_open

打开某一路的输出。

代码片段:

 

static void td_open(UINT8 channel, UINT8 type)
{
    sample_td_uart_printf("channel %d %d open", channel, type);
}

 

td_close

关闭某一路的输出。

代码片段:

 

static void td_close(UINT8 channel, UINT8 type)
{
    sample_td_uart_printf("channel %d %d close", channel, type);
}

 

sample_td_task

延时测试主任务,定义了三个延时,10,30s,60s。

代码片段:

 

static void sample_td_task(void *ptr)
{
    UINT32 timestamp = 0;
    
    //等待网络连接
    td_wait_network_ready();
    //根据当前时间,设置,10s,30s,1分钟三个定时器
    //服务器下发未来的某个时刻,可以将下发的时刻改为时间戳赋值即可
    timestamp = utils_utc8_2_timestamp();
    sample_td_uart_printf("%s(%d) now:%ld", __FUNCTION__, __LINE__, timestamp);
    am_ty_sw_td[0].timestamp = timestamp + 10;
    am_ty_sw_td[0].id = 1;
    am_ty_sw_td[0].chl = 1;
    am_ty_sw_td[0].t = 1;
    am_ty_sw_td[0].open = &td_open;
    am_ty_sw_td[1].timestamp = timestamp + 30;
    am_ty_sw_td[1].id = 2;
    am_ty_sw_td[1].chl = 1;
    am_ty_sw_td[1].t = 0;
    am_ty_sw_td[1].open = &td_close;
    am_ty_sw_td[2].timestamp = timestamp + 60;
    am_ty_sw_td[2].id = 3;
    am_ty_sw_td[2].chl = 1;
    am_ty_sw_td[2].t = 1;
    am_ty_sw_td[2].open = &td_open;
    //初始化定时器任务和资源
    lib_am_ty_sw_timer_delay_timer_init();
    
    while(1)
    {
        sample_td_sleep(1);
    }
}

 

4.8 编译

在SDK根目录打开命令行,输入命令.build.bat -l .amaziot_bloom_os_sdksamplelibraries8.4_timer_delay

 

PS F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF
λ .build.bat -l .amaziot_bloom_os_sdksamplelibraries8.4_timer_delay
子目录或文件 outbin 已经存在。
命令语法不正确。
子目录或文件 buildobj 已经存在。
gnumake: Entering directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.4_timer_delay'
armcc.exe -c  --cpu Cortex-R4 --no_unaligned_access -g -O2 --apcs /inter --diag_suppress 2084,1,2,177,188,223,550,1296,2795,6319,9931,9933 --diag_error=warning --gnu --thumb --loose_implicit_cast  -DDATA_COLLECTOR_IMPL -DISPT_OVER_SSP -DDIAG_SSP_DOUBLE_BUFFER_USE_DYNAMIC_ALLOCATION -DENV_XSCALE -DL1_DCXO_ENABLED -DLTE_HIGH_MOBILITY_OPTIMIZATION -DRUN_XIP_MODE -DCRANE_Z2 -DCA_LONG_IPC_MSG -DNEZHA3 -DNEZHA3_1826 -DUPGRADE_PLMS -DUPGRADE_PLMS_SR -DLTE_GSMMULTIBCCH -DGPLC_LTE_RSSI_SCAN -DL1V_NEW_RSSI -DUPGRADE_PLMS_3G -DUPGRADE_PLMS_L1 -DUPGRADE_FG_PLMS -DFG_PLMS_URR -DUPGRADE_L1A_FG_PLMS -DUPGRADE_PLMS_STAGE_2 -DUPGRADE_MBCCH -DMULTI_BCCH_READY_IND -DURR_MRAT_ICS_SEARCH -DUPGRADE_ICS -DMRAT_NAS -DUPGRADE_PLMS_SEARCH_API -DICS_MBCCH -DICS_MBCCH_2G_RSSI -DDIAG_NEWPP -DPHS_SW_DEMO -DPHS_SW_DEMO_TTC -DPHS_SW_DEMO_TTC_PM -DFULL_SYSTEM -D_DDR_INIT_ -D_TAVOR_HARBELL_ -DUPGRADE_ARBEL_PLATFORM -D_TAVOR_B0_SILICON_ -DTDL1C_SPY_ENABLE -DDLM_TAVOR -DTAVOR -DFLAVOR_DUALCORE -DDEBUG_D2_MOR_REG_RESEREVED_ENABLE -D_DIAG_USE_COMMSTACK_ -D_TAVOR_DIAG_ -DPM_DEBUG_MODE_ENABLED -DPM_D2FULL_MODE -DPM_EXT_DBG_INT_ARR -DFEATURE_WB_AMR_PS -DMACRO_FOR_LWG -DHL_LWG -DOPTIMIZE_FOR_2G_BCCH -DPLAT_TEST -D_FDI_USE_OSA_ -DPLAT_USE_THREADX -DLWIP_IPNETBUF_SUPPORT -DCRANE_MCU_DONGLE -DAT_OVER_UART -DPHS_SW_DEMO_TTC_PM -DUPGRADE_LTE_ONLY -DEXT_AT_MODEM_SUPPORT -DLTEONLY_THIN_SINGLE_SIM -DLFS_FILE_SYS -DLFS_FILE_SYS_V2 -DPSM_ENABLE -DNO_PAHO_MQTT -DNO_XML -DNO_LWM2M -DREMOVE_MBEDTLS -DNO_AT_NET -DCRANE_SD_NOT_SUPPORT -DNTP -DYMODEM_EEH_DUMP -DENABLE_DM_LTEONLY -DLTEONLY_THIN -DNO_EXTEND_MY_Q_AT -DNOT_SUPPORT_HTTPS -DNOT_SUPPORT_PM813 -DCRANEL_4MRAM -DREMOVE_PB -DUART_NEW_VERSION -DREMOVE_MEP -DREMOVE_SMS -DREMOVE_ENVSIM -DAPN_INCODE -DLTEONLY_THIN_SINGLE_SIM_2MFLASH -DASR160X_OPENCPU_FEATURE -DENABLE_UART3_FEATRUE -DENABLE_UART4_FEATRUE -DYUGE_MBEDTLS_3_2_1 -DENABLE_MAC_TX_DATA_LOGGING -DDISABLE_NVRAM_ACCESS -DINTEL_UPGRADE_EE_HANDLER_SUPPORT -DLTE_W_PS -DL1_DUAL_MODE -DUPGRADE_HERMON_DUAL -DINTEL_UPGRADE_DUAL_RAT -DINTEL_UPGRADE_GPRS_CIPHER_FLUSH -DUPGRADE_ENHANCED_QUAD_BAND -DINTEL_2CHIP_PLAT -DI_2CHIP_PLAT -DUPGRDE_TAVOR_COMMUNICATION -DRUN_WIRELESS_MODEM -DFLAVOR_DDR12MB_GB1MB5 -DFEATURE_SHMEM -DACIPC_ENABLE_NEW_CALLBACK_MECHANISM -DRELIABLE_DATA -DMAP_NSS -DTV_FNAME=""SW_PLATFORM=PMD2NONE PHS_SW_DEMO PHS_SW_DEMO_PM SRCNUCLEUS FULL_SYSTEM NOACRTC PDFLT PLAT_TEST PV2 DIAGOSHMEM NVM WITHL1V"" -DTV_FDESC=""SW_DESCRIPTION="" -DENABLE_ACIPC -D_DATAOMSL_ENABLED_ -DUSB_CABLE_DETECTION_VIA_PMIC -DMIPS_TEST -DMIPS_TEST_RAM -DFLAVOR_DIET_RAM -DNVM_INCLUDE -DMSL_INCLUDE -DMSL_POOL_MEM -DNO_AUDIO -DOSA_QUEUE_NAMES -D_DIAG_DISABLE_USB_ -DOSA_NUCLEUS -DOSA_USED -DPM_D2NONE_MODE -DCRANE_SOC_TEMPERATURE_SENSOR -DL1_SW_UPDATE_FOR_DIGRF -DPHS_L1_SW_UPDATE_R7 -DUPGRADE_LTE -DFRBD_CALIB_NVM -DFRBD_AGC_CALIB -DFRBD_FDT_CALIB -DHSPA_MPR -DCAPT_PARAMS_OPTIMIZE -DL1_WB_R99_ONLY -DL1V_WB_R99_ONLY -DINTERGRATED_RF_SUPPORT -DL1_RX_DIV_SUPPORT -DENABLE_OOS_HANDLING -DTAVOR_D2_WB_L1_SUPPORT -DL1_DDR_HIGH_FREQ -DUPGRADE_DIGRF3G_SUPPORT -DW_PS_PLUS_G_PAGING -D"NO_APLP=0" -DINTEL_UPGRADE_UNIFIED_VOICE_TASK -DINTEL_UPGRADE_R99 -DAPLP_SPY_ENABLE -D__TARGET_FEATURE_DOUBLEWORD -DWHOLE_UMTS_STACK -DUSE_TTPCOM_CSR_BLUETOOTH_AUDIO_GAIN_CONTROL -DL1_UPGRADE_R5 -DUPGRADE_EDGE -DUPGRADE_R4_FS1 -DINTEL_UPGRADE_GSM_CRL_IF -DUPGRADE_EGPRS_M -DINTEL_UPGRADE_EGPRS_M -DINTEL_UPGRADE_RF_PARAMS_IN_CF_TDS -DINTEL_UPGRADE_2SAMPLES_PER_SYMBOL -D"GPRS_MULTISLOT_CLASS=12" -D"EGPRS_MULTISLOT_CLASS=12" -DMARVELL_UPGRADE_BSIC_REDESIGN -DMSL_INCLUDE -DINTEL_HERMON_SAC -DCRANE_CUST_BUILD -DL1_SW_UPDATE_FOR_DIGRF -DFLAVOR_COM -DSILICON_PV2 -DSILICON_SEAGULL -DSILICON_TTC_CORE_SEAGULL -DPCAC_INCLUDE -Otime  -DBUILD_DATE=""08 05 2024"" -DBUILD_TIME=""16:35:51"" -Iatcmdsinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoptelephonyyugeinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalUARTinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalcoreinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalPMUinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalGPIOinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xosposixinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xdiagdiag_logicsrc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xcswSysCfginc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xcswplatforminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xenvwin32inc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xcswBSPinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xcswplatformdev_platbuild -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xososainc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xosthreadxinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xosnu_xscaleinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacpsminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcachttpclientsrc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xdiagdiag_logicinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoptimerinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhopintcinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xcswPMinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoppminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilTickManagerinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhopBSPinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoptelephonyatcmdsrvinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoptelephonyatparserinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoptelephonysdkinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcachttpclientinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacciinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcaclwipv4v6srcinclude -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcaclwipv4v6srcincludearch -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcaclwipv4v6srcincludeipv4 -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcaclwipv4v6srcincludeipv6 -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcaclwipv4v6srcincludelwip -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcaclwipv4v6srcincludenetif -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhopmmi_matinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xtavorArbelinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xtavorenvinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoptelephonymodeminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacdusterinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacfotainc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalI2Cinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalACIPCinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilfatsysflash -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilFDIsrcINCLUDE -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalMMUinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilFDIsrcFDI_ADD -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilFDIsrcFM_INC -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilfatsysfshdr -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutillittlefsinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacttsinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacdialinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilcsw_memoryinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoputilitiesinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhopcommpminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilnvminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilEEhandlerinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilEEhandlersrc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhopRTCinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhoptelephonyci_clientinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalBT_deviceinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalUARTinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhopmrdinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhopdmainc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilsoftutilinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhalSPIinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacwebsocketinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacatnet_srvinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xsoftutilfotacomminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xaud_swAudioinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xaud_swACM_COMMinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xaud_swaudio_stubsrc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhopaaminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xaud_swAudioHALinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xhaldbgshellinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFincludeasr160xpcacopencpuinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFamaziot_bloom_os_sdkutils -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.4_timer_delayaminc -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.4_timer_delayatcmdsinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFamaziot_bloom_os_sdklibraries -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFamaziot_bloom_os_sdklibrariesair_4g_swair_sw4_tuya  -o buildobj/ext_at_cmds.o F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.4_timer_delay/atcmds/src/ext_at_cmds.c
armlink.exe buildobj/main.o buildobj/ext_at_cmds.o buildobj/ext_at_controller.o buildobj/utils_string.o buildobj/am_ty_sw_timer_delay.o 
                -o F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFoutbinArbel_PMD2NONE_40M.axf 
                --via F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFprebuilt_1606lArbel_PMD2NONE_targ_objliblist.txt 
                --elf 
                --scatter F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFprebuilt_1606lCrane_DS_4M_Ram_2M_Flash_XIP_CIPSRAM_Common_SingleSIM.sct 
                --predefine="-DLTEONLY_THIN_SINGLE_SIM" --map --symbols --info sizes,totals 
                --list F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFoutbinArbel_PMD2NONE_40M.map 
                --keep init.o(Header) --keep init.o(Vectors) --diag_suppress 6312,6314,6319,6329 
                --feedback F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFoutfeedbackLinkOptLteonlyThin_SingleSim_NoSMS.txt
F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRFtoolsbuildimage_1606l.bat
SDK_PROD_TYPE   : [DM]
SDK_CUST_SKU    : [THIN_SINGLE_SIM_NO_SMS]
SDK_PS_MODE     : [LTEONLY]
SDK_CHIP_VER    : [Z2A0]
SDK_OS_TYPE     : [TX]
Platform Convertion Tools v4.01 with PS option extension
Convertion done!
|INPUT   |outbincp_1606L.bin
|MARK    |NAME    |EXEADDR .LOADADDR.LENGTH  .CPZLADDR|COMPRESS STASTIC              |
|--------|--------|--------.--------.--------.--------|------------------------------|
|This Is LteOnly 4M|
|RW_CPZ_1|DDR_RW_ |7e119000.80064928.0000cde0.80065000|0000cde0- >00003000
|This Is LteOnly 4M|
|RW_CPZ_2|PS_NCAH |7e388000.80071708.00001300.80068000|00001300- >00001000
|This Is LteOnly 4M|
|RW_CPZ_3|ITCM    |7e3dac00.80072a08.0000f51c.80069000|0000f51c- >0000a000
|This Is LteOnly 4M|
|RW_CPZ_4|CODE_PS |7e1aa000.80081f24.0002fe3c.80073000|0002fe3c- >0001e000
|This Is LteOnly 4M|
|RW_CPZ_5|CODEPSB |7e1dc000.800b1d60.000339bc.80091000|000339bc- >0001b000
|This Is LteOnly 4M|
|RW_CPZ_6|CODEPSC |7e213000.800e571c.000323ec.800ac000|000323ec- >0001b000
|This Is LteOnly 4M|
|RW_CPZ_7|CODEPSD |7e249000.80117b08.00028d88.800c7000|00028d88- >0001a000
|This Is LteOnly 4M|
|RW_CPZ_8|CODEPSE |7e277000.80140890.0002e310.800e1000|0002e310- >0001a000
|This Is LteOnly 4M|
|RW_CPZ_9|CODEPSF |7e2a9000.8016eba0.0001c948.800fb000|0001c948- >00011000
|This Is LteOnly 4M|
|RW_CPZ_A|CODE_PL |7e2ca000.8018b4e8.0002fa44.8010c000|0002fa44- >0001e000
|This Is LteOnly 4M|
|RW_CPZ_B|CODEPLB |7e2fa000.801baf2c.0003905c.8012a000|0003905c- >00021000
|This Is LteOnly 4M|
|RW_CPZ_C|CODEPLC |7e337000.801f3f88.000268d4.8014b000|000268d4- >00011000
|--------|--------|--------.--------.--------.--------|------------------------------|
|                                                     |      0x0020385c - > 0x00145000|
|                                                     |       2.014(MB) - >  1.270(MB)|
|------------------------------------------------------------------------------------|
cp_1606L.axf
cp_1606L.bin
cp_1606L.map
gnumake: Leaving directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.4_timer_delay'
"copy NEZHAC_CP_CNR_MIFI_TX.bin to ./ "

已复制         1 个文件。

 

4.9 生成固件

参考入门中开发工具,生成工具。

4.10 测试

测试步骤:

参考编译教程,和文档开头的编译指令,进行编译

按照编译教程选择对应的选项

烧录

4.11 固件

  上电后,debug串口会打印出延时后对应响应,用户可以按照自己的业务逻辑处理;

空气开关

本文章源自奇迹物联开源的物联网应用知识库Cellular IoT Wiki,更多技术干货欢迎关注收藏Wiki:Cellular IoT Wiki 知识库(https://rckrv97mzx.feishu.cn/wiki/wikcnBvAC9WOkEYG5CLqGwm6PHf)

欢迎同学们走进AmazIOT知识库的世界!

这里是为物联网人构建的技术应用百科,以便帮助你更快更简单的开发物联网产品。

Cellular IoT Wiki初心:

在我们长期投身于蜂窝物联网 ODM/OEM 解决方案的实践过程中,一直被物联网技术碎片化与产业资源碎片化的问题所困扰。从产品定义、芯片选型,到软硬件研发和测试,物联网技术的碎片化以及产业资源的碎片化,始终对团队的产品开发交付质量和效率形成制约。为了减少因物联网碎片化而带来的重复开发工作,我们着手对物联网开发中高频应用的技术知识进行沉淀管理,并基于 Bloom OS 搭建了不同平台的 RTOS 应用生态。后来我们发现,很多物联网产品开发团队都面临着相似的困扰,于是,我们决定向全体物联网行业开发者开放奇迹物联内部沉淀的应用技术知识库 Wiki,期望能为更多物联网产品开发者减轻一些重复造轮子的负担。

Cellular IoT Wiki沉淀的技术内容方向如下:

空气开关

奇迹物联的业务服务范围:基于自研的NB-IoT、Cat1、Cat4等物联网模组,为客户物联网ODM/OEM解决方案服务。我们的研发技术中心在石家庄,PCBA生产基地分布在深圳、石家庄、北京三个工厂,满足不同区域&不同量产规模&不同产品开发阶段的生产制造任务。跟传统PCBA工厂最大的区别是我们只服务物联网行业客户。

连接我们,和10000+物联网开发者一起 降低技术和成本门槛

让蜂窝物联网应用更简单~~

哈哈你终于滑到最重要的模块了,

千万不!要!划!走!忍住冲动!~

欢迎加入飞书“开源技术交流群”,随时找到我们哦~

点击链接如何加入奇迹物联技术话题群(https://rckrv97mzx.feishu.cn/docx/Xskpd1cFQo7hu9x5EuicbsjTnTf)可以获取加入技术话题群攻略

Hey 物联网从业者,

你是否有了解过奇迹物联的官方公众号“eSIM物联工场”呢?

这里是奇迹物联的物联网应用技术开源wiki主阵地,欢迎关注公众号,不迷路~

及时获得最新物联网应用技术沉淀发布

注:本文部分内容来源于网络,如有侵权,请及时联系我们。

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分