原创 开源物联网技术--电量计量功能软硬件设计分享

2024-9-25 14:05 115 0 分类: 物联网

一、为什么要使用电量计量功能

节约资源:电量计量可以帮助人们控制用电量,从而达到节约资源的目的。在当前严峻的资源供应形势下,节约能源是我们应该重视的问题。

合理计费:电表可以帮助公共事业单位进行合理计费,以维护公共事业的正常运营。同时,使用者也能根据自己的实际用电量来支付相应的费用。

监控消耗:通过定期查看电量的使用情况,能够快速发现用电量异常的情况。及时修复故障,避免浪费资源和高额费用。

二、电量计量功能的行业知识介绍

什么是电量计量?

电量计量技术是由电量计量装置来确定电能量值,为实现电能量单位的统一及其量值准确、可靠的一系列活动。在电力系统中,电量计量是电力生产、销售以及电网安全运行的重要环节,发电、输电、配电和用电均需要对电能准确测量。电量计量的技术水平和管理水平不仅影响电能量结算的准确性和公正性,而且事关电力工业的发展,涉及国家、电力企业和广大电力客户的合法权益。因此,搞好电量计量技术具有十分重要的意义。

电量计量的基本工作原理

  • 电压测量:使用电压互感器(PT)或电阻分压器等装置,将高电压降为低电压,以便测量。
  • 电流测量:使用电流互感器(CT)或分流器等装置,将大电流降为小电流,以便测量。
  • 电能计算:通过测量电压和电流,并根据功率因数计算出有功功率和无功功率。有功功率乘以用电时间即可得到用电量。
  • 数据处理:电量计量装置通常会将测量到的数据进行存储和处理,以便后续查询和分析。同时,还可以通过通信接口将数据上传至上级系统,实现远程监控和管理。

总之,电量计量的工作原理是通过测量电压和电流,并根据功率因数计算出有功功率和无功功率,从而实现对用电量的准确计量。

三、电量计量功能的硬件设计方案

本文主要采用了芯海科技的CSE7759B做为计量芯片。该芯片为单相多功能计量芯片,其提供高频脉冲 CF 用于电能计量,通过 UART 可以直接读取电 流、电压和功率的相关参数(如:系数、周期);串口波特率为 4800 bps(±2%),8 位数据,1 位偶校 验,1 停止位。该芯片采用 SOP8 封装。

硬件设计原理1如下(隔离方案):

在 CSE7759B 的电源端,应并联两个小电容,以滤除来自电网高频及低频噪声。电流信 号通过锰铜电阻采样后接入 CSE7759B,电压信号则通过电阻网络后输入到 CSE7759B。

CSE7759B 为免校准电能计量芯片,芯片出厂校准后偏差为±2%,那么外部器件的精度最终影响客户产品的整体精度,图中标识的 1%精度器件,其精度越高则客户整机精度越高。从上图可看出,电流通道影响电流精度的元器件为 1mR 锰铜电阻,电压通道影响电压精度的元器件为1M电阻和与之相连的1K电阻,当这三个元器件精度均在±1%内时,则 CSE7759B 免校准整机误差可控制在±3%内。电压通道 1M 电阻应选择耐高压 1000V 1%电阻(或更高精度);否则需拆分成 5 个 0805 1%(或更 高精度)电阻。避免使用过程中由于电阻耐压值不够,造成整机损坏。 CSE7759B 部分采集强电信号,根据安规标准任何人体可能触碰的地方需进行隔离,图中使用光耦 隔离(客户自行选择隔离方式,并不限制)。 选择零线做地或火线做地均可,建议使用零线做地。

硬件设计原理2如下(隔离方案):

上图为CSE7759B 非隔离方案,MCU 工作电压 3.3V。若 MCU 工作电压 5V,则 TI 与 MCU 之间接 200R 电阻。

如果需要了解更详细的CSE7759B的硬件方案,请来奇迹物联的wiki知识库来了解更多吧。

四、电量计量功能的软件设计方案

本文采用了奇迹物联的红豆版开源技术平台为主控单元,一步步手把手教会读者如何使用红豆版开源平台编写CSE7759B驱动,以及如何调用CSE7759B在OLED屏幕上显示。这里对代码就不多详解,如果需要详细了解,请到奇迹物联的红豆版开源平台了解详细代码讲解。

现在我们开始为大家展示如何在奇迹的红豆平台上,一步步如何实现电量计量功能的吧。

1:创建一个Demo

复制从红豆平台下载的SDK源码包中的的4.2_hal_UART示例工程,到同一个文件夹下,修改文件名为6.0_CSE7759B,如图:

2: 修改makefile

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

3: 增加头文件

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

4: 修改代码

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

5: 宏定义介绍

  • sample_uarts_uart_printf

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

  • sample_uarts_catstudio_printf

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

  • SAMPLE_CSE7759B_TASK_STACK_SIZE

栈空间宏定义

6: 全局变量介绍

  • sample_cse7795b_task_stack

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

  • sample_cse7795b_task_ref

任务指针

  • sample_cse7759b_oled_stack_ptr

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

  • sample_cse7759b_oled_task_ref

OLED任务指针

7: 函数介绍

  • Phase1Inits_enter

底层初始化,本例空

  • Phase1Inits_exit

底层初始化,本例空

  • Phase2Inits_enter

底层初始化,本例空

  • Phase2Inits_exit

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

代码片段:

C
OSA_STATUS status;

sample_cse7759b_uart_printf("%s[%d]: starting...\n", __FUNCTION__, __LINE__);
status = OSAMsgQCreate(&sample_cse7795b_msgq, "sample_cse7795b_msgq", sizeof(uartParam), 300, OS_FIFO);
ASSERT(status == OS_SUCCESS);

sample_cse7795b_task_stack = malloc(SAMPLE_CSE7759B_TASK_STACK_SIZE);
ASSERT(sample_cse7795b_task_stack != NULL);

status = OSATaskCreate(&sample_cse7795b_task_ref, sample_cse7795b_task_stack, SAMPLE_CSE7759B_TASK_STACK_SIZE, 82, "sample_cse7759b_uart_thread", sample_cse7759b_uart_thread, NULL);
ASSERT(status == OS_SUCCESS);

status = OSAMsgQCreate(&sample_cse7795b_oled_msgq, "sample_cse7795b_oled_msgq", sizeof(eleParam), 300, OS_FIFO);
ASSERT(status == OS_SUCCESS);

sample_cse7759b_oled_stack_ptr = malloc(SAMPLE_CSE7759B_OLED_STACK_SIZE);
ASSERT(sample_cse7759b_oled_stack_ptr != NULL);

status = OSATaskCreate(&sample_cse7759b_oled_task_ref, sample_cse7759b_oled_stack_ptr, SAMPLE_CSE7759B_OLED_STACK_SIZE, 100, "cse7759b_oled_task", sample_cse7759b_oled_task, NULL);
ASSERT(status == OS_SUCCESS);

  • sample_uarts_main_uart_recv_cbk

串口回调函数,提供给UART_OPEN 调用。

代码片段:

C
{
uartParam uart_data = {0};
OSA_STATUS osa_status;

// UART_SEND_DATA(recv_data, recv_len);
char *tempbuf = (char *)malloc(recv_len);
memset(tempbuf, 0x0, recv_len);
memcpy(tempbuf, (char *)recv_data, recv_len);
//
// sample_cse7759b_uart_printf("%s[%d]: recv_len:%d", __FUNCTION__, __LINE__, recv_len);
uart_data.data = (UINT8 *)tempbuf;
uart_data.len = recv_len;
uart_data.port = 0;

osa_status = OSAMsgQSend(sample_cse7795b_msgq, sizeof(uartParam), (UINT8*)&uart_data, OSA_NO_SUSPEND);
ASSERT(osa_status == OS_SUCCESS);

  • sample_cse7759b_uart_thread

串口数据接收任务,收到回调函数的消息后,处理消息中的数据。

代码片段:

C
while (1)
{
memset(&uart_data, 0x00, sizeof(uartParam));
status = OSAMsgQRecv(sample_cse7795b_msgq, (UINT8 *)&uart_data, sizeof(uartParam), OSA_SUSPEND); //recv data from uart
if (status == OS_SUCCESS)
{
if (uart_data.data)
{
// for(i = 0; i < uart_data.len; i++)
// {
// sample_cse7759b_uart_printf("%02X", uart_data.data);
// }

if (uart_data.port == 0)
am_ty_sw_deal_uart_data(uart_data.data,uart_data.len);
// UART_SEND_DATA(uart_data.data,uart_data.len);
// else if (uart_data.port == 1)
// UART3_SEND_DATA(uart_data.data,uart_data.len);
// else if (uart_data.port == 2)
// UART4_SEND_DATA(uart_data.data,uart_data.len);

data = lib_get_cse7759b_data();
// sample_cse7759b_uart_printf("%s[%d] V:%dV I:%dA P:%dW Q:%fKwh", __FUNCTION__, __LINE__, data->voltage, data->electricity / 1000, data->power / 1000, data->quantity * 0.001);
// sample_cse7759b_uart_printf("%s[%d] V:%dV I:%dmA P:%dmW Q:%fwh", __FUNCTION__, __LINE__, data->voltage, data->electricity, data->power, data->quantity);

if((data->quantity - q_temp) > 0.000001)
{
eleParam *param = malloc(sizeof(eleParam));
memset(param, 0x0, sizeof(eleParam));
param->voltage = data->voltage;
param->electricity = data->electricity;
param->power = data->power;
param->quantity = data->quantity;

uart_sdata.data = (UINT8 *)param;
uart_sdata.len = sizeof(eleParam);

status = OSAMsgQSend(sample_cse7795b_oled_msgq, sizeof(uartParam), (UINT8*)&uart_sdata, OSA_NO_SUSPEND);
ASSERT(status == OS_SUCCESS);
}

q_temp = data->quantity;

free(uart_data.data);
uart_data.data = NULL;
}
}
}

  • sample_cse7759b_oled_task

OLED任务,显示收到的电压,电流,功率,电量到OLED。

代码片段:

C
while(1)
{
status = OSAMsgQRecv(sample_cse7795b_oled_msgq, (UINT8 *)&uart_data, sizeof(eleParam), OSA_SUSPEND);
if (status == OS_SUCCESS)
{
if (uart_data.data != NULL)
{
eleparam = (eleParam*)uart_data.data;
sample_cse7759b_uart_printf("%s[%d] V:%dV I:%dmA P:%dmW Q:%fwh", __FUNCTION__, __LINE__, eleparam->voltage, eleparam->electricity, eleparam->power, eleparam->quantity);
drv_ssd1315_clear();
//显示汉字
drv_ssd1315_show_chinese(0,0,14,16,1);//
drv_ssd1315_show_chinese(18,0,15,16,1);//
drv_ssd1315_show_chinese(0,16,16,16,1);//
drv_ssd1315_show_chinese(18,16,17,16,1);//
drv_ssd1315_show_chinese(0,32,18,16,1);//
drv_ssd1315_show_chinese(18,32,19,16,1);//
drv_ssd1315_show_chinese(0,48,20,16,1);//
drv_ssd1315_show_chinese(18,48,21,16,1);//

//显示字符,数字
if(eleparam->power > 0)
{
snprintf(vol, SAMPLE_CSE7759B_DISPLAY_BUF_MAX_LEN, ":%dV", eleparam->voltage);
snprintf(curr, SAMPLE_CSE7759B_DISPLAY_BUF_MAX_LEN, ":%dmA", eleparam->electricity);
snprintf(power, SAMPLE_CSE7759B_DISPLAY_BUF_MAX_LEN, ":%dmW", eleparam->power);
snprintf(quant, SAMPLE_CSE7759B_DISPLAY_BUF_MAX_LEN, ":%.3fwH", eleparam->quantity);
drv_ssd1315_show_string(36, 0, (UINT8*)vol, 16, 1);
drv_ssd1315_show_string(36, 16, (UINT8*)curr, 16, 1);
drv_ssd1315_show_string(36, 32, (UINT8*)power, 16 ,1);
drv_ssd1315_show_string(36, 48, (UINT8*)quant, 16, 1);
}
drv_ssd1315_refresh();

free(uart_data.data);
uart_data.data = NULL;
}
}
}

8: 编译

在SDK根目录打开命令行,输入命令.\build.bat -l .\amaziot_bloom_os_sdk\sample\3rd\6.0_CSE7759B\

C++
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\3rd\6.0_CSE7759B\
子目录或文件 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/3rd/6.0_CSE7759B'
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 24 2024\"" -DBUILD_TIME="\"11:24:52\"" -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/3rd/6.0_CSE7759B\am\inc -IF:/3.asr-b/cat.1-asr1606/1.software/BlOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/3rd/6.0_CSE7759B\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/3rd/6.0_CSE7759B/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_ele.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.80064a80.0000cde8.80065000|0000cde8->00003000
|This Is LteOnly 4M|
|RW_CPZ_2|PS_NCAH |7e388000.80071868.00001300.80068000|00001300->00001000
|This Is LteOnly 4M|
|RW_CPZ_3|ITCM |7e3dac00.80072b68.0000f51c.80069000|0000f51c->0000a000
|This Is LteOnly 4M|
|RW_CPZ_4|CODE_PS |7e1aa000.80082084.0002fe38.80073000|0002fe38->0001e000
|This Is LteOnly 4M|
|RW_CPZ_5|CODEPSB |7e1dc000.800b1ebc.000339c0.80091000|000339c0->0001b000
|This Is LteOnly 4M|
|RW_CPZ_6|CODEPSC |7e213000.800e587c.000323ec.800ac000|000323ec->0001b000
|This Is LteOnly 4M|
|RW_CPZ_7|CODEPSD |7e249000.80117c68.00028d88.800c7000|00028d88->0001a000
|This Is LteOnly 4M|
|RW_CPZ_8|CODEPSE |7e277000.801409f0.0002e310.800e1000|0002e310->0001a000
|This Is LteOnly 4M|
|RW_CPZ_9|CODEPSF |7e2a9000.8016ed00.0001c948.800fb000|0001c948->00011000
|This Is LteOnly 4M|
|RW_CPZ_A|CODE_PL |7e2ca000.8018b648.0002fa44.8010c000|0002fa44->0001e000
|This Is LteOnly 4M|
|RW_CPZ_B|CODEPLB |7e2fa000.801bb08c.00039058.8012a000|00039058->00021000
|This Is LteOnly 4M|
|RW_CPZ_C|CODEPLC |7e337000.801f40e4.000268d4.8014b000|000268d4->00011000
|--------|--------|--------.--------.--------.--------|------------------------------|
| | 0x002039b8 -> 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/3rd/6.0_CSE7759B'
"copy NEZHAC_CP_CNR_MIFI_TX.bin to ./ "

已复制 1 个文件。

9: 生成固件

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

10: 测试

测试步骤:

  • 参考编译教程,和文档开头的编译指令,进行编译
  • 按照编译教程选择对应的选项
  • 烧录

11: 固件

上电后,debug串口会打印出计算出的数据;

OLED屏幕会显示参数信息


(如有侵权,联系删除) 

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
0
关闭 站长推荐上一条 /3 下一条