01
概述
掉电检测和保护电路:就是对系统电压进行监测,当系统电压值下降到低压警戒值时,电路会发现并做出反应,发出一个警告信号,处理器接收到警告信号之后马上进行数据保存等操作,防止系统数据丢失。
在物联网行业中,大多数设备都需要联网,和服务器进行通信。那么掉电瞬间,如何让主控芯片有一定的时间将报警信息通过网络发送给服务器?
02
什么是超级电容
超级电容又叫法拉电容,超级电容的容量比普通的电容器大得多。由于其容量很大,对外表现和电池相同,因此也有称作“电容电池”。超级电容属于双电层电容器,它是世界上已投入量产的双电层电容器中容量最大的一种,其基本原理和其他种类的双电层电容器一样,都是利用活性炭多孔电极和电解质组成的双电层结构获得超大的容量。
03
超级电容的特点
(1)充电速度快,充电10s~10min可达到其额定容量的95%以上;
(2)循环使用寿命长,深度充放电循环使用次数可达50万次,没有记忆效应;
(3)大电流放电能力超强,能量转换效率高,过程损失小,大电流能量循环效率:90%;
(4)功率密度高,可达300W/kkg-5000 Wkg,相当于电池的5-10倍;
(5)产品原材料构成、生产、使用、储存以及拆解过程均没有污染,是理想的绿色环保电源;
(6)充放电线路简单,无需充电电池那样的充电电路,安全系数高,长期使用免维护;
(7)超低温特性好,温度范围宽达-40℃-+70℃;
(8)检测方便,剩余电量可直接读出;
(9)单体容量范围通常在0.1F~1000F。
04
掉电检测
掉电检测采用简单的电阻分压,用于检测系统电压,一旦外部电压低于系统设定的最低电压值,掉电检测信号就会产生一个中断信号,从而使能掉电报警。这里需要注意的是分压电阻尽量选大一点,以减少漏电流,本文选择的是200 kQ\100k2。
在掉电瞬间,超级电容依然可以在一定时间内给系统提供电源,主控芯片检测到中断后,立即停止当前工作,上报报警信息给服务器。
05
组件的使用
1 Gitee链接地址
Demo位于amaziot_bloom_os_sdk\sample\libraries\8.2_power_alarm Gitee源码地址:https://gitee.com/ning./hongdou Github源码地址:https://github.com/ayumid/hongdou 编译指令:.\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\8.2_power_alarm |
2 组件功能介绍
本组件实际为GPIO输入检测,应用于空开等设备,当需要断电报警时,使用这个组件。实现该功能需要硬件上做一些处理(增加超级电容,保证断电后设备还可以检测到断电,之后上报到服务器)。
3 代码讲解
1 lib_power_alarm_irq_handler_alarm
功能:该函数用于,产生hisr。在gpio初始化是注册到gpio结构体中。
参数:无
返回值:无
示例:
config.isr = lib_power_alarm_irq_handler_alarm;
2 lib_power_outage_alarm_handler
功能:该函数用于,gpio中断回调函数,启动搞一个定时器,去抖用。
参数:无
返回值:无
示例:
Os_Create_HISR(&ty_sw_alarm_hisr_alarm, "Gpio_Hisr", lib_power_outage_alarm_handler, 2);
3 lib_power_outage_alarm_cbk
功能:该函数用于,定时器回调函数,去抖完毕。
参数:无
返回值:无
示例:
OSATimerStart(ty_sw_alarm_ref_alarm, 40, 0, lib_power_outage_alarm_cbk, 0);
4 lib_power_outage_alarm_init
功能:该函数用于,断电报警初始化。
参数:无
返回值:无
示例:
lib_power_outage_alarm_init();
4 Demo实战
4.1 创建一个Demo
复制3.2-inter_at示例工程,到同一个文件夹下,修改文件名为8.2_power_alarm,如图:
4.2 修改makefile
增加文件组件所在目录头文件路径,和源文件路径,如图:
4.3 增加头文件
使用代码编辑器,将新建的工程文件加入代码编辑器中,打开main.c,修改main.c,加入am.h等头文件,如图:
4.4 修改代码
在Phase2Inits_exit 创建一个任务,如图:
4.5 宏定义介绍
输出日志到DEBUG 串口,日志比较少,可以输出到这个串口,如果日志比较多,需要输出到usb口,以免不必要的问题出现
输出日志到USB 串口,使用catstudio查看,catstudio查看日志需要更新对应版本mdb.txt文件,软件打开filtter过滤日志,只查看用户输出的日志
栈空间宏定义
4.6 全局变量介绍
任务栈空间,本例使用动态内存实现,用户在做项目时,可以预先估算下当先任务需要的大致栈空间,OS没有提供可以查看栈空间使用情况的API
任务指针
4.7 函数介绍
底层初始化,本例空
底层初始化,本例空
底层初始化,本例空
创建主任务,初始化消息队列,定时器,任务等。
代码片段:
int ret; OS_STATUS status; /*creat message*/ status = OSAMsgQCreate(&am_ty_sw_alarm_msgq, "am_ty_sw_alarm_msgq", SAMPLE_MSGQ_TASK_MSGQ_MSG_SIZE, SAMPLE_MSGQ_TASK_MSGQ_QUEUE_SIZE, OS_FIFO); ASSERT(status == OS_SUCCESS); ret = OSATaskCreate(&sample_gpio_task_ref, sample_gpio_task_stack, SAMPLE_GPIO_TASK_STACK_SIZE, 120, "sample_gpio_task_gpio", sample_gpio_task_gpio, NULL); ASSERT(ret == OS_SUCCESS); sample_power_alarm_uart_printf("Phase2Inits_exit\n");
消息队列发送。
代码片段:
int ret = 0; OSA_STATUS status = OSAMsgQSend(am_ty_sw_alarm_msgq, SAMPLE_MSGQ_TASK_MSGQ_MSG_SIZE, (void*)msg, OSA_NO_SUSPEND); if (status != OS_SUCCESS) { sample_power_alarm_uart_printf("%s, OSAMsgQSend lose, msg->id=%d, status=%d", __FUNCTION__, msg->msgId, status); if (msg->data) { free(msg->data); } ret = -1; } return ret;
主任务,接收报警信号,并通过串口输出信息,使用时可以根据需求执行相应操作。
代码片段:
OS_STATUS status; app_ty_sw_msgq_msg sdkMsg = {0}; lib_power_outage_alarm_init(); while(1) { status = OSAMsgQRecv(am_ty_sw_alarm_msgq, (void *)&sdkMsg, SAMPLE_MSGQ_TASK_MSGQ_MSG_SIZE, OSA_SUSPEND); if (status == OS_SUCCESS) { sample_power_alarm_uart_printf("%s: sdkMsg msgId: %d\n", __FUNCTION__, sdkMsg.msgId); } if (sdkMsg.data) free(sdkMsg.data); }
4.8 编译
在SDK根目录打开命令行,输入命令.\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\8.2_power_alarm\
PS F:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF λ .\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\8.2_power_alarm\ 子目录或文件 out\bin 已经存在。 命令语法不正确。 子目录或文件 build\obj 已经存在。 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.2_power_alarm' 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="\"07 26 2024\"" -DBUILD_TIME="\"10:39:02\"" -Iatcmds\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\yuge\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\UART\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\core\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\PMU\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\GPIO\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\posix\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\diag\diag_logic\src -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\SysCfg\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\platform\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\env\win32\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\BSP\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\platform\dev_plat\build -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\osa\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\threadx\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\nu_xscale\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\psm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\httpclient\src -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\diag\diag_logic\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\timer\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\intc\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\PM\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\pm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\TickManager\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\BSP\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\atcmdsrv\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\atparser\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\sdk\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\httpclient\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\ci\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\arch -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\ipv4 -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\ipv6 -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\lwip -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\netif -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\mmi_mat\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\tavor\Arbel\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\tavor\env\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\modem\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\duster\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\fota\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\I2C\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\ACIPC\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fatsys\flash -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\INCLUDE -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\MMU\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\FDI_ADD -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\FM_INC -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fatsys\fs\hdr -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\littlefs\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\tts\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\dial\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\csw_memory\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\utilities\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\commpm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\nvm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\EEhandler\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\EEhandler\src -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\RTC\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\ci_client\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\BT_device\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\UART\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\mrd\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\dma\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\softutil\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\SPI\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\websocket\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\atnet_srv\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fotacomm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\Audio\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\ACM_COMM\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\audio_stub\src -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\aam\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\AudioHAL\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\dbgshell\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\opencpu\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\utils -IF:/3.asr-b/cat.1-asr1606/1.software/BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.2_power_alarm -IF:/3.asr-b/cat.1-asr1606/1.software/BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.2_power_alarm\am\inc -IF:/3.asr-b/cat.1-asr1606/1.software/BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/8.2_power_alarm\atcmds\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\libraries -IF:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\libraries\air_4g_sw\air_sw4_tuya -o build\obj/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.2_power_alarm/atcmds/src/ext_at_cmds.c armlink.exe build\obj/main.o build\obj/ext_at_cmds.o build\obj/ext_at_controller.o build\obj/am_ty_sw_alarm.o \ -o F:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\bin\Arbel_PMD2NONE_40M.axf \ --via F:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\prebuilt_1606l\Arbel_PMD2NONE_targ_objliblist.txt \ --elf \ --scatter F:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\prebuilt_1606l\Crane_DS_4M_Ram_2M_Flash_XIP_CIPSRAM_Common_SingleSIM.sct \ --predefine="-DLTEONLY_THIN_SINGLE_SIM" --map --symbols --info sizes,totals \ --list F:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\bin\Arbel_PMD2NONE_40M.map \ --keep init.o(Header) --keep init.o(Vectors) --diag_suppress 6312,6314,6319,6329 \ --feedback F:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\feedbackLinkOptLteonlyThin_SingleSim_NoSMS.txt F:\3.asr-b\cat.1-asr1606\1.software\BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\tools\buildimage_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 |out\bin\cp_1606L.bin |MARK |NAME |EXEADDR .LOADADDR.LENGTH .CPZLADDR|COMPRESS STASTIC | |--------|--------|--------.--------.--------.--------|------------------------------| |This Is LteOnly 4M| |RW_CPZ_1|DDR_RW_ |7e119000.80064210.0000cddc.80065000|0000cddc->00003000 |This Is LteOnly 4M| |RW_CPZ_2|PS_NCAH |7e388000.80070fec.00001300.80068000|00001300->00001000 |This Is LteOnly 4M| |RW_CPZ_3|ITCM |7e3dac00.800722ec.0000f51c.80069000|0000f51c->0000a000 |This Is LteOnly 4M| |RW_CPZ_4|CODE_PS |7e1aa000.80081808.0002fe38.80073000|0002fe38->0001e000 |This Is LteOnly 4M| |RW_CPZ_5|CODEPSB |7e1dc000.800b1640.000339c0.80091000|000339c0->0001b000 |This Is LteOnly 4M| |RW_CPZ_6|CODEPSC |7e213000.800e5000.000323ec.800ac000|000323ec->0001b000 |This Is LteOnly 4M| |RW_CPZ_7|CODEPSD |7e249000.801173ec.00028d88.800c7000|00028d88->0001a000 |This Is LteOnly 4M| |RW_CPZ_8|CODEPSE |7e277000.80140174.0002e310.800e1000|0002e310->0001a000 |This Is LteOnly 4M| |RW_CPZ_9|CODEPSF |7e2a9000.8016e484.0001c948.800fb000|0001c948->00011000 |This Is LteOnly 4M| |RW_CPZ_A|CODE_PL |7e2ca000.8018adcc.0002fa44.8010c000|0002fa44->0001e000 |This Is LteOnly 4M| |RW_CPZ_B|CODEPLB |7e2fa000.801ba810.00039058.8012a000|00039058->00021000 |This Is LteOnly 4M| |RW_CPZ_C|CODEPLC |7e337000.801f3868.000268d4.8014b000|000268d4->00011000 |--------|--------|--------.--------.--------.--------|------------------------------| | | 0x0020313c -> 0x00145000| | | 2.012(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.2_power_alarm' "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)
注:本文部分内容来源于网络,如有侵权,请及时联系我们。
文章评论(0条评论)
登录后参与讨论