首页
开源
资讯
活动
开源许可证
软件工程云服务
软件代码质量检测云服务
持续集成与部署云服务
社区个性化内容推荐服务
贡献审阅人推荐服务
群体化学习服务
重睛鸟代码扫描工具
登录
注册
代码拉取完成,页面将自动刷新
Watch
1
Star
1
Fork
1
Telink Semiconductor
/
tl_platform_sdk
Fork 仓库
加载中
取消
确认
代码
Issues
0
Pull Requests
0
Wiki
0
统计
发行版
最新版
V3.3.2
667edaa
2024-12-31 17:51
对比
Release V3.3.2
mwchen
## V3.3.2 ### Version * SDK version: tl_platform_sdk V3.3.2 * This version of the SDK supports TLSR921x/TLSR951x(B91)(A0/A1/A2),TLSR922x/TLSR952x(B92)(A3/A4),TL721X(A2),TL321X(A0) chips. * Hardware EVK Version * TLSR951x(B91): C1T213A20 * TLSR952x(B92): C1T266A20 * TL721X: C1T315A20 * TL321X: C1T335A20 * Toolchain version - TLSR921x/TLSR951x(B91): gcc7(TL32 ELF MCULIB V5F GCC7.4 (riscv32-elf-gcc)) - TLSR922x/TLSR952x(B92): gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL721x: gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL321x: gcc12(TL32 ELF MCULIB V5 GCC12.2 (riscv32-elf-gcc)) ### Bug Fixes * **rf** * (B92)Fixed the configuration error of the rf_rx_fast_settle_dis interface.(merge_requests/@1493) ### Features * N/A ### Refactoring * N/A ### BREAKING CHANGES * N/A ### Performance Improvements * N/A ### 版本 * SDK版本: tl_platform_sdk V3.3.2 * 此版本SDK支持 TLSR921x/TLSR951x(B91)(A0/A1/A2),TLSR922x/TLSR952x(B92)(A3/A4),TL721X(A2),TL321X(A0) 芯片。 * 硬件评估板版本 * TLSR951x(B91): C1T213A20 * TLSR952x(B92): C1T266A20 * TL721X: C1T315A20 * TL321X: C1T335A20 * 工具链版本 - TLSR921x/TLSR951x(B91): gcc7(TL32 ELF MCULIB V5F GCC7.4 (riscv32-elf-gcc)) - TLSR922x/TLSR952x(B92): gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL721x: gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL321x: gcc12(TL32 ELF MCULIB V5 GCC12.2 (riscv32-elf-gcc)) ### Bug Fixes * **rf** * (B92)修复rf_rx_fast_settle_dis接口配置错误。(merge_requests/@1493) ### Features * N/A ### Refactoring * N/A ### BREAKING CHANGES * N/A ### Performance Improvements * N/A
最后提交信息为:
feat(all):release driver sdk v3.3.2
V3.3.1
ecb3917
2024-12-31 15:26
对比
Release V3.3.1
mwchen
## V3.3.1 ### Version * SDK version: tl_platform_sdk V3.3.1 * This version of the SDK supports TLSR921x/TLSR951x(B91)(A0/A1/A2),TLSR922x/TLSR952x(B92)(A3/A4),TL721X(A2),TL321X(A0) chips. * Hardware EVK Version * TLSR951x(B91): C1T213A20 * TLSR952x(B92): C1T266A20 * TL721X: C1T315A20 * TL321X: C1T335A20 * Toolchain version - TLSR921x/TLSR951x(B91): gcc7(TL32 ELF MCULIB V5F GCC7.4 (riscv32-elf-gcc)) - TLSR922x/TLSR952x(B92): gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL721x: gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL321x: gcc12(TL32 ELF MCULIB V5 GCC12.2 (riscv32-elf-gcc)) ### Bug Fixes * N/A ### Features * N/A ### Refactoring * **code format** * (B91/B92/TL321X/TL721x)For the sake of consistency in the code style of the company's projects, all .c and .h code is formatted uniformly, except for the 3rd-patry directory.(merge_requests/@1487) ### BREAKING CHANGES * N/A ### Performance Improvements * N/A ### 版本 * SDK版本: tl_platform_sdk V3.3.1 * 此版本SDK支持 TLSR921x/TLSR951x(B91)(A0/A1/A2),TLSR922x/TLSR952x(B92)(A3/A4),TL721X(A2),TL321X(A0) 芯片。 * 硬件评估板版本 * TLSR951x(B91): C1T213A20 * TLSR952x(B92): C1T266A20 * TL721X: C1T315A20 * TL321X: C1T335A20 * 工具链版本 - TLSR921x/TLSR951x(B91): gcc7(TL32 ELF MCULIB V5F GCC7.4 (riscv32-elf-gcc)) - TLSR922x/TLSR952x(B92): gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL721x: gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL321x: gcc12(TL32 ELF MCULIB V5 GCC12.2 (riscv32-elf-gcc)) ### Bug Fixes * N/A ### Features * N/A ### Refactoring * **code format** * (B91/B92/TL321X/TL721x)为了公司项目代码风格保持一致,除 3rd-patry 目录外,将所有 .c 和 .h 代码统一格式化.(merge_requests/@1487) ### BREAKING CHANGES * N/A ### Performance Improvements * N/A
最后提交信息为:
feat(all):release driver sdk v3.3.1
V3.3.0
c93c84c
2024-12-27 19:52
对比
Release V3.3.0
mwchen
## V3.3.0 ### Version * SDK version: tl_platform_sdk V3.3.0 * This version of the SDK supports TLSR921x/TLSR951x(B91)(A0/A1/A2),TLSR922x/TLSR952x(B92)(A3/A4),TL721X(A2),TL321X(A0) chips. * Hardware EVK Version * TLSR951x(B91): C1T213A20 * TLSR952x(B92): C1T266A20 * TL721X: C1T315A20 * TL321X: C1T335A20 * Toolchain version - TLSR921x/TLSR951x(B91): gcc7(TL32 ELF MCULIB V5F GCC7.4 (riscv32-elf-gcc)) - TLSR922x/TLSR952x(B92): gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL721x: gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL321x: gcc12(TL32 ELF MCULIB V5 GCC12.2 (riscv32-elf-gcc)) ### Bug Fixes * **aes** * (B91/B92)Solved the problem that the aes modified the e0 address pointer, causing the BT communication to be abnormal.(merge_requests/@1273) * **pm** * (TL721X)Solves an issue where users cannot sleep and wake up normally when all interrupt priorities such as PM are initialized to 0 during initialization.(merge_requests/@1332) * (TL321x)Solved the issue of possible SRAM loss when entering suspend sleep after deep retention sleep. (merge_requests/@1480) * **sys** * (TL721X)The problem of frequency deviation caused by too short reservation of crystal starting time is solved.(merge_requests/@1332) * **ske** * (TL321X/TL721x)Addressed the issue where the software did not check the busy signal bit before writing to the SKE register, leading to data errors caused by repeated software triggering of calculations before the SKE computation was complete.(merge_requests/@1331, merge_requests/@1340) * **audio** * (B91)Fixed the problem that i2s pin input function could not be used because gpio_shutdown(GPIO_ALL) was called during initialization.(merge_requests/@1351) * (TL721x/TL321x)Fix BUFFER_TO_LINEOUT demo waveform distortion issue.(merge_requests/@1472) * **rf** * (B91/B92)Fixed an issue where incorrect configuration during the enable and disable of fast settle caused the settle process to deviate from the expected behavior, potentially leading to a degradation in RF performance.(merge_requests/@1354) * **adc** * (TL721x)1.A2 test PB0 PD1 PD2 three pins capture voltage performance slightly worse than other pins, so remove. 2.Test found that enabling dwa affects adc performance so don't use this feature. 3.pre_scale = 1/4 Fixed on A2, already open.(merge_requests/@1428,merge_requests/@1445) * **clock** * (B91/B92)Fixed PLL crash caused by failure to vibrate. If the PLL starts abnormally, restart it. Use PM_ANA_REG_POWER_ON_CLR_BUF0[bit3-6] to check whether the reset caused by abnormal PLL starts occurs. Use drv_get_error_code to query the exception source. Note that the exception source is lost after each reset. You need to read and save the error source at the application layer in advance.(merge_requests/@1268)(merge_requests/@1438) * **sys** * (tl721x)The problem is solved because the efuse load is not completed, which leads to the instability of ram limit and the error of program handling.(merge_requests/@1454) * **spi** * (B91/B92/TL721x/TL321x)Fix spi_master_write_read_full_duplex function exception issue. (merge_requests/@1465) ### Features * **pm** * (TL721x)Add pm_set_dvdd function to support core and sram voltage adjustment.(merge_requests/@1276) * **pke** * (TL721x)Add ed25519 algorithm driver and demo.(merge_requests/@1289) * **audio** * (TL721x)Add TL721x audio dmic to i2s case.(merge_requests/@1345) * (B91)Added audio i2sin to i2sout case.(merge_requests/@1351) * (TL721x)Add audio_reset_audio_clk interface to change codec clk.(merge_requests/@1418) * (TL321x) Add audio driver and demo.(merge_requests/@1367) * (TL721x/TL321x) Add spi_txdma_req_after_cmd_en,spi_txdma_req_after_cmd_dis interface.(merge_requests/@1472)。 * **hash** * (TL321x)Add HASH_Demo_v1.1.8 for TL321x.(merge_requests/@1349) * **pke** * (TL321x)Add ed25519 and c25519 algorithm and PKE_Demo_v1.1.8 for TL321x.(merge_requests/@1340, merge_requests/@1349) * **ske** * (TL321x)Update v1.1.9 for SKE_Demo.(merge_requests/@1364) * (TL721x)SKE_Demo is changed to v1.1.9.(merge_requests/@1364) * **rf** * (B91/B92/TL7518)Added "rf_set_tx_wait_time" and "rf_set_rx_wait_time" interfaces to configure tx wait time and rx wait time.(merge_requests/@1403) * (B91/B92/TL721x/TL321x) Adapted the fast settle mode switching feature, added the following interfaces: rf_tx_fast_settle_get_cal_val, rf_tx_fast_settle_set_cal_val, rf_rx_fast_settle_get_cal_val, and rf_rx_fast_settle_set_cal_val. Removed the global variable g_fast_settle_cal_val and introduced the global pointer variable g_fast_settle_cal_val_ptr.(merge_requests/@1416)(merge_requests/@1432)(merge_requests/@1439) * (TL321X) Enable software dcoc and add rf_set_rx_dcoc_cali_by_sw interfaces for customers to control the software dcoc on/off.(merge_requests/@1435) * (TL721X/TL321X) Add interfaces "rf_dma_chn_en" and "rf_dma_chn_dis"(merge_requests/@1483) * **pke** * (TL721x)Add x25519 algorithm driver and demo.(merge_requests/@1421) * **lpc** * (TL721X/TL321X) Add lpc driver and demo.(merge_requests/@1279) * **adc** * (TL321x/TL721x)Add the ADC_GPIO_SAMPLE_VBAT mode to indirectly sample vbat voltage through gpio.(merge_requests/@1445) * **calibration** * (TL721x) Add interface user_check_ieee_addr() to check the legitimacy of ieee address, interface user_get_otp_ieee_addr() to get the ieee address in otp, and interface user_get_ieee_addr() to get the address in flash or otp, calibration_func() add read ieee address in flash or otp function.(merge_requests/@1440) * **otp** * (TL721x)Add the interface otp_get_ieee_addr().(merge_requests/@1440) * **DUT_Demo** * (B92)Add DUT_Demo and users can develop fixture test programs according to their own needs.(merge_requests/@1384) * **EMI_BQB_DEMO** * (B91/B92/TL721x/TL321x) Adapted the fast settle mode switching feature.(merge_requests/@1416)(merge_requests/@1432)(merge_requests/@1439) * **RF_DEMO** * (B91/B92/TL721x/TL321x) Adapted the fast settle mode switching feature.(merge_requests/@1416)(merge_requests/@1432)(merge_requests/@1439) ### Refactoring * **usb** * (B91/B92/TL721X/TL321X)Add enum type-casting to GPIO pin in usb_set_pin() to prevent compilation errors.(merge_requests/@1321) * (B91) tinyusb port file add parameter checking.(merge_requests/@1472) * **uart** * (B92)uart_get_dma_rev_data_len: Optimize the interface logic to return the dma-configured receive length when the transmit length is greater than the receive length. (merge_requests/@1338) * **adc** * (TL721X/TL321X)Revert adc_input_pin_e to adc_input_pin_def_e for compatibility with B92.(merge_requests/@1339) * **plic** * (B91/B92/TL721x/TL321x)Remove the clock_32k_init and calibration interfaces from the mtime_clk_init interface and put them in the demo to be called as needed.(merge_requests/@1394) * **rf** * (TL721X/TL321X)Optimized the interfaces of "rf_set_tx_wait_time" and "rf_set_rx_wait_time" and updated relevant comments.(merge_requests/@1403) * (B91/B92/TL721x/TL321x) Adapted the fast settle mode switching feature and updated the following interfaces: rf_set_chn, rf_rx_fast_settle_update_cal_val, rf_tx_fast_settle_update_cal_val and rf_set_rccal_cal_val(Excluding B91/B92).(merge_requests/@1416)(merge_requests/@1432)(merge_requests/@1439) * **audio** * (TL721x)Adjust the audio sample rate arrays and enum, remove 8.02k sample rate.(merge_requests/@1415) * (TL721X)Modify reg_fifo_th_irq register bit comments.(merge_requests/@1401) * **adc** * (TL721x)According to ATE Big Data, ADC_GPIO_VREF_DEFAULT_VALUE was changed from 1175 to 1220, ADC_GPIO_VREF_OFFSET_DEFAULT_VALUE was changed from 0 to 8, ADC_VBAT_VREF_DEFAULT_VALUE was changed from 1175 to 1220. ADC_VBAT_VREF_OFFSET_DEFAULT_VALUE was changed from 0 to 15 to be more in line with most chips.(merge_requests/@1445) * (TL321x)According to ATE Big Data, ADC_GPIO_VREF_DEFAULT_VALUE was changed from 1175 to 1202, ADC_GPIO_VREF_OFFSET_DEFAULT_VALUE was changed from 0 to 7, ADC_VBAT_VREF_DEFAULT_VALUE was changed from 1175 to 1207. ADC_VBAT_VREF_OFFSET_DEFAULT_VALUE was changed from 0 to -7, which is more in line with most chips.(merge_requests/@1445) * **pke** * (TL321X)Remove duplicate declarations, delete the pke_utility.h file.(merge_requests/@1444) * **lib** * (B92)The file analog.c and the interface sys_set_dcdc_1pP4_ldo_2p0() are encapsulated into library files.(merge_requests/@1195,merge_requests/@1268) * **gpio** * (B91/B92/TL721x/TL321x)add comments: Do not recommended that two or more GPIOs be set to the same interrupt source, as the interrupt is uncertain if triggered at the same time.(merge_requests/@1470) ### BREAKING CHANGES * **uart** * (TL721x/TL321x)uart_set_rx_timeout: For compatibility, change it to uart_set_rx_timeout_with_exp.(merge_requests/@1338) * **audio** * (TL721X)Adjusted the parameter's position of audio_rx_dma_chain_init and audio_tx_dma_chain_init to make their function prototypes consistent with other chips.(merge_requests/@1342) * (B91)Fixed i2s pin definition in audio_i2s_set_pin interface. Swapped adc_dat and dac_dat, adc_lr and dac_lr.(merge_requests/@1351) * (TL721X)Change the name of the audio_i2s_set_mclk interface to audio_set_codec_clk_as_mclk, and the name of the audio_aclk_debug_set_mclk interface to audio_set_debug_clk_as_mclk, and add the following function to gpio_func_e function in gpio_func_e.(merge_requests/@1401) * **spi** * (TL321x)gspi_cs_pin_en: Interface formal parameter type changed from gpio_pin_e to gpio_func_pin_e.(merge_requests/@1320) * (TL321x)In order to keep the value of GSPI_MODULE in enumeration variable spi_sel_e consistent with other chips, GSPI_MODULE=0 is modified to GSPI_MODULE=1, involving the interface as follows:spi_hw_fsm_reset/spi_set_error_timeout/ spi_get_error_timeout_code/gspi_timeout_handler/spi_master_send_cmd/spi_write/spi_read/spi_master_write/spi_master_write_read/spi_master_write_plus/spi_master_write_repeat/spi_master_write_repeat_plus/spi_master_read_plus/spi_master_write_read_plus.(merge_requests/@1355) * **rf** * (TL721X):In order to fix the issue of TX drift failure in 2M mode under high TX power, increase the preamble length of 2M mode to 7 bytes.(merge_requests/@1431) * **sys** * (TL721x/TL321x)In the new version, after calling sys_init(), if you want to get the value of g_pm_status_info.mcu_status or call pm_get_reboot_event() to get related information, you won't be able to. The application layer needs to call pm_update_status_info() to obtain it. The new usage method is as follows:After calling sys_init(), call pm_update_status_info(), and you can get the value of g_pm_status_info.mcu_status. Additionally, the reboot classifications have been changed as follows:1.Two new statuses have been added to g_pm_status_info.mcu_status: MCU_HW_REBOOT_TIMER_WATCHDOG and MCU_HW_REBOOT_32K_WATCHDOG.2.The meaning of MCU_STATUS_REBOOT_BACK has changed. Previously, it included both software reboots and watchdog reboots. In the new version, MCU_STATUS_REBOOT_BACK only represents software reboots. The functions pm_get_reboot_event() and pm_get_deep_retention_flag() have been removed.(merge_requests/@1268) * **adc** * (TL721x)The A2 chip changes the adc reference voltage 0p9 to 1p2 for gpio sampling, so the enumeration name is changed: ADC_VREF_0P9V->ADC_VREF_GPIO_1P2V,ADC_VREF_1P2V->ADC_VREF_VBAT_1P2V.(merge_requests/@1445) * (TL721x)A2 chip multi-channel sampling has the problem of inter-channel interference, so this function is not open to the public.(merge_requests/@1445) ### Performance Improvements * **rf** * (TL321X)Modify the rf_set_xx_xx_mode() function configuration to improve the bandage performance of 2M phy mode.(merge_requests/@1296) * (TL721X)Modify the configuration of the rf_mode_init() function to improve the performance of fdev.(merge_requests/@1326) ### 版本 * SDK版本: tl_platform_sdk V3.3.0 * 此版本SDK支持 TLSR921x/TLSR951x(B91)(A0/A1/A2),TLSR922x/TLSR952x(B92)(A3/A4),TL721X(A2),TL321X(A0) 芯片。 * 硬件评估板版本 * TLSR951x(B91): C1T213A20 * TLSR952x(B92): C1T266A20 * TL721X: C1T315A20 * TL321X: C1T335A20 * 工具链版本 - TLSR921x/TLSR951x(B91): gcc7(TL32 ELF MCULIB V5F GCC7.4 (riscv32-elf-gcc)) - TLSR922x/TLSR952x(B92): gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL721x: gcc12(TL32 ELF MCULIB V5F GCC12.2 (riscv32-elf-gcc)) - TL321x: gcc12(TL32 ELF MCULIB V5 GCC12.2 (riscv32-elf-gcc)) ### Bug Fixes * **aes** * (B91/B92)解决了因为aes修改了e0的地址指针,导致BT通信异常的问题。(merge_requests/@1273) * **pm** * (TL721X)解决了当用户在初始化中,把PM等所有中断优先级初始化成0时,不能正常睡眠唤醒的问题。(merge_requests/@1332) * (TL321x)解决了deep retention模式唤醒后再进入suspend模式可能造成的RAM未完全保持问题。 (merge_requests/@1480) * **sys** * (TL721X)解决了因为晶体起振时间预留太短导致的频偏问题。(merge_requests/@1332) * **ske** * (TL321X/TL721x)解决了ske在写寄存器之前没有查看busy信号位,导致的ske计算还未完成时软件重复触发计算从而数据出错的问题。(merge_requests/@1331, merge_requests/@1340) * **audio** * (B91)修复了初始化调用gpio_shutdown(GPIO_ALL)后,i2s pin输入功能无法使用问题。(merge_requests/@1351) * (TL721x/TL321x)修复 BUFFER_TO_LINEOUT demo 波形失真的问题。(merge_requests/@1472) * **rf** * (B91/B92)修复了由于fast settle使能和退出时的错误配置,导致settle过程与预期不符,从而可能引发RF性能下降的问题。(merge_requests/@1354) * **adc** * (TL721x)1.A2测试PB0 PD1 PD2三引脚采集电压性能略差于其他引脚,因此删除。2.测试发现使能dwa影响adc性能,所以不使用此特性。3.pre_scale = 1/4 在A2 上修复,已开放。(merge_requests/@1428,merge_requests/@1445) * **clock** * (B91/B92)解决PLL起振失败导致死机的问题。 PLL起振异常则重启,占用PM_ANA_REG_POWER_ON_CLR_BUF0[bit3-6]查询是否发生过PLL起振异常等导致的复位。通过接口drv_get_error_code查询异常来源,注意异常来源每次复位后会丢失,需要应用层提前读取保存。(merge_requests/@1268)(merge_requests/@1438) * **sys** * (tl721x)解决了因为efuse load未完成,导致ram限制不稳定,程序搬运出错,导致的死机隐患。(merge_requests/@1454) * **spi** * (B91/B92/TL721x/TL321x)修复spi_master_write_read_full_duplex功能异常问题。 (merge_requests/@1465) ### Features * **pm** * (TL721x)添加pm_set_dvdd接口以支持CORE和SRAM电压调节。(merge_requests/@1276) * **pke** * (TL721x)添加ed25519算法驱动和demo。(merge_requests/@1289) * **audio** * (TL721x)增加了TL721x audio dmic in i2s out的case。(merge_requests/@1345) * (B91)新增了audio i2sin to i2sout的用例。(merge_requests/@1351) * (TL721x)增加了audio_reset_audio_clk接口,用于改变codec的时钟。(merge_requests/@1418) * (TL321x) 添加audio相关驱动和demo.(merge_requests/@1367)。 * (TL721x/TL321x) 添加spi_txdma_req_after_cmd_en,spi_txdma_req_after_cmd_dis接口。(merge_requests/@1472)。 * **hash** * (TL321x)添加HASH_Demo_v1.1.8。(merge_requests/@1349) * **pke** * (TL321x)添加ed25519和c25519算法驱动以及PKE_Demo_v1.1.8。(merge_requests/@1340, merge_requests/@1349) * **ske** * (TL321x)更新v1.1.9 SKE_Demo.(merge_requests/@1364) * (TL721x)将SKE_Demo更新到v1.1.9.(merge_requests/@1364) * **rf** * (B91/B92/TL7518)增加了"rf_set_tx_wait_time" 和"rf_set_rx_wait_time"接口配置tx wait时间和rx wait时间(merge_requests/@1403) * (B91/B92/TL721x/TL321x)适配fast settle模式切换功能,新增接口rf_tx_fast_settle_get_cal_val、rf_tx_fast_settle_set_cal_val、rf_rx_fast_settle_get_cal_val、rf_rx_fast_settle_set_cal_val;删除全局变量g_fast_settle_cal_val,新增全局指针变量g_fast_settle_cal_val_ptr。(merge_requests/@1416)(merge_requests/@1432)(merge_requests/@1439) * (TL321X)使能软件dcoc并添加rf_set_rx_dcoc_cali_by_sw接口供客户控制软件dcoc开关。(merge_requests/@1435) * (TL721X/TL321X)增加了"rf_dma_chn_en" 和 "rf_dma_chn_dis"接口(merge_requests/@1483) * **pke** * (TL721x)添加ed25519算法驱动和demo。(merge_requests/@1421) * **lpc** * (TL721X/TL321X) 添加LPC相关驱动和demo。(merge_requests/@1279) * **adc** * (TL321x/TL721x)增加ADC_GPIO_SAMPLE_VBAT模式通过gpio间接采样vbat电压。(merge_requests/@1445) * **calibration** * (TL721x)添加检查ieee地址合法性接口user_check_ieee_addr(),获取otp中的ieee地址接口user_get_otp_ieee_addr()和获取flash或otp地址的接口user_get_ieee_addr(),calibration_func()添加读flash或otp中ieee地址功能。(merge_requests/@1440) * **otp** * (TL721x)添加接口otp_get_ieee_addr()。(merge_requests/@1440) * **DUT_Demo** * (B92)新增DUT_Demo并且用户可根据自身需要开发夹具测试程序。(merge_requests/@1384) * **EMI_BQB_DEMO** * (B91/B92/TL721x/TL321x)fast settle 适配模式切换功能。(merge_requests/@1416)(merge_requests/@1432)(merge_requests/@1439) * **RF_DEMO** * (B91/B92/TL721x/TL321x)fast settle 适配模式切换功能。(merge_requests/@1416)(merge_requests/@1432)(merge_requests/@1439) ### Refactoring * **usb** * (B91/B92/TL721X/TL321X)在usb_set_pin()中增加GPIO pin的枚举类型转换防止编译报错。(merge_requests/@1321) * (B91) tinyusb 移植文件添加参数检查。(merge_requests/@1472) * **uart** * (B92)uart_get_dma_rev_data_len: 优化接口逻辑,当发送长度大于接收长度时,则返回dma配置的接受长度。(merge_requests/@1338) * **adc** * (TL721X/TL321X)将 adc_input_pin_e 恢复为 adc_input_pin_def_e,以便与 B92 兼容。(merge_requests/@1339) * **plic** * (B91/B92/TL721x/TL321x)将mtime_clk_init接口中的clock_32k_init和clock_cal接口移除,放到demo按需要调用。(merge_requests/@1394) * **rf** * (TL721X/TL321X)优化了"rf_set_tx_wait_time"和"rf_set_rx_wait_time"接口并更新了相关注释(merge_requests/@1403) * (B91/B92/TL721x/TL321x)适配fast settle模式切换功能,更新接口rf_set_chn、rf_rx_fast_settle_update_cal_val、rf_tx_fast_settle_update_cal_val、rf_set_rccal_cal_val(B91/TLSR922x/TLSR952x除外)。(merge_requests/@1416)(merge_requests/@1432)(merge_requests/@1439) * **audio** * (TL721x)调整audio采样率数组和枚举,删除了8.02k采样率。(merge_requests/@1415) * (TL721X)修改reg_fifo_th_irq寄存器bit位注释。(merge_requests/@1401) * **adc** * (TL721x)根据ATE大数据统计,ADC_GPIO_VREF_DEFAULT_VALUE由1175改为1220,ADC_GPIO_VREF_OFFSET_DEFAULT_VALUE由0改为8,ADC_VBAT_VREF_DEFAULT_VALUE由1175改为1220,ADC_VBAT_VREF_OFFSET_DEFAULT_VALUE由0改为15,更符合大多数芯片的要求。(merge_requests/@1445) * (TL321x)根据ATE大数据统计,ADC_GPIO_VREF_DEFAULT_VALUE由1175改为1202,ADC_GPIO_VREF_OFFSET_DEFAULT_VALUE由0改为7,ADC_VBAT_VREF_DEFAULT_VALUE由1175改为1207,ADC_VBAT_VREF_OFFSET_DEFAULT_VALUE由0改为-7,更符合大多数芯片的要求。(merge_requests/@1445) * **pke** * (TL321X)去掉重复的声明,删掉pke_utility.h文件。(merge_requests/@1444) * **lib** * (B92)文件analog.c和接口sys_set_dcdc_1pP4_ldo_2p0()封装成库文件。(merge_requests/@1195,merge_requests/@1268) * **gpio** * (B91/B92/TL721x/TL321x)添加注释: 不推荐两个或多个GPIO设置成同一种中断源,如果同时触发了中断,中断的情况是不确定的。(merge_requests/@1470) ### BREAKING CHANGES * **uart** * (TL721x/TL321x)uart_set_rx_timeout: 为了兼容,将其改为uart_set_rx_timeout_with_exp。(merge_requests/@1338) * **audio** * (TL721X)调整了audio_rx_dma_chain_init和audio_tx_dma_chain_init的参数位置,使其函数原型与其他芯片一致。(merge_requests/@1342) * (B91)在audio_i2s_set_pin接口中,修正了i2s pin定义,互换了adc_dat和dac_dat,adc_lr和dac_lr。(merge_requests/@1351) * (TL721X)将audio_i2s_set_mclk接口名称修改为audio_set_codec_clk_as_mclk,将audio_aclk_debug_set_mclk接口名称修改为audio_set_debug_clk_as_mclk, 并在gpio_func_e添加相应的function 。(merge_requests/@1401) * **spi** * (TL321x)gspi_cs_pin_en: 接口形参类型修改,从gpio_pin_e类型修改为gpio_func_pin_e类型 。(merge_requests/@1320) * (TL321x) 为了枚举变量spi_sel_e中 GSPI_MODULE的和其他芯片保持一致,将GSPI_MODULE=0修改成GSPI_MODULE=1,相应的修改涉及如下接口:spi_hw_fsm_reset/spi_set_error_timeout/spi_get_error_timeout_code/gspi_timeout_handler/spi_master_send_cmd/spi_write/spi_read/spi_master_write/spi_master_write_read/spi_master_write_plus/spi_master_write_repeat/spi_master_write_repeat_plus/ spi_master_read_plus/spi_master_write_read_plus。(merge_requests/@1355) * **rf** * (TL721X):为修复高 tx power下 2M 模式 tx drift 测试failed 问题,将2M模式的preamble length增加到7byte(merge_requests/@1431) * **sys** * (TL721x/TL321x)新的版本调用sys_init()之后,如果想要获取g_pm_status_info.mcu_status的值,或者调用pm_get_reboot_event()获取相关信息,获取不到了。需要应用层自己调用pm_update_status_info()获取。新的使用方法如下:调用sys_init()后再调用pm_update_status_info(),即可获得g_pm_status_info.mcu_status的值。同时,之前的reboot分类也做了如下变更:1.g_pm_status_info.mcu_status新增两个状态:MCU_HW_REBOOT_TIMER_WATCHDOG 、MCU_HW_REBOOT_32K_WATCHDOG2.MCU_STATUS_REBOOT_BACK的含义和以前不一样了,以前是包含软件重启和watchdog重启。现在的版本MCU_STATUS_REBOOT_BACK仅仅代表软件重启。删除了pm_get_reboot_event()/pm_get_deep_retention_flag()函数。(merge_requests/@1268) * **adc** * (TL721x)A2芯片将adc的参考电压0p9档位修改为专供gpio采样使用的1p2档位,所以将枚举名进行修改:ADC_VREF_0P9V->ADC_VREF_GPIO_1P2V,ADC_VREF_1P2V->ADC_VREF_VBAT_1P2V。(merge_requests/@1445) * (TL721x)A2芯片多通道采样存在通道间干扰的问题,所以不对外开放此功能(merge_requests/@1445) ### Performance Improvements * **rf** * (TL321X)修改rf_set_xx_xx_mode()函数的配置以提升2M phy下模式的bandage性能。(merge_requests/@1296) * (TL721x)修改 rf_mode_init()函数的配置,以提高 fdev 的性能。(merge_requests/@1326)
最后提交信息为:
feat(tl721x):modify plic_sw_reg.h
V3.2.0
a22b10e
2024-09-20 18:37
对比
Release V3.2.0
mwchen
## V3.2.0 ### Version * SDK version: tl_platform_sdk V3.2.0 * Chip version * TLSR921x/TLSR951x(B91) (A0/A1/A2), TLSR922x/TLSR952x(B92) (A3/A4), TL721X (A1), TL321X (A1) * Hardware EVK Version * TLSR951x(B91): C1T213A20 * TLSR952x(B92): C1T266A20 * TL721X: C1T315A20 * TL321X: C1T335A20 * Toolchain version - TLSR921x/TLSR951x(B91): TL32 ELF MCULIB V5F GCC7.4 (IDE: [TelinkIoTStudio_V2024.8](https://wiki.telink-semi.cn/wiki/IDE-and-Tools/Telink_IoT_Studio/)) - TLSR922x/TLSR952x(B92): TL32 ELF MCULIB V5F GCC12.2 (IDE: [TelinkIoTStudio_V2024.8](https://wiki.telink-semi.cn/wiki/IDE-and-Tools/Telink_IoT_Studio/)) - TL721x: TL32 ELF MCULIB V5F GCC12.2 (IDE: [TelinkIoTStudio_V2024.8](https://wiki.telink-semi.cn/wiki/IDE-and-Tools/Telink_IoT_Studio/)) - TL321x: TL32 ELF MCULIB V5 GCC12.2 (IDE: [TelinkIoTStudio_V2024.8](https://wiki.telink-semi.cn/wiki/IDE-and-Tools/Telink_IoT_Studio/)) ### Note * (B92/TL721x/TL321x) Update toolchains from V5.3.0 to V5.3.x * (B91/B92/TL721X/TL321X) Add usb_set_pin() interface, in USB application can choose to enable or disable dp_through_swire function, for compatibility usb_set_pin_en() is defined as usb_set_pin(1) and comments were added to cstartup.S. ### BREAKING CHANGES * **sys** * (TL321X)Add power_mode parameter into sys_init(A0 version only support LDO, A1 version support both LDO and DCDC_LDO) and update sys_init to adapt the chip A1 version. * (TL721x/TL321x)In the new version, after calling sys_init(), if you want to get the value of g_pm_status_info.mcu_status or call pm_get_reboot_event() to get related information, you won't be able to. The application layer needs to call pm_update_status_info() to obtain it. The new usage method is as follows:After calling sys_init(), call pm_update_status_info(), and you can get the value of g_pm_status_info.mcu_status and call pm_get_sw_reboot_event to check the reason for the software reboot.Additionally, the reboot classifications have been changed as follows:1.Two new statuses have been added to g_pm_status_info.mcu_status: MCU_HW_REBOOT_TIMER_WATCHDOG and MCU_HW_REBOOT_32K_WATCHDOG.2.The meaning of MCU_STATUS_REBOOT_BACK has changed. Previously, it included both software reboots and watchdog reboots. In the new version, MCU_STATUS_REBOOT_BACK only represents software reboots. If you want to know the specific reason for a software reboot, you can call pm_get_sw_reboot_event to check. The functions pm_get_reboot_event() and pm_get_deep_retention_flag() have been removed. * (TL721x/TL321x)Previously, the reasons for software reboots could coexist in multiple situations. To save register bits for future expansion, the new version only saves the reason for the most recent software reboot. Therefore, if you want to save all software reboot reasons, the upper application needs to save them after each initialization to prevent losing the history of reboot reasons. * (TL721x/TL321x)Function name changes:sys_set_power_mode -> pm_set_power_mode, sys_set_vbat_type -> pm_set_vbat_type. * **dma** * (B92/TL321x/TL721x) Change the interface for setting the interrupt mode of linked list DMA from dma_set_llp_int_mode to dma_set_llp_irq_mode, and unify the enumeration type of the interrupt mode to dma_llp_irq_mode_e. * **audio** * (B92) Change audio_set_i2s_align_en,audio_set_i2s_align_dis interface name to audio_i2s_align_en,audio_i2s_align_dis. * **emi** * (B91/B92/TL721X/TL321X)Modify the emi. c rf_comtinue_made_run interface to add configurable packet data types and adjust the correspondence between command values and data types from (0: pbrs9 1: 0xf0 2:0x55) to (0: pbrs9 1: 0x0f 2:0x55 3: 0xaa 4:0xf0 5:0x00 6:0xff) * (B91/B92/TL721X/TL321X)Renaming the original supported mode of the rf_mode parameter of the functions rf_emi_tx_continue_update_data rf_emi_rx_setup rf_emi_tx_burst_loop and rf_emi_tx_burst_setup RF_MODE_BLE_2M to RF_MODE_BLE_2M_NO_PN (the new name is closer to its mode) * **adc** * (TL721x/TL321x)ADC DMA mode is optimized from round-robin mode to DMA interrupt mode to read data, which improves the efficiency of code running, and at the same time rename adc_get_sample_status_dma()/adc_clr_sample_status_dma()/adc_set_dma_trig_num() to adc_get_irq_status_dma()/adc_clr _irq_status_dma()/adc_set_rx_fifo_trig_cnt(), deleted adc_get_code_dma(). ### Features * **flash** * (TL321x)add new flash P25Q40SU/P25Q16SU. * **Secure_Boot_Demo** * (TL721x/TL321x) Add Secure_Boot_Demo, compile the demo to generate runtime descriptors, etc. bin. * **Toolchain** * (B91/B92/TL321x/TL721x):In order to support open source toolchains compilation (if using an open source toolchain, this macro 'STD_GCC' needs to be opened, and currently support Zephyr toolchain compilation), the following modifications are made: 1. Use assembler language to implement interfaces for reading and writing CSR registers, without using the functions in nds_intrinsic.h (which is a header file in the Andes toolchain); 2. Add a new file core_reg.h and copy CSR registers from nds_intrinsic.h to core_reg.h. * **Trap** * (B91/B92/TL321x/TL721x)Add new interfaces plic_irqs_preprocess_for_wfi() and plic_irqs_postprocess_for_wfi() to configure the interrupts related to entering and exiting WFI mode, respectively, and provide sample code. * **efuse** * (B92):Added efuse_get_chip_status interface to read the status of JTAG, SWS, and boot mode. * (TL321x) Added efuse_get_chip_id interface. * **IR_LEARN_Demo** * (TL721x/TL321x) Add IR_LEARN_Demo and driver files. * **audio** * (TL721x) Adding audio related drivers and demos. * **USB Demo** * (B91/B92/TL321x/TL721x) added print demo into USB_Demo. * **link** * (TL721x/TL321x)Add flash code segment for link and _attribute_flash_code_sec_noinline_ into compiler.h. * (B91/B92/TL721X/TL321X)Added the rf_certification_cfg data segment for rf certification related configuration. * **common** * (B91/B92/TL721x/TL321X):To prevent power leakage, add gpio_shutdown(GPIO_ALL) to platform_init() to configure all GPIOs (except SWS and MSPI) to a high resistance state. * **Jtag** * (B92/TL321x/TL721x): Add jtag configuration interface jtag_sdp_set_pin(), two-wire and four-wire enable interfaces jtag_set_pin_en() and sdp_set_pin_en(). * **emi** * (B91/B92/TL721X/TL321X)Added rf_phy_test_prbs15() interface for generating prbs15 type data * **calibration** * (TL721X/TL321X)Added calibration_func(),user_calib_freq_offset() calibration interface. * **rf** * (B91/B92/TL721X/TL321X)Add rf_set_power_level_singletone interface, remove rf_set_power_level_index_singletone interface from emi.c * **S** * (B91/B92/TL721X/TL321X)Added the starting address 0x10 related to RF_Certification configuration and defined the starting address of _RF_CCERTIFICATION_CFG_LMA_START * **adc** * (TL721x/TL321x):add adc_start_sample_nodma() , adc_stop_sample_nodma(), adc_get_irq_status(), adc_clr_irq_status() and adc_set_scan_chn_dis(). ### Bug Fixes * **flash** * (TL721x)Fix flash default protected area(Changed from unprotected to protect half of the flash area). * **rf** * (TL321x)Fix rf_power_level_index_e enumeration value error problem. * (TL721x/TL321x)Due to the removal of reg_bb_dma_rx_rptr, the interface rf_get_rx_packet_addr in rf_common.c has been updated to replace reg_bb_dma_rx_rptr with reg_rf_dma_rx_rptr. * (TL721x/TL321x)Fixed the issue of inaccurate RSSI values obtained by RF. * **pm** * (B91/B92/TL721x/TL321x)Fixed an issue where calling function pm_set_vbat_type or sys_init to modify parameter vbat_v failed. (This is only a problem when changing VBAT_MAX_VALUE_LESS_THAN_3V6 to VBAT_MAX_VALUE_GREATER_THAN_3V6) * **dma** * (TL721x/TL321x)Due to invalid or duplicate definitions, the following interfaces have been deleted: In dma_reg.h: reg_dma_rx_wptr, reg_dma_tx_wptr, reg_dma_rx_rptr, reg_dma_tx_rptr. In rf_reg.h: reg_bb_dma_rx_wptr, reg_bb_dma_tx_wptr, reg_bb_dma_rx_rptr, reg_bb_dma_tx_rptr. Users should now use the following register definitions: reg_rf_dma_rx_wptr, reg_rf_dma_rx_rptr, reg_rf_dma_tx_rptr, reg_rf_dma_tx_wptr. * **spi** * (B92/TL721x/TL321x) Change the type of word_len in the spi_write/spi_read interface from unsigned char to unsigned int. * **gpio** * (TL721x/TL321X)Fix the problem of not setting gpio to low level in gpio_init(), preventing that gpio cannot be initialized to low level after calling gpio_init(). * **gpio** * (B91)Fix the problem of no initialization PF group (MSPI) in gpio_init() to prevent the MSPI port from not being initialized after calling gpio_init(). * **Jtag** * (B91): The jtag two-wire and four-wire enable interfaces jtag_set_pin_en() and sdp_set_pin_en() add analog pull-ups and drop-downs to prevent the jtag hardware from being abnormal when not connected. * **usb** * (TL321X)Fix the problem of setting usbhw_enable_hw_feature() would clear other features exceptionally. * **adc** * (TL721x/TL321x):adc_get_code() is changed from reading analog registers to reading adc rx fifo to prevent repeated fetching of the same code in multiple consecutive calls to adc_get_code(). * **adc** * (TL721x/TL321x): Modify the sample cycle configuration for each sampling frequency, and delay 30us after adc_power_on() to wait for adc to stabilize, fix the problem of the first code exception after adc_power_on(). * **flash** * (B91/B92/TL721X/TL321X):Add macro in platform_init() not to add protection to the flash of the chip running ram bin to prevent the chip with no flash on board from getting stuck. * **uart** * (TL721X/TL321X):Fixed dma uart rx data loss issue by changing the length parameter passed to uart_receive_dma to the maximum value that can be received. ### Refactoring * **trap** * (B91/B92/TL721X/TL321X) Define the trap_entry function as a weak function so that applications can reimplement it. * **ADC** * (B91/B92/TL721X/TL321X)The ADC temperature detection function is an internal test function, not opened to the public, and the function is disabled by default. * **pm** * (TL721x/TL321x)Encapsulated clock.c, stimer.c, mspi.c, and core.c into library files. * (TL721X)Modify the PM-related interfaces to use the O2 optimization option. * **usb** * (TL721x/TL321x)Remove unused header file (wchar.h) from usbhw.c. * **calibration** * (B91/B92)Add a range limit of frequency_offset_value to the user_calib_freq_offset interface * **rf** * (TL721x/TL321x)the function rf_clr_dig_logic_state and rf_reset_register_value have been updated with the _attribute_ram_code_sec_noinline_ attribute. The function rf_dma_reset has been updated to static _always_inline. ### Performance Improvements * **clock** * (TL721x/TL321x)To save power, the 24M RC and PLL are turned off separately when not in use. * **S** * (TL721x/TL321x)To save power, the GPIO input functionality is turned off during initialization. * **rf** * (TL721x)Add configuration related to optimising TX power consumption inside rf_mode_init(). * (TL321x):Optimise power consumption in tx vant mode, increase vant maximum output power, and update the rf_power_level_list table with the latest driver configuration. * (TL321x): optimise RX sensitivity performance, add rf_rx_performance_mode interface and rf_rx_performance_e to select RX sensitivity configurations, default configuration is RF_RX_LOW_POWER; select RF_RX_HIGH_PERFORMANCE to increase the performance by 1dbm, but it will increase the RX power consumption. * (TL721x/TL321x)Improve BLE500K and BLE125K per floor performance. ### 版本 * SDK版本: tl_platform_sdk V3.2.0 * 芯片版本 * TLSR921x/TLSR951x(B91) (A0/A1/A2), TLSR922x/TLSR952x(B92) (A3/A4), TL721X (A1), TL321X (A1) * 硬件评估板版本 * TLSR951x(B91): C1T213A20 * TLSR952x(B92): C1T266A20 * TL721X: C1T315A20 * TL321X: C1T335A20 * 工具链版本 - TLSR921x/TLSR951x(B91): TL32 ELF MCULIB V5F GCC7.4 (IDE: [TelinkIoTStudio_V2024.8](https://wiki.telink-semi.cn/wiki/IDE-and-Tools/Telink_IoT_Studio/)) - TLSR922x/TLSR952x(B92): TL32 ELF MCULIB V5F GCC12.2 (IDE: [TelinkIoTStudio_V2024.8](https://wiki.telink-semi.cn/wiki/IDE-and-Tools/Telink_IoT_Studio/)) - TL721x: TL32 ELF MCULIB V5F GCC12.2 (IDE: [TelinkIoTStudio_V2024.8](https://wiki.telink-semi.cn/wiki/IDE-and-Tools/Telink_IoT_Studio/)) - TL321x: TL32 ELF MCULIB V5 GCC12.2 (IDE: [TelinkIoTStudio_V2024.8](https://wiki.telink-semi.cn/wiki/IDE-and-Tools/Telink_IoT_Studio/)) ### Note * (B92/TL721x/TL321x)编译工具链从V5.3.0升级为V5.3.x。 * (B91/B92/TL721X/TL321X) 新增usb_set_pin()接口,在USB应用中可以选择使能或不使能dp_through_swire功能,为了兼容性usb_set_pin_en()定义为 usb_set_pin(1),并在cstartup.S 添加相应注释。 ### BREAKING CHANGES * **sys** * (TL321X)sys_init新增power_mode参数(A0只支持LDO模式,A1支持LDO和DCDC_LDO)同时更新sys_init内容以适配A1芯片。 * (TL721x/TL321x)新的版本调用sys_init()之后,如果想要获取g_pm_status_info.mcu_status的值,或者调用pm_get_reboot_event()获取相关信息,获取不到了。需要应用层自己调用pm_update_status_info()获取。新的使用方法如下:调用sys_init()后再调用pm_update_status_info(),即可获得g_pm_status_info.mcu_status的值并且可以调用pm_get_sw_reboot_event查看软件重启原因。同时,之前的reboot分类也做了如下变更:1.g_pm_status_info.mcu_status新增两个状态:MCU_HW_REBOOT_TIMER_WATCHDOG 、MCU_HW_REBOOT_32K_WATCHDOG2.MCU_STATUS_REBOOT_BACK的含义和以前不一样了,以前是包含软件重启和watchdog重启。现在的版本MCU_STATUS_REBOOT_BACK仅仅代表软件重启,如果想要知道软件重启的具体原因,可以调用pm_get_sw_reboot_event进行查看。删除了pm_get_reboot_event()/pm_get_deep_retention_flag()函数。 * (TL721x/TL321x)之前的软件reboot原因,可以多种情况共存,为了节省寄存器bit以便将来扩展使用,现在的版本只会保存最新一次软件reboot的原因。所以如果想要保存所有软件reboot的原因的话,上层应用需要每次初始化后自行保存,以防看不到历史的reboot原因。 * (TL721x/TL321x)函数名字变更:sys_set_power_mode->pm_set_power_mode,sys_set_vbat_type->pm_set_vbat_type。 * **dma** * (B92/TL321x/TL721x)设置链表DMA的中断模式的接口由dma_set_llp_int_mode改成dma_set_llp_irq_mode, 将中断模式的枚举类型统一为dma_llp_irq_mode_e。 * **dma** * (B92/TL721x/TL321x) 将dma_set_spi_burst_size接口名称修改为dma_set_burst_size。 * **audio** * (B92) 将audio_set_i2s_align_en,audio_set_i2s_align_dis接口名称修改为audio_i2s_align_en,audio_i2s_align_dis。 * **emi** * (B91/B92/TL721X/TL321X)修改emi.c rf_continue_mode_run 接口,增加了可配置发包数据类型,调整命令值与数据类型的对应关系,由(0:pbrs9 1:0xf0 2:0x55)调整为(0:pbrs9 1:0x0f 2:0x55 3:0xaa 4:0xf0 5:0x00 6:0xff) * (B91/B92/TL721X/TL321X)将 rf_emi_tx_continue_update_data,rf_emi_rx_setup,rf_emi_tx_burst_loop,rf_emi_tx_burst_setup函数的rf_mode参数的原支持模式RF_MODE_BLE_2M更名为RF_MODE_BLE_2M_NO_PN(新名字更贴近其模式) * **adc** * (TL721x/TL321x)ADC DMA模式从轮巡方式优化成DMA中断方式读取数据,提高代码运行效率,同时将adc_get_sample_status_dma()/adc_clr_sample_status_dma()/adc_set_dma_trig_num()改名为adc_get_irq_status_dma()/adc_clr_irq_status_dma()/adc_set_rx_fifo_trig_cnt(),删除了adc_get_code_dma()。 ### Features * **flash** * (TL321x)添加新增flash P25Q40SU/P25Q16SU. * **Secure_Boot_Demo** * (TL721x/TL321x) 添加Secure_Boot_Demo, 编译demo生成运行描述符等bin. * **Toolchain** * (B91/B92/TL321x/TL721x):为了支持开源工具链编译(若使用开源工具链,需要打开这个宏'STD_GCC',目前支持Zephyr工具链编译),做如下修改: 1. 使用汇编语言实现CSR寄存器的读写等接口,不使用nds_intrinsic.h内的函数(这是一个在Andes工具链里的头文件); 2. 添加一个新文件core_reg.h, 将nds_intrinsic.h里面CSR寄存器拷贝到core_reg.h。 * **Trap** * (B91/B92/TL321x/TL721x)新增接口 plic_irqs_preprocess_for_wfi() 和 plic_irqs_postprocess_for_wfi() ,分别用于配置进入和退出 WFI 模式的相关中断并提供示例代码 * **efuse** * (B92):增加efuse_get_chip_status接口,用于读取JTAG、SWS 和启动模式的状态。 * (TL321x) 增加efuse_get_chip_id接口。 * **IR_LEARN_Demo** * (TL721x/TL321x) 新增IR_LEARN_Demo和driver files. * **audio** * (TL721x) 添加audio相关驱动和demo. * **USB Demo** * (B91/B92/TL321x/TL721x)在USB_Demo中添加print demo。 * **link** * (TL721X/TL321X)link文件中新增flash_code段,complier.h中新增_attribute_flash_code_sec_noinline_ * (B91/B92/TL721X/TL321X)添加rf_certification_cfg段,用于rf certification的相关配置 * **common** * (B91/B92/TL721x/TL321X)为防止漏电,在platform_init()中添加gpio_shutdown(GPIO_ALL)将所有gpio(除SWS和MSPI外)配置为高阻态。 * **Jtag** * (B92/TL321x/TL721x)添加jtag配置接口jtag_sdp_set_pin(),两线和四线使能接口jtag_set_pin_en()和sdp_set_pin_en()。 * **emi** * (B91/B92/TL721X/TL321X)新增rf_phy_test_prbs15()接口用于生成prbs15类型数据 * **calibration** * (TL721X/TL321X)新增calibration_func(),user_calib_freq_offset()校准接口 * **rf** * (B91/B92/TL721X/TL321X)新增rf_set_power_level_singletone接口,删除emi.c 中的rf_set_power_level_index_singletone接口 * **S** * (B91/B92/TL721X/TL321X)添加RF_Certification配置相关的起始地址 0x10 并定义 RF_Certification 配置的起始地址 _RF_CERTIFICATION_CFG_ADDR_OFFSET * **adc** * (TL721x/TL321x):添加adc_start_sample_nodma(), adc_stop_sample_nodma(), adc_get_irq_status(),adc_clr_irq_status()和adc_set_scan_chn_dis(). ### Bug Fixes * **flash** * (TL721x)修复flash默认保护区域(从无保护改为保护flash的一半区域)。 * **rf** * (TL321x)修复 rf_power_level_index_e 枚举值错误问题。 * (TL721x/TL321x)由于删除了 reg_bb_dma_rx_rptr,在 rf_common.c 中,接口 rf_get_rx_packet_addr 中的 reg_bb_dma_rx_rptr 已替换为 reg_rf_dma_rx_rptr。 * (TL721x/TL321x)修复了RF获取RSSI值不准的问题 * **pm** * (B91/B92/TL721x/TL321x)解决了调用函数pm_set_vbat_type或者sys_init修改参数vbat_v不成功的问题。(仅仅当将VBAT_MAX_VALUE_LESS_THAN_3V6修改为VBAT_MAX_VALUE_GREATER_THAN_3V6会有问题) * **dma** * (TL721x/TL321x)由于定义无效或重复,删除了以下寄存器定义:dma_reg.h中reg_dma_rx_wptr、reg_dma_tx_wptr、reg_dma_rx_rptr、reg_dma_tx_rptr;rf_reg.h中reg_bb_dma_rx_wptr、reg_bb_dma_tx_wptr、reg_bb_dma_rx_rptr、reg_bb_dma_tx_rptr;用户请使用如下寄存器定义:reg_rf_dma_rx_wptr、reg_rf_dma_rx_rptr、reg_rf_dma_tx_rptr、reg_rf_dma_tx_wptr。 * **spi** * (B92/TL721x/TL321x) 将spi_write/spi_read接口中的word_len类型从unsigned char修改为unsigned int。 * **gpio** * (TL721x/TL321X)修复gpio_init()中无法设置gpio为低电平的问题,防止调用gpio_init()后不能将gpio初始化为低电平。 * **gpio** * (B91)修复gpio_init()中无法初始化PF组(MSPI)的问题,防止调用gpio_init()后不能初始化MSPI口。 * **Jtag** * (B91)jtag两线和四线使能接口jtag_set_pin_en()和sdp_set_pin_en()添加模拟上下拉,防止jtag硬件在未连接时出现异常。 * **usb** * (TL321X)修复了设置usbhw_enable_hw_feature()时会将其他feature异常清除的问题. * **adc** * (TL721x/TL321x): adc_get_code()由读模拟寄存器方式改为读adc rx fifo方式,防止连续多次调用adc_get_code()时重复取的是同一个code。 * **adc** * (TL721x/TL321x):修改各个采样频率的sample cycle配置,且在adc_power_on()后delay 30us 等待adc稳定,修复adc_power_on()后第一个code异常的问题。 * **flash** * (B91/B92/TL721X/TL321X):在platform_init()中添加宏不对跑ram bin的芯片的flash加保护,防止无搭载flash的芯片卡死。 * **uart** * (TL721X/TL321X):修复了dma uart rx数据丢失问题,将传递给uart_receive_dma的长度参数修改为可以接收到的最大值。 ### Refactoring * **trap** * (B91/B92/TL721X/TL321X) 将 trap_entry 函数定义为弱函数,以便应用程序重新可以实现该函数。 * **ADC** * (B91/B92/TL721X/TL321X)ADC温度检测功能属于内部测试功能,不对外开放,默认禁用该功能。 * **pm** * (TL721x/TL321x)clock.c stimer.c mspi.c core.c 封装成库文件。 * (TL721X)修改PM相关的接口都使用O2优化选项。 * **usb** * (TL721x/TL321x)删除 usbhw.c 中未使用的头文件 wchar.h。 * **calibration** * (B91/B92)给user_calib_freq_offset接口添加frequency_offset_value范围限制 * **rf** * (TL721x/TL321x)函数rf_clr_dig_logic_state、rf_reset_register_value类型修改为_attribute_ram_code_sec_noinline_;函数rf_dma_reset类型修改为static _always_inline。 ### Performance Improvements * **clock** * (TL721x/TL321x)为了节省功耗,在不使用24M RC和PLL的时候,分别关闭24M RC/PLL。 * **S** * (TL721x/TL321x)为了节省功耗,初始化时关掉gpio输入功能。 * **rf** * (TL721x)rf_mode_init()内部添加优化TX功耗的相关配置,并根据最新的驱动配置更新rf_power_Level_list表。 * (TL321x)优化 tx vant 模式下的功耗,提高 vant 最大输出功率,并根据最新的驱动配置更新rf_power_Level_list表 * (TL321x)优化RX sensitivity 性能,添加rf_rx_performance_mode接口及rf_rx_performance_e选择RX灵敏度配置,默认配置为RF_RX_LOW_POWER;选择RF_RX_HIGH_PERFORMANCE性能会提升1dbm,但会增加RX功耗 * (TL721x/TL321x)提升 BLE500K 和 BLE125K per floor 性能。
最后提交信息为:
doc:Update tl_platform_sdk_Release_Note.md,add IDE version
V3.1.0
077b133
2024-07-22 15:32
对比
Release V3.1.0
ying.jing
## V3.1.0 ### Version * SDK version: tl_platform_sdk V3.1.0 * This version of the SDK supports TLSR921x/TLSR951x(A0/A1/A2),TLSR922x/TLSR952x(A3/A4),TL721X(A1),TL321X(A0) chips. * Toolchain version * TLSR921x/TLSR951x: gcc7 * TLSR922x/TLSR952x: gcc12 * TL721x: gcc12 * TL321x: gcc12 ### Bug Fixes * **pm** * (TL721x)Solved the problem of exiting the sleep function or causing a reset due to the incorrect position of the clear wake source state operation.Clear the wake source status after setting the wake tick.The process of setting the wake up tick value may generate an intermediate value. If the intermediate value is the same as the 32k tick value, the state of the timer wake up source will be set, causing the exit of the sleep function or a reset.[2b4ddd52](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1147/commits?commit_id=2b4ddd52a79331bd344548bd5bed1d5f1847f6f8) * (B91/B92)Solved the problem that pm_set_wakeup_time_param and pm_set_xtal_stable_timer_param interfaces calculate the early wake time of sleep incorrectly. If you call either of these interfaces, you may not be able to sleep properly.[2f9b7be4](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1159/commits?commit_id=2f9b7be4ff8e2c0018180a9df7d85d6b4c1f0db3) * **i2c1_m** * (TLSR922x/TLSR952x/TL721X/TL321X)I2C1_M_WAIT:xxx_timeout_handler error passing parameter.[5fbb0b](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1162/commits?commit_id=5fbb0bc295c5a7e9e1b976a48dea8dc72333ac61) * **RF_Demo** * (TL721X/TL321X)Fixed data overflow during header variable assignment in app_pri_generic_mode.c[0d5bc4](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1160/commits?commit_id=0d5bc466a3c121324dee848c4f245b1080d592ae) * (TL721x/TL321x)Fixed rf_set_irq_mask parameter passing error in app_pri_generic_mode.c[0d5bc4](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1160/commits?commit_id=0d5bc466a3c121324dee848c4f245b1080d592ae) * **rf** * (TL721X/TL321X)Fixed issue where switching between different RF modes using rf_set_xx_mode could be unsuccessful (in cases where the rf_reset_register_value interface was not called before switching modes)[0d5bc4](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1160/commits?commit_id=0d5bc466a3c121324dee848c4f245b1080d592ae) * (TL321x) Fix the rf_mode_init configuration error to avoid triggering RF DMA and state machine reset during invocation.[373c5d](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1149/commits?commit_id=373c5dd45fc45afab5b38f5ea572afadcd7428a0) ### BREAKING CHANGES * **rf** * (TL321x) Close the stimer_bb module in `rf_rode_init`interface; Delete the interfaces `rf_bb_timer_sync_to_stimer_en`, `rf_bb_timer_sync_to_stimer_trig`, `rf_bb_timer_get_tick`and `rf_set_timer_source`. * **flash** * (B91/B92/TL721x/TL321X)Removed flash_read_data()/flash_read_data_decrypt_check(), and changed the default single-wire of flash_read_page() interface in flash.c to default two-wire to prevent the mismatch between the maximum frequency supported by flash single-wire read and the frequency configured by the chip from leading to flash read error. ### Features * **TL321X** * PKE/PM * **pm** * (TL721x) Added interface pm_set_cfg_for_os_compile_opt(), added enumeration pm_optimize_sel_e, and added code related to os optimization options. * (TL721X) In the return value of the pm_sleep_wakeup interface, add two bit definitions, indicating that the stimer tick value is greater than the maximum value and less than the minimum value respectively. * **sys** * (TL721x) Added the DCDC_0P94_LDO_1P8 and DCDC_0P94_DCDC_1P8 modes. * **pm demo** * Added 24M RC calibration and 32K clock recommended usage. * **core** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x/TL721X/TL321X) The core_mie_disable interface adds a return value to return the value of the MIE register before interrupts were disabled. * **trap** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x/TL721X/TL321X) Added plic_all_interrupt_save_and_disable interface to save and disable all interrupt sources of PLIC, plic_all_interrupt_restore interface to restore all PLIC interrupt sources. * **flash** * (B91/B92/TL721x/TL321X)add flash_4line_en() and flash_4line_dis(). ### Refactoring * **USB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x/TL721X/TL321X)The usb_cdc_tx_data_to_host function supports sending data of arbitrary length in a blocking fashion. usb_cdc_tx_data_to_host_non_block is added as a new non-blocking function, and sample code is provided. * **rf** * (TL721x) Switch stimer_bb to manual mode in `rf_rode_init`, which triggers tick earlier. * **aes** * (TL721x/TL321X)The AES section was deleted because it was not needed. ### Performance Improvements * N/A ### Note * N/A --- ### 版本 * SDK版本: tl_platform_sdk V3.1.0 * 此版本SDK支持 TLSR921x/TLSR951x(A0/A1/A2),TLSR922x/TLSR952x(A3/A4),TL721X(A1),TL321X(A0) 芯片。 * 工具链版本 * TLSR921x/TLSR951x: gcc7 * TLSR922x/TLSR952x: gcc12 * TL721x: gcc12 * TL321x: gcc12 ### Bug Fixes * **pm** * (TL721X)解决了因为清唤醒源状态操作的位置不对引发的退出睡眠函数或者产生复位的问题。清唤醒源状态的操作需要放在设置唤醒tick之后。设置唤醒tick值的过程可能会产生中间值,如果中间值和32k tick值相同会把timer唤醒源的状态置起来,从而引发退出睡眠函数或者产生复位。[2b4ddd52](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1147/commits?commit_id=2b4ddd52a79331bd344548bd5bed1d5f1847f6f8) * (B91/B92)解决了pm_set_wakeup_time_param和pm_set_xtal_stable_timer_param接口对于睡眠的提前唤醒时间计算错误的问题。如果调用过这两个接口中的任意一个,可能会导致不能正常睡眠。[2f9b7be4](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1159/commits?commit_id=2f9b7be4ff8e2c0018180a9df7d85d6b4c1f0db3) * **i2c1_m** * (TLSR922x/TLSR952x/TL721X/TL321X)I2C1_M_WAIT:xxx_timeout_handler传参错误.[5fbb0b](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1162/commits?commit_id=5fbb0bc295c5a7e9e1b976a48dea8dc72333ac61) * **RF_Demo** * (TL721X/TL321X)修复了app_pri_generic_mode.c中header变量赋值过程中的数据溢出问题[0d5bc4](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1160/commits?commit_id=0d5bc466a3c121324dee848c4f245b1080d592ae) * (TL721x/TL321x)修复了app_pri_generic_mode.c中rf_set_irq_mask传参错误[0d5bc4](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1160/commits?commit_id=0d5bc466a3c121324dee848c4f245b1080d592ae) * **rf** * (TL721x/TL321x)修复了使用rf_set_xx_mode切换不同RF模式可能不成功的问题(在切换模式之前没有调用rf_reset_register_value接口的情况)[0d5bc4](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1160/commits?commit_id=0d5bc466a3c121324dee848c4f245b1080d592ae) * (TL321x) 修复了rf_mode_init配置错误,避免调用时触发RF DMA和状态机复位。[373c5d](http://192.168.48.36/src/driver/tl_platform_src/merge_requests/1149/commits?commit_id=373c5dd45fc45afab5b38f5ea572afadcd7428a0) ### BREAKING CHANGES * **rf** * (TL321x) `rf_mode_init`接口中关闭stimer_bb模块;删除`rf_bb_timer_sync_to_stimer_en`、`rf_bb_timer_sync_to_stimer_trig`、`rf_set_timer_source`、`rf_bb_timer_get_tick`接口。 * **flash** * (B91/B92/TL721x/TL321X)删除了flash_read_data()/flash_read_data_decrypt_check(),同时将flash.c中的flash_read_page()接口默认单线更改为默认两线,防止flash单线读支持的最大频率和芯片配置的频率不匹配导致flash读错误。 ### Features * **TL321X** * PKE/PM * **pm** * (TL721x)添加接口pm_set_cfg_for_os_compile_opt(),添加枚举pm_optimize_sel_e,添加os优化选项相关的代码。 * (TL721X)在pm_sleep_wakeup接口的返回值中,增加两个bit的定义,分别表示stimer tick值大于最大值和小于最小值。 * **sys** * (TL721X)新增DCDC_0P94_LDO_1P8模式和DCDC_0P94_DCDC_1P8模式。 * **pm demo** * 添加24M RC校准和32K时钟推荐使用方法。 * **core** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x/TL721X/TL321X) core_mie_disable 接口增加一个返回值,用来返回中断禁止前 MIE 寄存器的值。 * **trap** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x/TL721X/TL321X) 添加 plic_all_interrupt_save_and_disable 接口保存和禁止 PLIC 所有中断源,plic_all_interrupt_restore 接口恢复所有 PLIC 中断源。 * **flash** * (B91/B92/TL721x/TL321X)新增了flash_4line_en()/flash_4line_dis()。 ### Refactoring * **USB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x/TL721X/TL321X)usb_cdc_tx_data_to_host 函数支持以阻塞的方式发送任意长度数据,新增非阻塞发送函数 usb_cdc_tx_data_to_host_non_block 并提供示例代码。 * **rf** * (TL721x) `rf_mode_init`中切换stimer_bb为手动模式,手动模式更早触发tick。 * **aes** * (TL721x/TL321X)删掉了AES段,因为不需要这个段。 ### Performance Improvements * N/A ### Note * N/A
最后提交信息为:
Merge branch 'weihua.zhang_release_20240722' into 'master'
V3.0.0
25b1729
2024-07-01 17:58
对比
Release V3.0.0
ying.jing
## V3.0.0 ### Version * SDK version: tl_platform_sdk V3.0.0 * This version of the SDK supports TLSR921x/TLSR951x(A0/A1/A2),TLSR922x/TLSR952x(A3/A4),TL721X(A1),TL321X(A0) chips. * Toolchain version - TLSR921x/TLSR951x: gcc7 - TLSR922x/TLSR952x: gcc12 - TL721x: gcc12 - TL321x: gcc12 ### Note * (TLSR922x/TLSR952x)Update toolchains from V5.1.1 to V5.3.0 - The compilation options for warnings are uniformly configured as follows: -Wall -Wextra -Wshadow -Wimplicit-fallthrough -Wpointer-arith -Wredundant-decls -Wcast-qual -Wsign-compare -Wunused-parameter -Wunused-variable -Wswitch -Wstrict-prototypes -Wmissing-field-initializers -Wdeprecated-declarations -Wenum-conversion -Wpacked-not-aligned -Waddress-of-packed-member -Wundef - The compilation options for compiling, assembling and linking are configured uniformly as follows: -mcpu=d25f -mext-dsp -fomit-frame-pointer -fno-strict-aliasing -std=c99 -fno-jump-tables -fno-fat-lto-objects -fuse-ld=bfd - Solve the following file compilation error problem: - demo/vendor/PKE_Demo/B91_B92_PKE_Demo_v1.0.1/PKE_Demo/app_ecdsa.c, app_rsa.c - demo/vendor/UART_DEMO/app_dma.c - demo/vendor/I2C_Demo/app.c, app_dma.c * Cleared the annotation for the following driver files: - chip/B91/drivers: aes.c/aes.h, core.h - chip/B92/drivers: aes.c/aes.h, core.h * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)In order to deal with the portability issues caused by the -fpack-struct compilation option, the following file has been modified by adding the compilation option `__attribute__((packed))` to structures: - demo/vendor/USB_Demo/application/usbstd/CDCClassCommon.h - demo/vendor/USB_Demo/application/rf_frame.h - common/usb_dbg/myudb_usbdesc.h * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)To make the watchdog coverage more extensive and the code more secure, enable the timer watchdog in the .S file and disable it in the platform_init() function. * (TLSR922x/TLSR952x)the following modules add a timeout mechanism,clock/analog/mspi/ic/uart/spi/aes/trng, for compatibility,the timeout is set to a large value (0xffffffff us) by default, if want to use the timeout mechanism: - modify the timeout via the xxx_set_error_timeout interface (refer to the interface notes for a description of the timeout); - the application can override xxx_timeout_handler to get exception details as appropriate(for details, refer to the comments of the interface description); * Cleaned up the Chinese characters in the code, involving the following files: - 3rd-party\freertos-V5\include: task.h. - chip\B92\drivers\lib\include: sys.h - demo\vendor\AUDIO_Demo\AUDIO_V1.1\AUDIO_Demo: app_codec_0581.c - demo\vendor\SPI_Demo\SPI_V1.1\SPI_Demo: app_dma_llp.c ### Bug Fixes * **audio** * (TLSR922x/TLSR952x)Fixed the problem of amic and line mono input data anomaly under 44.1k and 48k sample rate, involving interface audio_codec_swap_stream0_data. [3d3f31d9](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1034/diffs?commit_id=3d3f31d94888af0f2242fcef7e8107e729ca6776) * (TLSR922x/TLSR952x)Solved the problem of inconsistent volume between the left and right channels of 20bit audio data in stereo mode. [716ead90](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/944/diffs?commit_id=716ead90a4e0184169b082395715481ac358a1bb) * (TLSR922x/TLSR952x)Solved the problem of abnormal dac output after dynamically switching the codec dac sampling rate. [d755dae7](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1086/diffs?commit_id=d755dae7d81454617c3ddc0290cf07cf4a30b17f) * **SPI_Demo** * (TLSR922x/TLSR952x)Repair SPI_PROTOCOL in spi no dma mode is configured as B91M_SLAVE_PROTOCOL, and the master side sends data in wrong format, modify SPI_MODE_WR_DUMMY_WRITE to SPI_MODE_WR_WRITE_ONLY. [e171fa06](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1013/diffs?commit_id=e171fa060b221eac87bef74edadb3e296890bca2) * **pm** * (TLSR922x/TLSR952x)Solved several problems that may occur when the sleep time set by the function pm_sleep_wakeup() is less than 1.62ms: 1. Entered sleep, but the sleep time did not meet expectations, and it can be awakened after about 37 hours. 2. If it happens to be after the pm_clr_all_irq_status() in the processing of pm_sleep_wakeup() and the time is up, it will cause the plic_clr_all_request() to not be cleared, triggering a software reboot. 3. If it happens to be at the moment of sleep and the time was out, it will result in not entering sleep and continuing to execute (when sleep mode is suspend/sleep retention) or software reboot (when sleep mode is deep). [bd44c301](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/769/diffs?commit_id=bd44c3017fd31dbb3c0808b5c8bbcb6645f38ea2) * (TLSR922x/TLSR952x)Solved the problem that may be caused by treating the VBUS flag bit as a wake-up source flag bit in pm_sleep_wakeup(): If jitter occurs on the VBUS pin after the pm_clr_all_irq_status() in the processing of pm_sleep_wakeup(), it will cause the plic_clr_all_request() to not be cleared, triggering a software reboot. [bd44c301](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/769/diffs?commit_id=bd44c3017fd31dbb3c0808b5c8bbcb6645f38ea2) * (TLSR921x/TLSR951x)Solved the crash problem caused by the failure of the crystal oscillator stability flag. The program determines whether to switch from 24M rc to 24M xtal by reading the stable flag of the hardware crystal oscillator. If the crystal used starts slowly and the flag of the crystal oscillator is ready, but the actual crystal oscillator does not start normally, the program will crash after switching to 24M XTAL. [3aa5ca13](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/936/diffs?commit_id=3aa5ca1363a8805e274dccf03320f584ab75e477) * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Restore the default value of register system_up_32k before sleep, which solves the problem of inaccurate sleep time. If the default value is not restored, the system tick updates every 32k edge. Because the system tick is not updated in a timely manner, the XTAL may be misjudged that it is not stable. If the system tick executes 40us more than once, the reserved waiting time may be exceeded, resulting in inaccurate sleep time. [e8dc8082](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1078/diffs?commit_id=e8dc80828f0d9050833b55be48764dcce8733a0a) * **sys** * (TLSR922x/TLSR952x)The A3 chip has a problem (the A4 doesn't) : If the hardware board has a 1.4V dcdc inductor component and uses 1.8V GPIO, it is necessary to set 1P4V to DCDC mode as soon as possible after the chip is powered on, otherwise there is a voltage pulse on vdd1v2 and vddo3. Before moving code operations in the S file, configure the DCDC mode to solve this problem. [875a487e](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/910/diffs?commit_id=875a487edbb3191372e255369c566f4222d0b74c) * **USB_Demo** * (TLSR922x/TLSR952x)Solved the problem that DMIC0_DMIC1_IN cannot transfer DMIC0 data in USB_MICROPHONE mode. [716ead90](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/944/diffs?commit_id=716ead90a4e0184169b082395715481ac358a1bb) * **link** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)make _BSS_VMA_END four-byte alignment to resolve when using the S file _FILL_STK function,due of the _BSS_VMA_END may not have four-byte alignment, there is an out-of-bounds access beyond _STACK_TOP, resulting in a store access fault. [0e732bce](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/972/diffs?commit_id=0e732bcea2887804489ad6db251a281f26796218) * **Timer_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Wd_clear() must be executed before each call to wd_start() to avoid abnormal watchdog reset time because the initial count value is not 0. [20a065ec](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1000/diffs?commit_id=20a065ece53185549c748bf99d5780029def6180) * **spi demo** * (TLSR922x/TLSR952x)Fix lspi duplicate call to gspi_reset in interrupt dma_irq_handler. [bfadf96e](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1009/diffs?commit_id=bfadf96ed151e483bbbbf0da00d9831c8f25d2ef) * **qdec_Demo** * (TLSR922x/TLSR952x)qdec_get_count_value: If the interface is called continuously (with very short intervals), it is possible that the data read is not updated in time and the result is read from the last time. [ecf387fa](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1064/diffs?commit_id=ecf387fab552255396dd584107535693c01a617d) * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Add the missing active state of the reg_rf_ll_2d_sclk register bit<0-2>. [d7ef39ba](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1087/diffs?commit_id=d7ef39ba526cdf736cf4ea5b75c79c86366b609c) * **Coremark_demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Fix the compilation options for the project to ensure that the CPU runs properly. [791247df](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/894/diffs?commit_id=791247df9dba930661b988a44fc55f3898d3c718) * **Dhrystone_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Fix the compilation options for the project to ensure that the CPU runs properly. [791247df](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/894/diffs?commit_id=791247df9dba930661b988a44fc55f3898d3c718) * **flash** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Fix the problem that multiple calls to flash_write_status_midxxx() result in wrong return value. [0634358a](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/984/diffs?commit_id=0634358ade7aaedb2939b14c8b4ebb49dfe131ce) * **RF_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Fixed a compilation error caused by undefined TX_DELAY_US in the rf demo. [3fc3d848](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/904/diffs?commit_id=3fc3d848715b84cdcd763af3613aa4fb99477a86) ### BREAKING CHANGES * **sys** * (TLSR922x/TLSR952x)Refactor the nop related macro definition to avoid stack overflow in GCC. Simultaneously updated the names of nop related macro definitions to make them more reasonable. * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Add the cap argument to the sys_init function to configure whether the internal capacitor needs to be turned off. If the development board has already welded the capacitor on the outside, then the internal capacitor needs to be turned off; If the development board does not weld the capacitor on the outside, then the internal capacitor needs to be opened. If the corresponding operation is not possible, there may be two capacitors in parallel, or no capacitors. This has a great impact on the starting time and frequency of crystal vibration, which may cause reset and crash. * **pm/clock** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Replace the method of obtaining microsecond level delay before the system timer starts working with core_cclk_delay_tick() instead of nop delay. * **pm** * (TLSR921x/TLSR951x)Deleted DCDC_1P4_DCDC_1P8 from the enumeration power_mode_e. When the power supply voltage exceeds 3.8V and the DCDC_1P8 configuration is used, the flash voltage may exceed the power supply range when the LDO is switched to the DCDC. * (TLSR921x/TLSR951x)PM_ANA_REG_WD_CLR_BUF0(0x38), PM_ANA_REG_POWER_ON_CLR_BUF0(0x39) register all bits are for driver use only. * (TLSR922x/TLSR952x)PM_ANA_REG_WD_CLR_BUF0(0x35), PM_ANA_REG_POWER_ON_CLR_BUF0(0x3a) register all bits are for driver use only. * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)The rf_mode_init() function has added an RF Rx DCOC software calibration scheme to solve the problem of poor Rx sensitivity performance in some chips with large DC-offset. The execution time of this function will be longer, you can check the function comment for the specific time. Due to the use of software DCOC's calibration scheme, it is not necessary and not allowed to use rf_get_dcoc_cal_val and rf_set_dcoc_cal_val for processing in the fast settle function, Therefore, the above two interfaces were deleted, and the structure rf_dcoc_cal_t was also deleted; * **flash** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Add the return value for the flash_write_status_midxxxxxx,flash_lock_midxxxxxx and flash_unlock_midxxxxxx interface. * **stimer** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Delete interface stimer_enable/stimer_disable. * **USB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) Since the -fshort-wchar compilation option was removed, using wide characters to return usb string descriptors no longer works, so use the usbdesc_get_str()/myudb_usbdesc_get_str() function to get the usb string descriptor and remove the associated usb string descriptor constants. * **flash** * (TLSR922x/TLSR952x)Add the return value for the flash_write_status_midxxxxxx,flash_lock_midxxxxxx and flash_unlock_midxxxxxx interface. * **stimer** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Delete interface stimer_enable/stimer_disable。 * **USB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) Since the -fshort-wchar compilation option was removed, using wide characters to return usb string descriptors no longer works, so use the usbdesc_get_str()/myudb_usbdesc_get_str() function to get the usb string descriptor and remove the associated usb string descriptor constants. * **rf** * (TLSR921x/TLSR951x) For the convenience of users, the fast settle-related interfaces have been re-encapsulated. The new code will affect compatibility. Please refer to rf_demo and app_fast_settle_test.c for usage instructions. (Interfaces rf_get_ldo_trim_val, _set_ldo_trim_val, rf_get_hpmc_cal_val, rf_set_hpmc_cal_val, rf_get_dcoc_cal_val, rf_set_dcoc_cal_val, rf_tx_fast_settle_init, and rf_rx_fast_settle_init have been removed; interfaces rf_fast_settle_config, rf_tx_fast_settle_update_cal_val, and rf_rx_fast_settle_update_cal_val have been added.) * (TLSR922x/TLSR952x) For the convenience of users, the fast settle-related interfaces have been re-encapsulated. The new code will affect compatibility. Please refer to rf_demo and app_fast_settle_test.c for usage instructions. (Interfaces rf_rx_fast_settle_dis, rf_get_ldo_trim_val, rf_set_ldo_trim_val, rf_get_hpmc_cal_val, rf_tx_fast_settle_init, and rf_rx_fast_settle_init have been removed; interfaces rf_fast_settle_config, rf_tx_fast_settle_update_cal_val, and rf_rx_fast_settle_update_cal_val have been added.) * **calibration** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Deleted the operation on enabling the internal capacitor in the user_read_flash_value_calib (TLSR921x/TLSR951x) /calibration_func(TLSR922x/TLSR952x) interface. The calibration interface will adjust the voltage and capacitance values, so it will be called most of the time, but for 24M crystals using an external capacitor,if the internal capacitor is opened when the calibration interface is called, the two capacitors will be in parallel, affecting the crystal vibration, so this operation is deleted. * **error_handler** * drv_set_error_timeout: Delete TIMEOUT_US and change it to global variable g_drv_api_error_timeout_us, add the above interfaces for modification to avoid dynamic modification of the lib library due to macro definition. * error_code_e: Change the value to drv_api_error_code_e to prevent the same name. * get_error_code/timeout_handler: Change it to drv_get_error_code/drv_timeout_handler to prevent the same name. * **flash_demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x):In order to realize the bin firmware protection in driver sdk, delete the flash_lock/flash_unlock swtich implementation scheme maintained by flash_demo, for the sake of code simplicity and easy maintenance, add the flash hal layer to realize the scheme with structure, add the hal_flash.c/.h file and add the bin firmware protection function in platform_init. platform_init to add the bin firmware protection function. ### Features * **TL721X** * ADC/Analog/CHACHA20_POLY1305/Debug/Flash/GPIO/HASH/I2C/PKE/PM/PWM/QDEC/RF/SKE/SPI/STIMER/TIMER/TRAP/TRNG/UART/USB * **TL321X** * ADC/Analog/Debug/Flash/GPIO/I2C/PWM/QDEC/RF/SKE/SPI/STIMER/TIMER/TRAP/TRNG/UART/USB * **alg_reg** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Delete the following interfaces: analog_write_reg32_dma, analog_read_reg32_dma, analog_write_buff_dma, analog_read_buff_dma, analog_write_addr_data_dma. This is because dma is not used in real applications, and other interfaces already meet the requirements. * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Limit the analog_write_buff interface data length cannot exceed 8 bytes. * **spi** * (TLSR922x/TLSR952x)Fix the compilation warning problem caused by the mismatch of gspi_change_csn_pin and spi_master_config enumeration parameters, which does not affect the function. * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) Added rf_set_rx_dcoc_cali_by_sw interface to switch rx DCOC software calibration to optimise rf_mode_init execution time(This interface is only available in scenarios where only tx is used, not rx) * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) Added the user_calid_rf_rx_dcoc interface to obtain the dcoc calibration values in flash * **flash** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Added interfaces: flash_4line_en, flash_4line_dis. * **USB** * (TLSR921x/TLSR951x)Add usbhw_set_ep_addr() interface to set endpoint buffer allocation; usbhw_set_eps_max_size() interface to set the maximum buffer size of the IN endpoints. * (TLSR922x/TLSR952x)Add usbhw_set_eps_max_size() interface to set the maximum buffer size of the IN endpoints. * **SDK VERSION** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Added 'tl_Check_Fw.sh' script, print SDK version information after compiling the code. * **stimer** * (TLSR921x/TLSR951x)Added the interface pm_clr_irq_status/pm_set_wakeup_src/stimer_set_32k_track_cnt/stimer_get_32k_track_cnt/stimer_get_tracking_32k_value. * (TLSR922x/TLSR952x)Added the interface pm_set_wakeup_src/stimer_set_32k_track_cnt/stimer_get_32k_track_cnt/stimer_get_tracking_32k_value. * **core** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Add a new core.c file, which includes the core_cclk_delay_tick interface; Add rdmcycle and core_cclk_delay_tick interfaces. * **drivers** * (TLSR922x/TLSR952x)Add a new folder error_handler, including the error_handler.c/error_handler.h file, which includes the get_error_code and timeout_handler interfaces. * **sys** * (TLSR922x/TLSR952x)Added the interface sys_set_dcdc_1pP4_ldo_2p0 to solve the issue on A3(A4 not have) that if there is a 1.4V dcdc inductor component on the hardware board and a 1.8V GPIO is used will cause a voltage pulse on vdd1v2 and vddo3. * (TLSR922x/TLSR952x) Added efuse_get_chip_id interface. Note: Only A3 and later are written as chip id values. * **flash** * (TLSR922x/TLSR952x)Add 1M flash(GD25LQ80E) driver. * (TLSR922x/TLSR952x)Add flash_write_config_mid146085() and modify flash_lock_mid146085() and flash_unlock_mid146085() to adapt the second-supply flash P25Q80SU. * **sys** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Add crystal_manual_settle() function into sys_init() and pm_sleep_wakeup() in order to quickly start the crystal oscillator. * **pm** * (TLSR921x/TLSR951x)Added pm_set_xtal_stable_timer_param() to set crystal related parameters when the crystal starts to vibrate relatively slowly. * **flash** * (TLSR921x/TLSR951x)add new flash PY25Q128H driver and demo.(note:The flash sector erase time is 240ms maximum.) * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)add flash_get_capacity() and check flash capacity demo. * **flash** * (TLSR922x/TLSR952x)add new flash GD25LQ32E/GD25LE32E driver and demo. * **core** * wait_condition_fails_or_timeout/wait_condition_fails_or_timeout_with_param:Added the above interface to provide uniform timeout handling for all modules; * **error_handler** * drv_api_status_e:Added enumeration to provide a uniform return state for the new interface; * **trng** * Added timeout mechanism, corresponding new interface trng_hw_reset/trng_set_error_timeout/trng_timeout_handler; * **aes** * Added timeout mechanism, corresponding new interface aes_hw_fsm_reset/aes_set_error_timeout/aes_timeout_handler; * **i2c** * Added timeout mechanism, corresponding new interface i2c_hw_fsm_reset/i2c_set_error_timeout/i2c_get_error_timeout_code/i2c_timeout_handler; * **i2c1_m** * Added timeout mechanism, corresponding new interface i2c1_m_hw_fsm_reset/i2c1_m_set_error_timeout/i2c1_m_get_error_timeout_code/i2c1_m_timeout_handler; * **uart** * Added timeout mechanism, corresponding new interface uart_set_error_timeout/uart_get_error_timeout_code/uart0_timeout_handler/uart1_timeout_handler; * **spi** * Added timeout mechanism, corresponding new interface,spi_set_error_timeout/spi_get_error_timeout_code/lspi_timeout_handler/gspi_timeout_handler/spi_hw_fsm_reset; * **EMI_BQB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Add frequency hopping function for emi_con_tx55(); and emi_con_tx0f(); ### Refactoring * **GPIO_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Optimized GPIO_Demo, merged shared interfaces and added comments. * **gpio** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Updated gpio_shutdown() comment: gpio_shutdown(GPIO_ALL) is not recommended to be used in applications, if it is used it needs to be called with the appropriate pins enabled after the call depending on the application. * **aes** * (TLSR922x/TLSR952x)Removed declaration of aes_rpa_match() from aes.h. * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)The default values for all masks of chip RF are open. For user convenience, It will be turned off in the sys_init function and configured by the user afterwards * **RF_DEMO** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Replace the call to stimer_get_tick() in RF_Demo with rf_stimer_get_tick(). * **AES_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Optimized AES_Demo and standardizes the macro definition names for different modes of AES, added AES_ECB,AES_CBC mode, removed AES_RPA mode. * **USB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)CDC endpoints are configurable and default to USB_EDP4_IN and USB_EDP5_OUT.The CDC sends data using the endpoint busy bit instead of the delay_us to determine if the data is sent to completion. * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Use usb_init() instead of usb_init_interrupt() to initialize the USB. (usbhw_set_eps_en() is required to enable the used endpoints if using the usb_init() interface.) * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Optimized mouse demo and keyboard demo, using matrix keys to trigger the hid report. * **I2C_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Optimized I2C_Demo, standardize the differentiation of different patterns and supplement annotations. * **flash** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Adjusted the parameter type of flash_write_status_midxxxxxxxx() and added parameter error return value for TLSR922x/TLSR952x. * (TLSR922x/TLSR952x)Modify the mspi busy wait code in the flash_send_cmd and flash_is_busy interfaces to call the mspi_wait interface instead. * **mspi** * (TLSR922x/TLSR952x)Modify the mspi_is_busy interface to the mspi_wait interface; Modify the mspi busy waiting code in the mspi_write, mspi_read, and mspi_stop_xip interfaces to call the mspi_wait interface instead. * **analog** * (TLSR922x/TLSR952x)Add timeout handling in the analog_wait interface. * **clock** * (TLSR922x/TLSR952x)Add timeout handling in clock_cal_24m_rc and clock_cal_32k_rc interface. * **project** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Remove the -fshort-wchar compilation option. * **GPIO_DEMO** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) Set the default GPIO_MODE to GPIO_IRQ; Modify the GPIO_HIGH_RESISTOR mode logic to stop while(1). * **EMI_BQB_DEMO** * (TLSR921x/TLSR951x)Since the dcdc mode has been deleted, the relevant codes of dcdc are masked. * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Adjust the fast settle configuration code in bqb to adapt to the new interface. * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) Optimise emi, bqb main.c initialisation part of the code, and also optimise app_emi.c code to adapt to different chips. * **emi** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) Optimise rf_emi_tx_burst_loop and rf_emi_tx_burst_setup interfaces by replacing the payload len in the interface with the macro EMI_TX_PKT_PAYLOAD * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Move emi.c and emi.h to lib file. * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Standardized comments for emi-related functions. * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Optimize the rf_tx_fast_settle_en、rf_tx_fast_settle_dis、rf_rx_fast_settle_en、rf_rx_fast_settle_dis、rf_set_chn related interface. * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Standardized comments for rf-related functions. * **RF_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)add fast settle test demo. * **trng** * (TLSR922x/TLSR952x)trng_init: for timeout mechanism, added a return value in the above interface; * **aes** * (TLSR922x/TLSR952x)aes_encrypt/aes_encrypt_bt_en/aes_decrypt/aes_decrypt_bt_en:for timeout mechanism, added a return value(DRV_API_TIMEOUT) in the above interface; * **i2c** * (TLSR922x/TLSR952x)i2c_master_write/i2c_master_read/i2c_master_write_read:for timeout mechanism, added a return value(DRV_API_TIMEOUT) in the above interface; * **i2c1_m** * (TLSR922x/TLSR952x)aes_encrypt/aes_encrypt_bt_en/aes_decrypt/aes_decrypt_bt_en:for timeout mechanism, added a return value(DRV_API_TIMEOUT) in the above interface; * **uart** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)uart_reset: To better fit the function, name the interface uart_hw_fsm_reset. For compatibility, use the redefine #define uart_reset uart_hw_fms_reset; * (TLSR922x/TLSR952x)uart_send_byte/uart_send_hword/uart_send_word: for timeout mechanism, added a return value in the above interface; * **spi** * (TLSR922x/TLSR952x)spi_master_send_cmd/spi_write/spi_read/spi_master_write/spi_master_write_read/spi_master_write_plus/spi_master_write_repeat/spi_master_write_repeat_plus/spi_master_read_plus/spi_master_write_read_plus: for timeout mechanism, added a return value in the above interface; * **spi demo** * (TLSR922x/TLSR952x)replace the spi_is_busy() interface in no_dma and dma modes with the timeout mechanism spi interface SPI_WAIT_BUSY, and modify the processing logic that uses the spi_master_get_slave_ready() interface (add a timeout condition and handle it); * **display demo** * (TLSR922x/TLSR952x)replace lcd_st7796h2,oledmr69330 spi_is_busy() interface with timeout mechanism spi interface SPI_WAIT_BUSY; * **audio** * (TLSR921x/TLSR951x)The audio codec registers have been changed from using the default value directly to writing the default value again to prevent any functional issues caused by the default value being changed in abnormal situations. * **ALL** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Replace tabs with spaces in all .c and .h files except the chip directory. * **GPIO** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Correct the gpio_get_level() comment. * **ALL_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)In order to improve the flexibility of use, the form #if is no longer used to distinguish between different chips, but #if defined. * **ALG_REG_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) optimizes the variable definition in analog_write_halfword_test() to ensure that halfword data is read and written consistently. ### Performance Improvements * **rf** * (TLSR921x/TLSR951x)The rf_mode_init() function uses DCOC software calibration to minimize the DC offset of the chip. At the same time, turn on the RX secondary filter in BLE S2 and S8 modes to filter out DC offset and noise as much as possible, in order to improve the chip's out of band anti-interference ability (including DC offset). These two operations can restore the sensitivity performance of chips with larger DC offset to the normal range. But it should be noted that opening the secondary filter will reduce the frequency offset resistance range of the chip to within ± 150kHz. * (TLSR922x/TLSR952x)The rf_mode_init() function uses dcoc software calibration to achieve the minimum DC offset for the chip. At the same time, turn on the RX secondary filter in RF modes other than private 250k and 500k to filter out DC offset and noise as much as possible, in order to improve the chip's out of band anti-interference ability (including DC offset). By performing these two operations, the sensitivity performance of chips with larger DC offset can be restored to the normal range, but it is important to note that opening the secondary filter will reduce the frequency offset resistance range of the chip to within ± 150kHz. ### Note * (TLSR922x/TLSR952x)编译工具链从V5.1.1升级为V5.3.0。 - 警告的编译选项统一配置为:-Wall -Wextra -Wshadow -Wimplicit-fallthrough -Wpointer-arith -Wredundant-decls -Wcast-qual -Wsign-compare -Wunused-parameter -Wunused-variable -Wswitch -Wstrict-prototypes -Wmissing-field-initializers -Wdeprecated-declarations -Wenum-conversion -Wpacked-not-aligned -Waddress-of-packed-member -Wundef - 编译,汇编和链接的编译选项统一配置为:-mcpu=d25f -mext-dsp -fomit-frame-pointer -fno-strict-aliasing -std=c99 -fno-jump-tables -fno-fat-lto-objects -fuse-ld=bfd - 解决以下的文件编译报错问题: - demo/vendor/PKE_Demo/B91_B92_PKE_Demo_v1.0.1/PKE_Demo/app_ecdsa.c, app_rsa.c - demo/vendor/UART_DEMO/app_dma.c - demo/vendor/I2C_Demo/app.c, app_dma.c * 清理了以下驱动文件的注释: - chip/B91/drivers: aes.c/aes.h, core.h - chip/B92/drivers: aes.c/aes.h, core.h * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)为了处理编译选项 -fpack-struct 带来的代码移植性问题, 以下文件已经通过向结构体添加编译选项 `__attribute__((packed))` 进行了修改: - demo/vendor/USB_Demo/application/usbstd/CDCClassCommon.h - demo/vendor/USB_Demo/application/rf_frame.h - common/usb_dbg/myudb_usbdesc.h * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)为了让看门狗覆盖的范围更广,代码更安全,在 .S 文件中使能 timer 看门狗,并在 platform_init() 函数中关闭。 * (TLSR922x/TLSR952x)以下模块添加了超时机制:clock/analog/mspi/ic/uart/spi/aes/trng,为兼容起见,如果要使用超时机制,超时默认设置为较大值 (0xffffffff us): - 通过 xxx_set_error_timeout 接口修改超时(有关超时的说明,请参阅接口说明); - 应用程序可以重载 xxx_timeout_handler,以获取相应的异常详细信息(详情请参阅接口说明的注释); * 清理了代码中存在的中文字符,涉及到以下文件: - 3rd-party\freertos-V5\include: task.h. - chip\B92\drivers\lib\include: sys.h - demo\vendor\AUDIO_Demo\AUDIO_V1.1\AUDIO_Demo: app_codec_0581.c - demo\vendor\SPI_Demo\SPI_V1.1\SPI_Demo: app_dma_llp.c ### Bug Fixes * **audio** * (TLSR922x/TLSR952x)修复在44.1k和48k采样率下, amic和line单声道输入数据异常问题,涉及接口 audio_codec_swap_stream0_data。 [3d3f31d9](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1034/diffs?commit_id=3d3f31d94888af0f2242fcef7e8107e729ca6776) * (TLSR922x/TLSR952x)解决了立体声模式时 20bit 音频数据左右声道音量不一致的问题。 [716ead90](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/944/diffs?commit_id=716ead90a4e0184169b082395715481ac358a1bb) * (TLSR922x/TLSR952x)解决了动态切换codec dac采样率后,dac输出异常问题。 [d755dae7](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1086/diffs?commit_id=d755dae7d81454617c3ddc0290cf07cf4a30b17f) * **SPI_Demo** * (TLSR922x/TLSR952x)修复spi no dma模式下SPI_PROTOCOL配置为B91M_SLAVE_PROTOCOL,master端发送数据格式错误,将SPI_MODE_WR_DUMMY_WRITE修改成SPI_MODE_WR_WRITE_ONLY。 [e171fa06](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1013/diffs?commit_id=e171fa060b221eac87bef74edadb3e296890bca2) * **pm** * (TLSR922x/TLSR952x)解决了当函数pm_sleep_wakeup()设置的睡眠时间小于1.62ms时,可能会引起的以下几种问题: 1.进入了睡眠,但睡眠时间不符合预期,约37小时后可以唤醒。 2.如果正好在pm_sleep_wakeup()函数中的pm_clr_all_irq_status()之后,时间到了,会导致plic_clr_all_request()清除不掉,触发软件reboot。 3.如果正好在睡眠的瞬间,时间到了,会导致不进入睡眠,继续执行(当sleep_mode是suspend/deep retention)或者软件reboot(当sleep_mode是deep)。 [bd44c301](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/769/diffs?commit_id=bd44c3017fd31dbb3c0808b5c8bbcb6645f38ea2) * (TLSR922x/TLSR952x)解决了由于在pm_sleep_wakeup()中把VBUS标志位当成唤醒源标志位一样处理可能会引起的问题:即如果在pm_sleep_wakeup()函数中的pm_clr_all_irq_status()之后,VBUS引脚上产生抖动,会导致plic_clr_all_request()清除不掉,触发软件reboot。 [bd44c301](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/769/diffs?commit_id=bd44c3017fd31dbb3c0808b5c8bbcb6645f38ea2) * (TLSR921x/TLSR951x)解决了因为晶振稳定标志位失效导致的死机问题。程序通过读硬件晶振稳定标志位判断是否从24M rc切换到24M xtal,如果使用的晶体起振较慢,晶振标志位ready但是实际晶振没有正常起震,切换到24M XTAL后,程序就会发生死机问题。 [3aa5ca13](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/936/diffs?commit_id=3aa5ca1363a8805e274dccf03320f584ab75e477) * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)进睡眠前恢复寄存器system_up_32k默认值,解决了睡眠时间不准的问题。如果不恢复默认值,system tick会在每个32k沿更新,由于system tick更新不及时,可能会误判XTAL还没有稳定,多判断一次,多执行40us,可能会超过预留的等待时间,而导致睡眠时间不准确。 [e8dc8082](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1078/diffs?commit_id=e8dc80828f0d9050833b55be48764dcce8733a0a) * **sys** * (TLSR922x/TLSR952x)A3芯片有个issue(A4没有这个问题):如果硬件板子上有1.4V dcdc inductor component,并且用1.8V GPIO,则需要在芯片上电之后,尽快设置1P4V为DCDC模式,否则在vdd1v2和vddo3上有个电压脉冲。在S文件中搬代码操作前,配置为DCDC模式,解决这个问题。 [875a487e](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/910/diffs?commit_id=875a487edbb3191372e255369c566f4222d0b74c) * **USB_Demo** * (TLSR922x/TLSR952x)解决了 USB_MICROPHONE 模式下 DMIC0_DMIC1_IN 无法传输 DMIC0 数据的问题。 [716ead90](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/944/diffs?commit_id=716ead90a4e0184169b082395715481ac358a1bb) * **link** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)将_BSS_VMA_END四字节对齐,解决使能S文件中的_FILL_STK功能后,由于_BSS_VMA_END可能没有四字节对齐,存在越界访问超出_STACK_TOP,导致store access fault。 [0e732bce](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/972/diffs?commit_id=0e732bcea2887804489ad6db251a281f26796218) * **Timer_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)Wd_clear()需要在每次调用wd_start()之前执行,避免因为初始计数值不为0导致watchdog复位时间异常。 [20a065ec](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1000/diffs?commit_id=20a065ece53185549c748bf99d5780029def6180) * **spi demo** * (TLSR922x/TLSR952x)修复lspi在中断dma_irq_handler中重复调用gspi_reset。 [bfadf96e](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1009/diffs?commit_id=bfadf96ed151e483bbbbf0da00d9831c8f25d2ef) * **qdec_Demo** * (TLSR922x/TLSR952x)qdec_get_count_value: If the interface is called continuously (with very short intervals), it is possible that the data read is not updated in time and the result is read from the last time。 [ecf387fa](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1064/diffs?commit_id=ecf387fab552255396dd584107535693c01a617d) * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)添加reg_rf_ll_2d_sclk寄存器 bit<0-2>缺失的active状态。 [d7ef39ba](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/1087/diffs?commit_id=d7ef39ba526cdf736cf4ea5b75c79c86366b609c) * **Coremark_demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)修复工程的编译选项,保证CPU跑分正常。 [791247df](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/894/diffs?commit_id=791247df9dba930661b988a44fc55f3898d3c718) * **Dhrystone_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)修复工程的编译选项,保证CPU跑分正常。 [791247df](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/894/diffs?commit_id=791247df9dba930661b988a44fc55f3898d3c718) * **flash** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)修复多次调用flash_write_status_midxxx()导致返回值错误的问题。 [0634358a](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/984/diffs?commit_id=0634358ade7aaedb2939b14c8b4ebb49dfe131ce) * **RF_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)修正了 rf demo 中由于未定义 TX_DELAY_US 而导致的编译报错。 [3fc3d848](http://192.168.48.36/src/driver/telink_b91m_platform_src/merge_requests/904/diffs?commit_id=3fc3d848715b84cdcd763af3613aa4fb99477a86) ### BREAKING CHANGES * **sys** * (TLSR922x/TLSR952x)重构了nop相关的宏定义避免GCC出现堆栈溢出。同时更新了nop相关宏定义的名字,使其更为合理。 * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)在sys_init函数中添加cap参数,用于配置是否需要关闭内部电容。如果开发板已经在外部焊接了电容,那么就需要关掉内部电容;如果开发板没有在外部焊接电容,那么就需要打开内部电容。如果不能对应操作的话,就可能会出现两个电容并联,或者没有电容的情况。这样对晶振的起振时间和晶振的频率影响很大,可能会造成复位、死机等情况发生。 * **pm/clock** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)将系统计时器工作前获取微秒级延迟的方法由nop延迟替换为core_cclk_delay_tick()接口. * **pm** * (TLSR921x/TLSR951x)删除了枚举power_mode_e中的DCDC_1P4_DCDC_1P8。因为供电电压超过3.8V的情况下,使用DCDC_1P8配置,在LDO切换到DCDC时,flash的电压有超出供电范围的风险。 * (TLSR921x/TLSR951x)PM_ANA_REG_WD_CLR_BUF0(0x38),PM_ANA_REG_POWER_ON_CLR_BUF0(0x39)寄存器的所有bit仅供驱动程序使用。 * (TLSR922x/TLSR952x)PM_ANA_REG_WD_CLR_BUF0(0x35),PM_ANA_REG_POWER_ON_CLR_BUF0(0x3a)寄存器的所有bit仅供驱动程序使用。 * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)rf_mode_init()函数中新增了rf rx dcoc软件校准方案来解决部分DC-offset较大的芯片 rx sensitivity性能差的问题,该函数执行时间会变长,具体时间可以查看函数注释。因为使用了软件dcoc的校准方案,所以在fast settle功能中,不需要并且也不允许再用rf_get_dcoc_cal_val和rf_set_dcoc_cal_val进行处理,固删除了上述两个接口,同时删除了结构体rf_dcoc_cal_t; * **flash** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)flash_write_status_midxxxxxxxx,flash_lock_midxxxxxx 和 flash_unlock_midxxxxxx接口增加返回值。 * **stimer** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)删除了接口stimer_enable/stimer_disable。 * **USB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)由于 -fshort-wchar 编译选项移除,使用宽字符返回 usb 字符串描述符不再适用,所以用 usbdesc_get_str()/myudb_usbdesc_get_str() 函数获取 usb 字符串描述符并删除相关的 usb 字符串描述符常量。 * **flash** * (TLSR922x/TLSR952x)flash_write_status_midxxxxxxxx,flash_lock_midxxxxxx 和 flash_unlock_midxxxxxx接口增加返回值。 * **stimer** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)删除了接口stimer_enable/stimer_disable。 * **USB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)由于 -fshort-wchar 编译选项移除,使用宽字符返回 usb 字符串描述符不再适用,所以用 usbdesc_get_str()/myudb_usbdesc_get_str() 函数获取 usb 字符串描述符并删除相关的 usb 字符串描述符常量。 * **rf** * (TLSR921x/TLSR951x)为了方便用户使用,重新封装了fast settle相关的接口,新的代码会影响兼容性,使用方法请注意参照rf_demo,app_fast_settle_test.c (删除rf_get_ldo_trim_val、_set_ldo_trim_val、rf_get_hpmc_cal_val、rf_set_hpmc_cal_val、rf_get_dcoc_cal_val、rf_set_dcoc_cal_val、rf_tx_fast_settle_init、rf_rx_fast_settle_init接口;新增rf_fast_settle_config、rf_tx_fast_settle_update_cal_val、rf_rx_fast_settle_update_cal_val接口) * (TLSR922x/TLSR952x)为了方便用户使用,重新封装了fast settle相关的接口,新的代码会影响兼容性,使用方法请注意参照rf_demo,app_fast_settle_test.c(删除rf_rx_fast_settle_dis、rf_get_ldo_trim_val、rf_set_ldo_trim_val、rf_get_hpmc_cal_val、rf_tx_fast_settle_init、rf_rx_fast_settle_init接口;新增rf_fast_settle_config、rf_tx_fast_settle_update_cal_val、rf_rx_fast_settle_update_cal_val接口) * **calibration** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)删掉了user_read_flash_value_calib(B91)/calibration_func(TLSR922x/TLSR952x)接口中对于打开内部电容的操作。校准接口会调整电压和电容值,所以大多数时候都会调用,但是对于24M晶体使用了外部电容的情况下,如果在调用校准接口时打开内部电容,会造成两个电容并联的情况,影响晶振起振,所以删掉了这个操作。 * **error_handler** * drv_set_error_timeout: 将TIMEOUT_US删除,改为全局变量g_drv_api_error_timeout_us,添加以上接口进行修改,避免使用宏定义导致lib库不能动态修改; * error_code_e:修改为drv_api_error_code_e,为了防止重名; * get_error_code/timeout_handler:修改为drv_get_error_code/drv_timeout_handler,为了防止重名; * **flash_demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x):为了driver sdk实现bin固件保护,删除flash_demo维护的flash_lock/flash_unlock swtich实现方案,为代码简洁以及方便维护,改为添加flash hal层以结构体实现方案,添加hal_flash.c/.h文件,并在platform_init中添加bin固件保护功能. ### Features * **TL721X** * ADC/Analog/CHACHA20_POLY1305/Debug/Flash/GPIO/HASH/I2C/PKE/PM/PWM/QDEC/RF/SKE/SPI/STIMER/TIMER/TRAP/TRNG/UART/USB * **TL321X** * ADC/Analog/Debug/Flash/GPIO/I2C/PWM/QDEC/RF/SKE/SPI/STIMER/TIMER/TRAP/TRNG/UART/USB * **alg_reg** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)删除如下接口:analog_write_reg32_dma、analog_read_reg32_dma、analog_write_buff_dma、analog_read_buff_dma,analog_write_addr_data_dma。因为实际应用不会这样使用dma,并且其他接口已经可以满足需求。 * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)限制analog_write_buff接口数据长度不能超过8个字节。 * **spi** * (TLSR922x/TLSR952x)修复gspi_change_csn_pin和spi_master_config枚举参数不匹配导致编译warning问题,不影响功能 * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)添加了rf_set_rx_dcoc_cali_by_sw接口开关rx DCOC软件校准,以优化rf_mode_init执行时间(该接口在只用tx,不用rx的场景,才可以使用) * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)添加了user_calib_rf_rx_dcoc接口来获取flash中的dcoc校准值 * **flash** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)新增接口:flash_4line_en,flash_4line_dis。 * **USB** * (TLSR921x/TLSR951x)新增 usbhw_set_ep_addr() 接口来设置端点 buffer 分配;usbhw_set_eps_max_size() 接口来设置 IN 端点最大 buffer 大小。 * (TLSR922x/TLSR952x)新增 usbhw_set_eps_max_size() 接口来设置 IN 端点最大 buffer 大小。 * **SDK VERSION** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)新增'tl_check_fw.sh'脚本,编译完代码后打印sdk版本信息。 * **stimer** * (TLSR921x/TLSR951x)增加了接口pm_clr_irq_status/pm_set_wakeup_src/stimer_set_32k_track_cnt/stimer_get_32k_track_cnt/stimer_get_tracking_32k_value。 * (TLSR922x/TLSR952x)增加了接口pm_set_wakeup_src/stimer_set_32k_track_cnt/stimer_get_32k_track_cnt/stimer_get_tracking_32k_value。 * **core** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)新增core.c文件,文件内包括core_cclk_delay_tick接口;新增rdmcycle、core_cclk_delay_tick接口。 * **drivers** * (TLSR922x/TLSR952x)新增文件夹error_handler,包括error_handler.c/error_handler.h文件,文件内包括get_error_code、timeout_handler接口。 * **sys** * (TLSR922x/TLSR952x)增加了接口sys_set_dcdc_1pP4_ldo_2p0,以解决A3上(A4没有)如果硬件板上有1.4V dcdc电感器件且使用1.8V GPIO,则会在vdd1v2和vddo3上产生电压脉冲的问题。 * (TLSR922x/TLSR952x)新增efuse_get_chip_id接口。注:只有A3及以后版本被写入芯片id值。 * **flash** * (TLSR922x/TLSR952x)增加1M flash(GD25LQ80E)驱动。 * (TLSR922x/TLSR952x)添加flash_write_config_mid146085(),并修改flash_lock_mid146085()和flash_unlock_mid146085()以适配二供flash P25Q80SU。 * **sys** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)sys_init和pm_sleep_wakeup函数实现中新增crystal_manual_settle函数以辅助晶振快速起振。 * **pm** * (TLSR921x/TLSR951x)新增pm_set_xtal_stable_timer_param()用于在晶体起振相对较慢时调整设置晶体相关参数。 * **flash** * (TLSR921x/TLSR951x)添加新增flash PY25Q128H驱动和demo.(注意:该flash sector erase时间最大为240ms。) * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)添加flash_get_capacity()和检查flash容量demo。 * **flash** * (TLSR922x/TLSR952x)添加GD25LQ32E/GD25LE32E的驱动和demo。 * **core** * wait_condition_fails_or_timeout/wait_condition_fails_or_timeout_with_param:新增以上接口,为所有模块提供统一的超时处理; * **error_handler** * drv_api_status_e:新增枚举,为后面新增接口提供统一的返回状态; * **trng** * 增加了超时机制,相应的新增了接口trng_hw_reset/trng_set_error_timeout/trng_timeout_handler; * **aes** * 增加了超时机制,相应的新增了接口aes_hw_fsm_reset/aes_set_error_timeout/aes_timeout_handler; * **i2c** * 增加了超时机制,相应的新增了接口i2c_hw_fsm_reset/i2c_set_error_timeout/i2c_get_error_timeout_code/i2c_timeout_handler; * **i2c1_m** * 增加了超时机制,相应的新增了接口i2c1_m_hw_fsm_reset/i2c1_m_set_error_timeout/i2c1_m_get_error_timeout_code/i2c1_m_timeout_handler; * **uart** * 增加了超时机制,相应的新增了接口uart_set_error_timeout/uart_get_error_timeout_code/uart0_timeout_handler/uart1_timeout_handler; * **spi** * 增加了超时机制,相应的新增了接口spi_set_error_timeout/spi_get_error_timeout_code/lspi_timeout_handler/gspi_timeout_handler/spi_hw_fsm_reset; * **EMI_BQB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)emi_con_tx55();emi_con_tx0f();增加跳频功能 ### Refactoring * **GPIO_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)优化了GPIO_Demo,合并共用接口并补充注释。 * **gpio** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)更新了gpio_shutdown()的注释:gpio_shutdown(GPIO_ALL)不建议在应用程序中使用,如果使用需要在调用后根据应用启用相应的引脚。 * **aes** * (TLSR922x/TLSR952x)删除了aes.h中的aes_rpa_match函数声明。 * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)芯片rf的所有mask的默认值是打开的,为了方便用户使用,sys_init函数中会将其关掉,后面由用户自行配置 * **RF_DEMO** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)将RF_Demo中调用stimer_get_tick()的地方替换为rf_stimer_get_tick()。 * **AES_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)优化了AES_Demo,规范了AES不同模式的宏定义名称,新增了AES_ECB、AES_CBC模式,删除了AES_RPA模式。 * **USB_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)CDC 端点可配置,默认为 USB_EDP4_IN 和 USB_EDP5_OUT。CDC 发送数据时使用端点忙位而不是 delay_us 来确定数据是否发送完毕。 * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)使用 usb_init() 取代 usb_init_interrupt()来初始化 USB。(如果使用 usb_init() 接口,需要使用 usbhw_set_eps_en() 来使能用到的端点。) * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)优化mouse demo和keyboard demo, 使用矩阵按键触发上报hid report。 * **I2C_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)优化了I2C_Demo,规范不同模式区分并补充注释。 * **flash** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)调整了flash_write_status_midxxxxxxxx接口的参数类型,其中B92新增了参数错误返回值。 * (TLSR922x/TLSR952x)修改flash_send_cmd、flash_is_busy接口中mspi忙碌等待代码,改为调用mspi_wait接口。 * **mspi** * (TLSR922x/TLSR952x)将mspi_is_busy接口修改为mspi_wait接口;修改mspi_write、mspi_read、mspi_stop_xip接口中mspi忙碌等待代码,改为调用mspi_wait接口。 * **analog** * (TLSR922x/TLSR952x)analog_wait接口增加超时处理。 * **clock** * (TLSR922x/TLSR952x)clock_cal_24m_rc、clock_cal_32k_rc接口增加超时处理。 * **project** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)去除 -fshort-wchar 编译选项。 * **GPIO_DEMO** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)将GPIO_MODE默认值设为GPIO_IRQ;修改GPIO_HIGH_RESISTOR模式逻辑,使程序while(1)停住。 * **EMI_BQB_DEMO** * (TLSR921x/TLSR951x)由于已删除dcdc模式,所以注释dcdc相关代码。 * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)调整bqb中fast settle配置代码,适配新的接口。 * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)优化emi、bqb main.c初始化部分代码,同时优化app_emi.c代码,以适配不同芯片。 * **emi** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)优化rf_emi_tx_burst_loop和rf_emi_tx_burst_setup接口,将接口中的payload len替换成宏EMI_TX_PKT_PAYLOAD * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)将emi.c emi.h移动到lib文件中。 * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)规范了emi相关函数的注释 * **rf** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)优化rf_tx_fast_settle_en、rf_tx_fast_settle_dis、rf_rx_fast_settle_en、rf_rx_fast_settle_dis、rf_set_chn相关接口。 * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)规范了rf相关函数的注释. * **RF_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)增加fast settle 测试demo。 * **trng** * (TLSR922x/TLSR952x)trng_init:为了超时机制,在以上接口中添加了返回值; * **aes** * (TLSR922x/TLSR952x)aes_encrypt/aes_encrypt_bt_en/aes_decrypt/aes_decrypt_bt_en:为了超时机制,在以上接口中新增了返回值DRV_API_TIMEOUT; * **i2c** * (TLSR922x/TLSR952x)i2c_master_write/i2c_master_read/i2c_master_write_read:为了超时机制,在以上接口中新增了返回值DRV_API_TIMEOUT; * **i2c1_m** * (TLSR922x/TLSR952x)i2c1_m_master_write/i2c1_m_master_read/i2c1_m_master_write_read:为了超时机制,在以上接口中新增了返回值DRV_API_TIMEOUT; * **uart** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)uart_reset:为了更贴合功能,将该接口命名为uart_hw_fsm_reset,为了兼容性,使用重定义#define uart_reset uart_hw_fms_reset; * (TLSR922x/TLSR952x)uart_send_byte/uart_send_hword/uart_send_word:为了超时机制,在以上接口中增加了返回值; * **spi** * (TLSR922x/TLSR952x)spi_master_send_cmd/spi_write/spi_read/spi_master_write/spi_master_write_read/spi_master_write_plus/spi_master_write_repeat/spi_master_write_repeat_plus/spi_master_read_plus/spi_master_write_read_plus:为了超时机制,在以上接口中增加了返回值; * **spi demo** * (TLSR922x/TLSR952x)将no_dma和dma模式下的spi_is_busy()接口替换成超时机制spi接口SPI_WAIT_BUSY,并修改使用到spi_master_get_slave_ready()接口的处理逻辑(添加超时情况并进行处理); * **display demo** * (TLSR922x/TLSR952x)将lcd_st7796h2,oledmr69330 spi_is_busy()接口替换成超时机制spi接口SPI_WAIT_BUSY; * **audio** * (TLSR921x/TLSR951x)audio codec 相关寄存器,将原来直接使用默认值改成再写一下默认值,防止异常情况下,默认值被改导致功能出现问题。 * **ALL** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)除 chip 目录外,将其他所有 .c 和 .h 文件中的 tab 替换为 4 个空格。 * **GPIO** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)更正 gpio_get_level() 注释。 * **ALL_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x)为了提高使用的灵活性,区分不同芯片时不再使用#if的形式,改为#if defined。 * **ALG_REG_Demo** * (TLSR921x/TLSR951x/TLSR922x/TLSR952x) 优化了analog_write_halfword_test()中的变量定义,确保halfword数据读写一致。 ### Performance Improvements * **rf** * (TLSR921x/TLSR951x)rf_mode_init()函数使用dcoc 软件校准来使芯片获得最小的DC-offset,同时在BLE S2 S8模式下打开RX二级滤波器将DC-offset和噪声尽可能滤掉 ,以此来提高芯片的带外抗干扰能力(干扰包括DC-offset)。通过这两个操作可以将DC-offset较大的芯片sensitivity性能恢复到正常范围,但需要注意开二级滤波器会将芯片的抗频偏范围缩小到±150kHz以内。 * (TLSR922x/TLSR952x)rf_mode_init()函数使用dcoc 软件校准来使芯片获得最小的DC-offset,同时在除了private 250k和500k的RF模式下打开RX二级滤波器,将DC-offset和噪声尽可能滤掉 ,以此来提高芯片的带外抗干扰能力(干扰包括DC-offset)。通过这两个操作可以将DC-offset较大的芯片sensitivity性能恢复到正常范围,但需要注意开二级滤波器会将芯片的抗频偏范围缩小到±150kHz以内。
最后提交信息为:
Merge branch 'kun.he_sdk_release_20240628' into 'master'
下载
请输入验证码,防止盗链导致资源被占用
取消
下载