Search found 56 matches

by shiliang
2025年 Jun 26日 17:53
Forum: TuyaOS-Zigbee设备开发
Topic: 【求助】ZS系列SPI使用问题
Replies: 11
Views: 457

Re: 【求助】ZS系列SPI使用问题

可尝试.csControl=spidrvCsControlApplication;

并在传输前后手动控制片选信号:
GPIO PinOutClear(SPI CS PORT,SPI CS PIN);// 拉低CS
SPIDRV MTransmitB(&tSpiDrvHandle,u8TxBuffer,len1);
SPIDRV MTransmitB(&tSpiDrvHandle,u8TxBuffer + len1, len2);
GPIO PinOutSet(SPI CS PORT, SPI CS PIN);

by shiliang
2025年 Jun 26日 16:51
Forum: TuyaOS-Zigbee设备开发
Topic: 【求助】ZS系列SPI使用问题
Replies: 11
Views: 457

Re: 【求助】ZS系列SPI使用问题

可以尝试使用SPIDRV_MTransmitB函数发送,framelength改为16

Code: Select all

// 第一次传输4096字节
result = SPIDRV_MTransmitB(handle, data, 2048);
if (result != ECODE_EMDRV_SPIDRV_OK) {
    return result;
}

// 第二次传输剩余的4096字节
result = SPIDRV_MTransmitB(handle, data + 2048, 2048);
return result;
by shiliang
2025年 Jun 26日 16:32
Forum: TuyaOS-Zigbee设备开发
Topic: 【求助】ZS系列SPI使用问题
Replies: 11
Views: 457

Re: 【求助】ZS系列SPI使用问题

您好! 1、如果采用分包传送(一帧数据分N次发送),测试发现,在调用接口:SPIDRV_MTransmit(&tSpiDrvHandle, u8TxBuffer, u32TxBufferLength, spi_data_send_callback); 发送数据后到发送数据完成,执行回调函数:spi_data_send_callback 中间间隔的时间都是5毫秒以上(使用GPIO翻转电平来测试的间隔时间),这会导致从设备那边接收数据异常。有什么办法可以解决这个回调函数触发的时间吗? 是否可以提供下具体是什么样的异常? 2、这个原厂底层驱动发送buff依赖于DMA buff,默认大小是0x...
by shiliang
2025年 Jun 26日 15:53
Forum: TuyaOS-Zigbee设备开发
Topic: 【求助】ZS系列SPI使用问题
Replies: 11
Views: 457

Re: 【求助】ZS系列SPI使用问题

您好:

当前原厂底层驱动发送buff依赖于DMA buff,默认大小是0x0800,如果需要发送8K数据,是否可以拆分发送。

by shiliang
2025年 Jun 6日 18:42
Forum: TuyaOS-Zigbee Device Development
Topic: Zigbee Fan Switch issue on adding to scene
Replies: 3
Views: 304

Re: Zigbee Fan Switch issue on adding to scene

Can you provide the following information:

  1. Is the firmware currently developed using tuyaOS zigbee sdk?
  2. If it is developed based on tuyaOS zigbee sdk, can you provide the Firmware_Information information in app_config.yaml?
  3. Can you provide the virtual id added to the smart life app?
by shiliang
2025年 Jun 6日 10:34
Forum: TuyaOS-Zigbee设备开发
Topic: 【已解决】ZSU模块工程配置问题
Replies: 34
Views: 21329

Re: 【求助】ZSU模块工程配置问题

此PID首次烧录授权就无法进入产测,比较怀疑程序没有正常初始化,请确认:

代码中初始化函数正常,可尝试屏蔽除必要函数如:
tal_zg_endpoint_register
tal_zg_node_config
tal_zg_join_config
之外的应用层初始化调用。

打开日志打印:
tal_log.h中#define ENABLE_TAL_LOG 1

在tuya_init_first
tuya_init_second
tuya_init_third
tuya_init_last
中分别添加打印信息。

直接使用原厂工具烧录,查看打印信息卡在哪一步。

by shiliang
2025年 Jun 6日 10:04
Forum: TuyaOS-Zigbee设备开发
Topic: 【已解决】ZSU模块工程配置问题
Replies: 34
Views: 21329

Re: 【求助】ZSU模块工程配置问题

manufacture_name: "_TZ32901000000_key7cqf4" # capacity+pid
如果你的pid是gshggehs
更改为:

manufacture_name: "_TZ32901000000_gshggehs" # capacity+pid

by shiliang
2025年 Jun 6日 09:37
Forum: TuyaOS-Zigbee设备开发
Topic: 【已解决】ZSU模块工程配置问题
Replies: 34
Views: 21329

Re: 【求助】ZSU模块工程配置问题

可以尝试下把模组的rst接到串口工具的rst云模组烧录一次

by shiliang
2025年 Jun 5日 11:18
Forum: TuyaOS-Zigbee设备开发
Topic: 【已解决】ZSU模块工程配置问题
Replies: 34
Views: 21329

Re: 【求助】ZSU模块工程配置问题

尝试使用pid多次烧录授权或者使用原厂工具烧录都正常,重启后也能正常识别烧录:
Image

Image

by shiliang
2025年 Jun 5日 10:23
Forum: TuyaOS-Zigbee设备开发
Topic: 【已解决】ZSU模块工程配置问题
Replies: 34
Views: 21329

Re: 【求助】ZSU模块工程配置问题

是否能提供PID信息,我们这边试一下