1/*********************************************************************************************************//** 2 * @file Release_Notes.txt 3 * @version V1.14.3 4 * @date 2024-11-29 5 * @brief The Release notes of HT32 Firmware Library. 6 ************************************************************************************************************* 7 * @attention 8 * 9 * Firmware Disclaimer Information 10 * 11 * 1. The customer hereby acknowledges and agrees that the program technical documentation, including the 12 * code, which is supplied by Holtek Semiconductor Inc., (hereinafter referred to as "HOLTEK") is the 13 * proprietary and confidential intellectual property of HOLTEK, and is protected by copyright law and 14 * other intellectual property laws. 15 * 16 * 2. The customer hereby acknowledges and agrees that the program technical documentation, including the 17 * code, is confidential information belonging to HOLTEK, and must not be disclosed to any third parties 18 * other than HOLTEK and the customer. 19 * 20 * 3. The program technical documentation, including the code, is provided "as is" and for customer reference 21 * only. After delivery by HOLTEK, the customer shall use the program technical documentation, including 22 * the code, at their own risk. HOLTEK disclaims any expressed, implied or statutory warranties, including 23 * the warranties of merchantability, satisfactory quality and fitness for a particular purpose. 24 * 25 * <h2><center>Copyright (C) Holtek Semiconductor Inc. All rights reserved</center></h2> 26 ************************************************************************************************************/ 27 28// Supported Device 29// ======================================== 30// HT32F50020, HT32F50030 31// HT32F50220, HT32F50230 32// HT32F50231, HT32F50241 33// HT32F50343 34// HT32F50431, HT32F50441 35// HT32F50442, HT32F50452 36// HT32F52220, HT32F52230 37// HT32F52231, HT32F52241 38// HT32F52234, HT32F52244 39// HT32F52243, HT32F52253 40// HT32F52331, HT32F52341 41// HT32F52342, HT32F52352 42// HT32F52344, HT32F52354 43// HT32F52357, HT32F52367 44// HT32F53231, HT32F53241 45// HT32F53242, HT32F53252 46// HT32F54231, HT32F54241 47// HT32F54243, HT32F54253 48// HT32F57331, HT32F57341 49// HT32F57342, HT32F57352 50// HT32F59041, HT32F59741 51// HT32F59045 52// HT32F59746 53// HT32F5826, HT32F5828 54// HT32F0006 55// HT32F0008 56// HT32F52142 57// HT32F61030, HT32F61041 58// HT32F61052 59// HT32F61141 60// HT32F61244, HT32F61245 61// HT32F61352 62// HT32F61355, HT32F61356, HT32F61357 63// HT32F61630, HT32F61641 64// HT32F61730, HT32F61741 65// HT32F62030, HT32F62040, HT32F62050 66// HT32F65230, HT32F65240 67// HT32F65232 68// HT32F66242, HT32F66246 69// HT32F67041, HT32F67051 70// HT32F67232 71// HT32F67233 72// HT32F67741 73// HT32F67742 74// HT50F32002, HT50F32003 75// HT50F3200S, HT50F3200T 76// HF5032 77// MXTX6306 78// MXTX52231, MXTX52352 79// NW32F61242 80 81/*----------------------------------------------------------------------------------------------------------*/ 82/* HT32_STD_5xxxx_FWLib_V1.14.3_8294 */ 83/*----------------------------------------------------------------------------------------------------------*/ 84 Release Date: 2024-11-29 85 Main Changes 86 + Add new device support. 87 - HT32F61052 88 89 Others 90 + Update comment, format, typing error, and coding style. 91 92/*----------------------------------------------------------------------------------------------------------*/ 93/* HT32_STD_5xxxx_FWLib_V1.14.2_8286 */ 94/*----------------------------------------------------------------------------------------------------------*/ 95 Release Date: 2024-11-26 96 Main Changes 97 + Add example support of HT32F65232. 98 + Fix "ADC/OneShot_SWTrigger/ht32f5xxxx_01_it.h" parameter error. 99 - Rename "ADC_IRQHandler" to "HTCFG_ADC_IRQHandler" 100 + Add the "DISABLE_BOOTPIN_OUTPUT" definition in "CKCU/Clock_Configuration/ht32_board_config.h" to prevent 101 circuit conflicts on certain development boards. 102 - HT32F65232_DVB 103 - HT32F66242_DVB 104 - HT32F66246_DVB 105 + Modify the "OPA/OPA_Enable" example to use a single OPA and add "ht32_board_config.h". 106 + Add the "LED_HIGH_ACTIVE" definition to the following files and Fix "ht32f5xxxx_board_01.c" to align with 107 the LED circuit on the development board: 108 - bm18b367a_dvb.h 109 - bm53b367a_dvb.h 110 - ht32f65232_dvb.h 111 - ht32f65240_dvb.h 112 - ht32f66242_dvb.h 113 - ht32f66246_dvb.h 114 115 Others 116 + Update comment, format, typing error, and coding style. 117 118/*----------------------------------------------------------------------------------------------------------*/ 119/* HT32_STD_5xxxx_FWLib_V1.14.1_8273 */ 120/*----------------------------------------------------------------------------------------------------------*/ 121 Release Date: 2024-11-08 122 Main Changes 123 + Add new device support. 124 - HT32F66242, HT32F66246 125 + Add new IP drivers. 126 - Programmable Gain Amplifier, "ht32f65xxx_66xxx_pga.c/h" 127 - Coordinate Rotation Digital Computer, "ht32f66xxx_cordic.c/h" 128 - Proportion Integration Differentiation driver, "ht32f66xxx_pid.c/h" 129 + Add new examples: 130 - "CORDIC/CosSin_Interrupt" 131 - "CORDIC/CosSin_Polling" 132 - "PGA/Comparator" 133 - "PGA/Inverting" 134 - "PGA/InvertingAdder" 135 - "PGA/NonInverting" 136 - "PGA/NonInvertingAdder" 137 - "PGA/VoltageFollower" 138 - "PID/ChangePara_inSameMode" 139 - "PID/Interrupt" 140 - "PID/MultiMode" 141 - "PID/Polling" 142 + Add the "LIBCFG_CKCU_NO_LPCR" definition in "ht32f65230_40_libcfg.h" and "ht32f65232_libcfg.h" to 143 fix the "CKCU_BKISOCmd" the redundant flow of the HT32F65230/65240 and HT32F65232 (related to the Low Power Control). 144 + Add the "LIBCFG_PWRCU_NO_DS2_MODE" definition in "ht32f65230_40_libcfg.h" and "ht32f65232_libcfg.h" to 145 fix the "PWRCU_DeepSleep2()" and "PWRCU_GetDMOSStatus()" the redundant flow 146 of the HT32F65230/65240 and HT32F65232 (related to the Deep-Sleep2 Mode). 147 + Remove the "LIBCFG_PWRCU_NO_PORF" definition in "ht32f65232_libcfg.h" to fix the "PWRCU_DeInit()" 148 missing flow of the HT32F65232 (related to the Power-On Reset Flag). 149 + Change the HTCFG_TIMER_PRESCALER value according to HTCFG_PULSE_SYS_CLK is less 150 than or greater than 60 MHz to ensure that the Counter-Reload value is less than 0xFFFF. 151 - "TM/UpdateEvent" 152 - "TM/SinglePulseMode" 153 - "TM/TriggerCounter" 154 155 Others 156 + Update comment, format, typing error, and coding style. 157 + Change define "LIBCFG_CMP_65x_VER" to "LIBCFG_CMP_65x_66x_VER" for the HT32F65xxx and HT32F66xxx series ICs. 158 + Add "IS_ADC_TRIG_CMP2()" macro, for use to confirm the adc trigger is CMP2 in ht32f65xxx_66xxx_adc.h 159 + Fix the bit position error in the "IS_ADC_INT" macro. 160 + Change define "LIBCFG_TM_652XX_V1" to "LIBCFG_TM_65X_66X_V1" 161 + Change define "LIBCFG_TM_65232" to "LIBCFG_TM_65X_66X_BK_FROM_CMP" and "LIBCFG_TM_65X_66X_RECCDI" 162 163 164/*----------------------------------------------------------------------------------------------------------*/ 165/* HT32_STD_5xxxx_FWLib_V1.13.2_8218 */ 166/*----------------------------------------------------------------------------------------------------------*/ 167 Release Date: 2024-10-23 168 Main Changes 169 + Fix "CAN_Legacy/TxRxLoopback" example compiling error. 170 171 Others 172 + Update comment, format, typing error, and coding style. 173 174/*----------------------------------------------------------------------------------------------------------*/ 175/* HT32_STD_5xxxx_FWLib_V1.13.1_8190 */ 176/*----------------------------------------------------------------------------------------------------------*/ 177 Release Date: 2024-09-24 178 Main Changes 179 + Add new device support. 180 - NW32F61242 181 + Change the CAN IP Driver, switch to the latest designed API. 182 + Add new examples. 183 "CAN/Recv_DATA" 184 "CAN/Recv_Interrupt" 185 "CAN/Recv_Mask_Filter" 186 "CAN/Recv_REMOTE" 187 "CAN/Send_DATA" 188 "CAN/Send_Recv_DATA" 189 "CAN/Send_REMOTE" 190 + Fix "AES_SetKeyTable()" and "AES_SetVectorTable()" Key and Vector index errors, which cause incorrect AES 191 encryption and decryption. 192 + Modify "I2C/7_bit_mode" example, fix pin assignment error of HT32F50343. 193 194 Others 195 + Update comment, format, typing error, and coding style. 196 + Update AES examples. 197 - Change the key, IV, and plain text from hex array to string, making the result easier to compare with 198 online tools. 199 - Add expected cipher text and compare it with the MCU's H/W AES result as an error-proofing mechanism. 200 + Remove device support. 201 - HT32F57541, HT32F57552 202 203/*----------------------------------------------------------------------------------------------------------*/ 204/* HT32_STD_5xxxx_FWLib_V1.12.1_7949 */ 205/*----------------------------------------------------------------------------------------------------------*/ 206 Release Date: 2024-08-08 207 Main Changes 208 + Add new device support. 209 - HT32F57541 210 - HT32F57552 211 + Update "uart_module.c" to fix the UART0 ~ UART3 not work issue of BM53A367A. 212 213 Others 214 + Update comment, format, typing error, and coding style. 215 + Change path of the "Holtek.HT32_DFP.latest.pack". 216 + Minor changes were made to the USBD "HID_Keyboard_Virtual_COM" and "Virtual_COM" examples. 217 218/*----------------------------------------------------------------------------------------------------------*/ 219/* HT32_STD_5xxxx_FWLib_V1.11.1_7908 */ 220/*----------------------------------------------------------------------------------------------------------*/ 221 Release Date: 2024-07-26 222 Main Changes 223 + Add new device support. 224 - HT32F59045 225 - MXTX52231, MXTX52352 226 + Remove device support. 227 - HT32F59046 228 + Rename WDT parameters. 229 - Old Name | New Name 230 - --------------------------------- | ---------------------------- 231 - "MODE0_WDTSHLT_BOTH" | "WDT_SLEEP_HALT_NONE" 232 - "MODE0_WDTSHLT_SLEEP" | "WDT_SLEEP_HALT_DEEPSLEEP" 233 - "MODE0_WDTSHLT_SLEEP" | "WDT_SLEEP_HALT_ALL" 234 + Update below files to support the BMduino shield/module Keil Driver. 235 - Modify :"utilities/bmduino_board.h". 236 - Add :"utilities/bmduino_check.h". 237 + Modify "void StackUsageAnalysisInit(void)". Added parameter "u32 addr" and reimplemented as 238 "void StackUsageAnalysisInit(u32 addr);" 239 + Fix the below examples ADC_IRQHandler define error of HT32F65232 and HT32F65240. 240 - "ADC/AnalogWatchdog" 241 - "ADC/Continuous_Potentiometer" 242 - "ADC/Discontinuous_EXTITrigger" 243 - "ADC/OneShot_PWMTrigger" 244 - "ADC/OneShot_PWMTrigger_with_Delay" 245 - "ADC/OneShot_SWTrigger" 246 + Modify example IO define of HT32F65232. 247 - "ADC/AnalogWatchdog" 248 - "ADC/Continuous_Potentiometer" 249 - "ADC/Discontinuous_EXTITrigger" 250 - "ADC/OneShot_PWMTrigger" 251 - "ADC/OneShot_PWMTrigger_with_Delay" 252 - "ADC/OneShot_SWTrigger" 253 - "ADC/OneShot_TMTrigger_PDMA" 254 255 Others 256 + Update comment, format, typing error, and coding style. 257 + Update ht32f5xxxx_01.h. 258 - Modify the preprocessor define of "__ALIGN4", "__PACKED_H", "__PACKED_F" for old Arm Compiler V6. 259 + Modify "void FLASH_SetRemappingMode(FLASH_Vector FLASH_BOOT_x);". Changed parameter name from 260 "RemapMode" to "FLASH_BOOT_x". 261 + Modify comments to remind users about "Stack Usage Analysis" notification. 262 + Remove redefined "PWRRST_SET" setting in "ht32f5xxxx_pwrcu.c". 263 + Update CKCU API. Enhanced program stability with robustness settings for parameter "PCLKPrescaler" 264 in "CKCU_SetPeripPrescaler(..., CKCU_APBCLKPRE_TypeDef PCLKPrescaler)". 265 + Update I2C Master middleware, improve setting way and fix minor errors. 266 + Update the following middleware to support the BMduino Keil Driver. 267 "utilities/middleware/i2c_master.c" 268 "utilities/middleware/i2c_master.h" 269 "utilities/middleware/spi_module.c" 270 "utilities/middleware/spi_module.h" 271 "utilities/middleware/uart_module.c" 272 "utilities/middleware/uart_module.h" 273 + Update xxTM IP Driver 274 - Remove redundant "TM_ClearOREFConfig()" function. 275 + Update "DAC_Cmd()" of "ht32f5xxxx_dac.c", remove compiler warning of the GNU compiler. 276 277/*----------------------------------------------------------------------------------------------------------*/ 278/* HT32_STD_5xxxx_FWLib_V1.10.1_7761 */ 279/*----------------------------------------------------------------------------------------------------------*/ 280 Release Date: 2024-06-11 281 Main Changes 282 + Add new device support. 283 - HT32F61730, HT32F61741 284 + Add new examples. 285 "ADC/BandgapVoltage" 286 "GPIO/SinkCurrentEnhanced" 287 + Update related files of HT32F59046. 288 + Fix the "USE_HT32_CHIP" ID error of HT32F52244 (change from 33 to 35). 289 + Remove "LIBCFG_GPIO_SINK_CURRENT_ENHANCED" setting error for the following part number. 290 HT32F50431/50441 291 HT32F50442/50452 292 HT32F53231/53241 293 HT32F53242/53252 294 HT32F54231/54241 295 HT32F54243/54253 296 + Change the ADC API, "ADC_VREFOutputCmd()" as "ADC_VREFOutputADVREFPCmd()". 297 + Change the CKCU API, "CKCU_Set_HSIReadyCounter" as "CKCU_SetHSIReadyCounter()". 298 + Add "LIBCFG_GPIO_SINK_CURRENT_ENHANCED" setting of HT32F50020/50030. 299 + Improve the thread-safe capability of "utilities/common/ring_buffer.c". 300 301 Others 302 + Update comment, format, typing error, and coding style. 303 + Update the project file of HT32F61141, change the "ht32f5xxxx_01_usbdconf.h" as ht32f5xxxx_02_usbdconf.h". 304 + Update "SPI_DUALCmd()", "QSPI_QuadCmd()", and "QSPI_DirectionConfig()", make sure the SPI Bus is not busy 305 before changing the settings. 306 307/*----------------------------------------------------------------------------------------------------------*/ 308/* HT32_STD_5xxxx_FWLib_V1.9.2_7624 */ 309/*----------------------------------------------------------------------------------------------------------*/ 310 Release Date: 2024-02-29 311 Main Changes 312 + Add new examples. 313 "Tips/Checksum_CRC16" 314 "Tips/StackOnTop" 315 "USART/LIN_Master" 316 "USART/LIN_Slave" 317 "CAN/TxRxLoopback" 318 + Add "LIBCFG_CMP_IVREF_CN_IN" define of the following parts, to fix the comparator function/feature 319 missing (select VREF as inverted input). 320 - HT32F50442/50452/53242/53252. 321 + Add HT32 Stack Usage Analysis feature. 322 - Modify "ht32f5xxxx_conf.h", add "HTCFG_STACK_USAGE_ANALYSIS" setting for enabling HT32 Stack Usage 323 Analysis. 324 - Update project templates and "ht32_cm0plus_misc.c/.h", add "StackUsageAnalysisInit()" function to 325 initialize stack. 326 - Update project files, add HT32 Stack Usage Analysis component viewer. 327 + Update and sync "startup_ht32f5xxxx_nn.s" for the "Stack On Top" and "Stack Usage Analysis" feature. 328 + Add "USE_LIBCFG_RAM_SIZE" define in Keil project files for the "Stack On Top" feature. 329 + Modify "ht32f5xxxx_01.h", fix the MCTM alias mismatch. 330 - "MCTMn_IRQHandler" alias from "MCTM0_G_IRQHandler" to "MCTM0_UP_IRQHandler" 331 + Update related middleware (eeprom_emulation and spi_module). 332 333 Others 334 + Update comment, format, typing error, and coding style. 335 + Update e-Link32 Pro/Lite Command line tool as "V1.20" ("utilities/elink32pro/eLink32pro.exe"). 336 + Update "TM/PWM_Buzzer/buzzer_pwm.c" to remove redefine alias (they are also defined in "ht32f5xxxx_01.h.). 337 + Update Keil after build setting, add double quotes (") in the command to prevent space in the path issues. 338 + Remove "ht32_board_config.h" from the "PDMA/SoftwareTrigger" example. 339 340/*----------------------------------------------------------------------------------------------------------*/ 341/* HT32_STD_5xxxx_FWLib_V1.9.1_7446 */ 342/*----------------------------------------------------------------------------------------------------------*/ 343 Release Date: 2023-12-22 344 Main Changes 345 + Add example support of BM18B367A DVB. 346 + Add "system_ht32f5xxxx_18.c" for BM18B367A DVB. 347 + Update "ht32f5xxxx_aes.c/h", changed API parameter 4 bytes to remove type conversion at driver layer. 348 + Update example, add "__ALIGN4" to variables and enforced type conversion for 4 bytes read/write API calls. 349 - "AES/CBC" 350 - "AES/CTR" 351 - "AES/ECB" 352 + Update USB example, add the process of detecting USB bus status before USBDCore_LowPower(). 353 - "CKCU/HSI_AutoTrim_By_USB" 354 - "USBD/*" 355 + Update USART example for BM18B367A DVB, add the HSI auto trim by LSE related flow. 356 - "USART/Interrupt" 357 - "USART/Interrupt_FIFO" 358 - "USART/PDMA" 359 - "USART/Polling" 360 - "USART/Retarget" 361 - "USART/RS485_NMM_Slave" 362 363 Others 364 + Update comment, format, typing error, and coding style. 365 366/*----------------------------------------------------------------------------------------------------------*/ 367/* HT32_STD_5xxxx_FWLib_V1.8.1_7371 */ 368/*----------------------------------------------------------------------------------------------------------*/ 369 Release Date: 2023-12-06 370 Main Changes 371 + Update "ht32f5xxxx_usbd.c", fix the USB buffer unaligned handling mechanism. 372 + Update "ht32f5xxxx_rtc.c", modify the RTC_LSECmd() related flow. 373 + Fix example IO define error of BM53A367A DVB. 374 - "I2C/PDMA" 375 + Update example IO define for the latest version of BM53A367A DVB. 376 - "TM/MatchOutputToggle" 377 - "TM/PWM" 378 + Update "ht32f5xxxx_adc.c" and "ht32f65xxx_66xxx_adc.c" to modify the ADC enable related flow. 379 380 Others 381 + Update comment, format, typing error, and coding style. 382 383/*----------------------------------------------------------------------------------------------------------*/ 384/* HT32_STD_5xxxx_FWLib_V1.7.1_7327 */ 385/*----------------------------------------------------------------------------------------------------------*/ 386 Release Date: 2023-11-01 387 Main Changes 388 + Fix example IO define conflict with LED1 of HT32F57352 Starter Kit. 389 - "CMP/ComparatorInterrupt" 390 + Fix example IO define error of HT32F50441. 391 - "MCTM/ComplementaryOutput" 392 + Update "ht32f5xxxx_ckcu.c", modify the HSI Auto Trim initial function related flow. 393 + Update "ht32f5xxxx_adc.c" and "ht32f65xxx_66xxx_adc.c", modify the ADC enable related flow. 394 + Update "ht32_op.c" and "ht32_op.s" to support new version of bootloader waiting time setting address. 395 (The setting address is changed from 0x1FF0002C to 0x1FF0004C) 396 + Add "ht32_op_V107.c" and "ht32_op_V107.s" to support the use of older versions of bootloader. 397 398 Others 399 + Update comment, format, typing error, and coding style. 400 + Modify and check the example supportability of each IC. 401 + Add the below file, for the BMduino shield. 402 - "ht32_undef_IP.h" 403 404/*----------------------------------------------------------------------------------------------------------*/ 405/* HT32_STD_5xxxx_FWLib_V1.6.2_7271 */ 406/*----------------------------------------------------------------------------------------------------------*/ 407 Release Date: 2023-10-03 408 Main Changes 409 + Add example support. 410 - HT32F53231/41, HT32F53242/52 411 - HT32F50431/41, HT32F50442/52 412 - HT32F52234/44 413 + Fix example IO define error of HT32F52367. 414 - "USBD/Mass_Storage" 415 + Modify the example below, add volatile qualifier on some variables (in the for loop usage) 416 to fix the Arm Compiler Version 6 optimization issue. 417 ("u32" to "vu32", unsigned int to volatile unsigned int). 418 - "FMC/FLASH_Security" 419 + Modify the example below, change the timer used from GPTM to BFTM to increase support. 420 - "PDMA/SoftwareTrigger" 421 + Add the below folder, For the BMduino shield/module Keil Driver. 422 - "BestModules" 423 424 Others 425 + Update comment, format, typing error, and coding style. 426 + Adjust "LIBCFG_xxxxx" definition below. 427 New: 428 "LIBCFG_ADC_IVREF_DEFAULT_08V" 429 430/*----------------------------------------------------------------------------------------------------------*/ 431/* HT32_STD_5xxxx_FWLib_V1.6.1_7190 */ 432/*----------------------------------------------------------------------------------------------------------*/ 433 Release Date: 2023-08-31 434 Main Changes 435 + Add new device support. 436 - HT32F61030, HT32F61041 437 - HT32F50431, HT32F50441, HT32F50442, HT32F50452 438 - HT32F53231, HT32F53241, HT32F53242, HT32F53252 439 + Add Controller Area Network driver, "ht32f5xxxx_can.c/h". 440 + Add new "CAN/FIFO" example. 441 442 Others 443 + Update comment, format, typing error, and coding style. 444 + Update "project_template/Script" for adding project C++ source files and setting the chip model mechanism. 445 - The updated files are as follows: 446 "Script/_ProjectSource.bat" 447 "Script/_ProjectSource.ini" 448 + Update "project_template/Script" for improving script mechanism. 449 - The updated files are as follows: 450 "Script/_CreateProjectConfScript.bat" 451 "Script/_CreateProjectScript.bat" 452 "Script/_ht32_ic_name.ini" 453 454/*----------------------------------------------------------------------------------------------------------*/ 455/* HT32_STD_5xxxx_FWLib_V1.5.1_7084 */ 456/*----------------------------------------------------------------------------------------------------------*/ 457 Release Date: 2023-08-01 458 Main Changes 459 + Add new device support. 460 - HT32F52234, HT32F52244 461 + Modify DAC related define (The left side old one is still kept for backward compatible). 462 - HT_DAC -> HT_DAC0 463 - AFIO_FUN_DAC -> AFIO_FUN_DAC0 464 - CKCU_PCLK_DAC -> CKCU_PCLK_DAC0 465 + Modify API as below, add parameter "HT_DAC_TypeDef* HT_DACn" to select DAC engine from the DAC peripherals. 466 Old API 467 - DAC_DeInit(void) 468 - DAC_ModeConfig(u8 ModeSel) 469 - DAC_ReferenceConfig(u8 DAC_Ch, u32 RefSel) 470 - DAC_ResolutionConfig(u8 DAC_Ch, u32 ResoSel) 471 - DAC_OutBufCmd(u8 DAC_Ch, ControlStatus NewState) 472 - DAC_Cmd(u8 DAC_Ch, ControlStatus NewState) 473 - DAC_SetData(u8 DAC_Ch, u32 Data) 474 - DAC_GetOutData(u8 DAC_Ch) 475 New API 476 - DAC_DeInit(HT_DAC_TypeDef* HT_DACn) 477 - DAC_ModeConfig(HT_DAC_TypeDef* HT_DACn, u8 ModeSel) 478 - DAC_ReferenceConfig(HT_DAC_TypeDef* HT_DACn, u8 DAC_Ch, u32 RefSel) 479 - DAC_ResolutionConfig(HT_DAC_TypeDef* HT_DACn, u8 DAC_Ch, u32 ResoSel) 480 - DAC_OutBufCmd(HT_DAC_TypeDef* HT_DACn, u8 DAC_Ch, ControlStatus NewState) 481 - DAC_Cmd(HT_DAC_TypeDef* HT_DACn, u8 DAC_Ch, ControlStatus NewState) 482 - DAC_SetData(HT_DAC_TypeDef* HT_DACn, u8 DAC_Ch, u32 Data) 483 - DAC_GetOutData(HT_DAC_TypeDef* HT_DACn, u8 DAC_Ch) 484 + Add API as below. 485 - "USART_LIN_SendBreak()" API for the USART/UART LIN mode send break to Tx. 486 - "USART_LIN_LengthSelect()" API for the USART/UART LIN mode configure the break detection length. 487 - "CKCU_Set_HSIReadyCounter" API for set HSI ready counter value. 488 489 Others 490 + Update comment, format, typing error, and coding style. 491 + Rename "LIBCFG_xxxxx" definition below. 492 - "LIBCFG_DAC" to "LIBCFG_DAC0" 493 + Add HT32F61630/HT32F61641 related files for Create Project. 494 495/*----------------------------------------------------------------------------------------------------------*/ 496/* HT32_STD_5xxxx_FWLib_V1.4.3_7026 */ 497/*----------------------------------------------------------------------------------------------------------*/ 498 Release Date: 2023-07-17 499 500 Main Changes 501 + Add new device support. 502 - HT32F59046, HT32F59746 503 504 Others 505 + Update comment, format, typing error, and coding style. 506 + Update and sync startup.s/system.c files. 507 508/*----------------------------------------------------------------------------------------------------------*/ 509/* HT32_STD_5xxxx_FWLib_V1.4.2_6992 */ 510/*----------------------------------------------------------------------------------------------------------*/ 511 Release Date: 2023-06-20 512 513 Main Changes 514 + Add new device support. 515 - HT32F61630, HT32F61641 516 - HT32F62030, HT32F62040, HT32F62050 517 - HT32F67742 518 + Modify "RETARGET_Configuration()", add the operation of UxARTn peripheral clock enable. 519 + Update and sync "ht32f5xxxx_conf.h", modify related define of UxARTn retarget port. 520 521 Others 522 + Update comment, format, typing error, and coding style. 523 524/*----------------------------------------------------------------------------------------------------------*/ 525/* HT32_STD_5xxxx_FWLib_V1.4.1_6948 */ 526/*----------------------------------------------------------------------------------------------------------*/ 527 Release Date: 2023-05-19 528 529 Main Changes 530 + Add new device support. 531 - HT50F3200S, HT50F3200T 532 + Add example support of HT32F67233. 533 + Add new "GPIO/PinLock" example. 534 + Add "Project or Target File Clearing" functions ("_ClearProject.bat" and "_ClearTarget.bat"). 535 + Rename "ht32f652xx_opa.c/h" to "ht32f65xxx_66xxx_opa.c/h". 536 + Rename "ht32f652xx_adc.c/h" to "ht32f65xxx_66xxx_adc.c/h". 537 + Add "ht32f652xx_opa.c/h" and "ht32f652xx_adc.c/h" for backward compatible. 538 + Modify "ht32_time.h", "ht32f5xxxx_conf.h" and "ht32_time_conf.h" for "LIBCFG_CKCU_NO_APB_PRESCALER" series. 539 - To ensure the correct configuration of the timer clock, the "HTCFG_TIME_PCLK_DIV" is redefined as 0. 540 + Modify "syscall.c" to prevent redundant initialization of the heap index. 541 + Modify the examples below, use separate "if" statements instead of "if-else" to avoid double-entry ISR. 542 - "PWRCU/DeepSleepMode1" 543 - "PWRCU/DeepSleepMode2" 544 + Modify "ht32f5xxxx_01.h" below, ensure the defined register naming to be consistent with the document. 545 Old New 546 ----- ----- 547 - HT_OPA_TypeDef 548 "OFR" to "VOS" 549 "VALR" to "DAC" 550 - HT_CMP_TypeDef 551 "ICR" to "CI" 552 "OCR" to "CO" 553 554 Others 555 + Update comment, format, typing error, and coding style. 556 + Update e-Link32 Pro/Lite Command line tool as "V1.19" ("utilities/elink32pro/eLink32pro.exe"). 557 + Update the LVDS setting method of "example\PWRCU\BOD_LVD" example ht32_board_config.h file. 558 + Update "system_ht32f5xxxx_nn.c" and "startup_ht32f5xxxx_nn.s" files. 559 + Modify "_ProjectConfigScript.bat" to prevent the creation of project that copy unused system/startup files. 560 + Modify the Sourcery G++ Lite toolchain project. 561 - Set C99 mode to fix issues after updating CMSIS v5.9.0 ("for" loop initial declarations). 562 + Modify and check the startup_ht32fxxxxx_nn files, fix _HT32FWID more than one digit problem. 563 + Adjust "LIBCFG_xxxxx" definition below. 564 New: 565 "LIBCFG_ADC_NO_OFFSET_REG" 566 Rename: 567 "LIBCFG_CMP_OCR" to "LIBCFG_CMP_CO" 568 569/*----------------------------------------------------------------------------------------------------------*/ 570/* HT32_STD_5xxxx_FWLib_V1.3.4_6737 */ 571/*----------------------------------------------------------------------------------------------------------*/ 572 Release Date: 2023-02-17 573 574 Main Changes 575 + Add example support of HT32F61244, HT32F61245. 576 + Modify the example below, add volatile qualifier on some variables (in the for loop usage) 577 to fix the Arm Compiler Version 6 optimization issue. 578 ("u32" to "vu32", unsigned int to volatile unsigned int). 579 - "PWRCU/PowerDown_WAKEUPPin" 580 - "PWRCU/PowerDown_RTC" 581 - "TM/PWM" 582 583 Others 584 + Update comment, format, typing error, and coding style. 585 + Change the default RTC clock as LSI for the "PWRCU/PowerDownMode" example. 586 + Add the pin group of QSPI in "ht32f61245_sk.h". 587 + Add "ht32_board_config.h" for the "SYSTICK/DelayMicrosecond" example. 588 589/*----------------------------------------------------------------------------------------------------------*/ 590/* HT32_STD_5xxxx_FWLib_V1.3.3_6685 */ 591/*----------------------------------------------------------------------------------------------------------*/ 592 Release Date: 2023-01-18 593 594 Main Changes 595 + Add new device support. 596 - HT32F61244, HT32F61245, HT32F67233 597 + Add new examples: 598 - "SRAM_Overwrite/Watchpoint_Heap" 599 - "SRAM_Overwrite/Watchpoint_Stack" 600 + Update "ht32f5xxxx_conf.h" for user layer HSE_VALUE setting. 601 + Update "ht32f5xxxx_midi.c/.h" for HT32F0006/61355/61356/61357/61244/61245. 602 + Add "PDMA_MIDI_IN", "PDMA_MIDI_OUT" define. 603 + Fix "MAX_EP_NUM" define error of HT32F61141. 604 + Update "SPI/PDMA" example, fix the function call order as below. The "SPI_SELOutputCmd()" shall be called 605 before the "SPI_Cmd()", to prevent SPI Master Mode Fault (MF) error if Chip Select pin did not have 606 an external pull-up. 607 "SPI_SELOutputCmd(HTCFG_SPIS_PORT, ENABLE);" 608 "SPI_Cmd(HTCFG_SPIS_PORT, ENABLE);" 609 610 Others 611 + Update comment, format, typing error, and coding style. 612 + Update and sync startup.s/system.c files. 613 + Modify "system_ht32fxxxxx_nn.c", add HSE_VALUE notice and update PLL Out formula. 614 + Update EEPROM Emulation middleware, improve efficacy and reduce resource usage. 615 "utilities/middleware/eeprom_emulation.c" 616 "utilities/middleware/ht32_eeprom_config_templet.h" 617 + Update I2C Master middleware, improve setting way and fix minor errors. 618 "utilities/middleware/i2c_master.c/.h" 619 "utilities/middleware/i2c_master_config_templet.h" 620 621/*----------------------------------------------------------------------------------------------------------*/ 622/* HT32_STD_5xxxx_FWLib_V1.3.2_6448 */ 623/*----------------------------------------------------------------------------------------------------------*/ 624 Release Date: 2022-11-15 625 626 Main Changes 627 + Add new examples: 628 - "ADC/ADC_InternalReferenceVoltage_SWTriggerr" 629 + Add "LIBCFG_ADC_TRIG_DELAY" define to support "ADC_TrigDelayConfig" function for HT32F65230/65240. 630 + Update "ADC_24bit/Convert_Interrupt" example, fix "I2CMaster_Typedef" structure variable error (correct 631 "uTimeout_ms" to "uTimeout_us") of "ADC24_WriteRegNonBlock()" and "ADC24_ReadRegNonBlock()". 632 + Update "ht32_time.h", fix a formula error of "TIME_TICK2US()" and "TIME_TICK2MS()" macro. 633 + Modify "ht32_retarget.c", fix retarget can't work when the MicroLIB is not used in Keil's V6 compiler. 634 635 Others 636 + Upgrade CMSIS to v5.9.0. 637 + Update "ht32_op.s/c", allow "Bootloader Waiting Time" function for all series. 638 + Modify "HT32F5xxxx_01_DebugSupport.ini" content. 639 640/*----------------------------------------------------------------------------------------------------------*/ 641/* HT32_STD_5xxxx_FWLib_V1.3.1_6405 */ 642/*----------------------------------------------------------------------------------------------------------*/ 643 Release Date: 2022-10-28 644 645 Main Changes 646 + Add new device support. 647 - HT32F50020, HT32F50030 648 + GPIO 649 - Add new define "GPIO_PIN_NUM_n" for GPIO pin number (n = 0 ~ 15). 650 + EXTI 651 - Add "gEXTIn_IRQn[]" and "EXTI_GetIRQn()"" macro to map GPIO pin number (0 ~ 15) to "EXTIn_IRQn". 652 - Add "GPIO2EXTI()"" macro to map GPIO pin to EXTI Channel. 653 - Change "AFIO_EXTISourceConfig()"" API, remove "AFIO_EXTI_CH_Enum" and "AFIO_ESS_Enum". 654 Old: void AFIO_EXTISourceConfig(AFIO_EXTI_CH_Enum AFIO_EXTI_CH_n, AFIO_ESS_Enum AFIO_ESS_Px) 655 New: void AFIO_EXTISourceConfig(u32 GPIO_PIN_NUM_n, u32 GPIO_Px) 656 + LEDC 657 - Fix typing error of the following define. 658 Old New 659 ------------- ---------------- 660 LEDC_FLAG_FEAME LEDC_FLAG_FRAME 661 LEDC_INT_FEAME LEDC_INT_FRAME 662 + Fix the error that "TM_DeInit(HT_PWM2)" not works. 663 + Add new examples: 664 - "ADC/OneShot_SWTrigger" 665 + Rename examples as below. 666 IP Old Name New Name 667 -------- -------- -------- 668 ADC InternalReferenceVoltage InternalReferenceVoltage_PWMTrigger 669 + Modify "EXTI/WakeUp_SleepMode" example, fix "EXTIn_IRQHandler()" ISR naming error of "ht32f5xxxx_01_it.c" 670 (HT32F652xx). 671 672 Others 673 + Update comment, format, typing error, and coding style. 674 + Update and sync startup.s/system.c files. 675 + Modify API parameter check macro of Library Debug Mode, fix parameter check error. 676 + Modify variable declaration of "PDMACH_InitTypeDef" to reduce memory size. 677 + Add a setting, "HT32_LIB_ENABLE_GET_CK_ADC" to control "ADC0_Freq/ADC1_Freq" calculation of the 678 "CKCU_GetClocksFrequency()" function (default off for code size consideration). 679 680/*----------------------------------------------------------------------------------------------------------*/ 681/* HT32_STD_5xxxx_FWLib_V1.2.1_6192 */ 682/*----------------------------------------------------------------------------------------------------------*/ 683 Release Date: 2022-09-30 684 685 Main Changes 686 + Add new device support. 687 - HT32F67232 688 - HT32F67041, HT32F67051 689 + Add the following API for PDMA. 690 - "PDMA_DeInit()" 691 - "PDMA_AddrConfig()" 692 - "PDMA_SrcAddrConfig()" 693 - "PDMA_DstAddrConfig()" 694 - "PDMA_GetRemainBlkCnt()" 695 + Add the following API for ADC (HT32F652xx only). 696 - "ADC_ChannelDataAlign()" 697 - "ADC_ChannelOffsetValue()" 698 - "ADC_ChannelOffsetCmd()" 699 + Add the following API for OPA (HT32F652xx only). 700 - "OPA_SetUnProtectKey()" 701 - "OPA_ProtectConfig()" 702 + Update "OPA/OPA_Enable" example, add the un-protect key related functions. 703 + Update "FLASH_SetWaitState()" function, disable Pre-fetch and Branch Cache function before change 704 wait state. 705 + Fix "HT_ADC->OFR" define error of HT32F65232. 706 + Update "ht32_retarget.c", modify the retarget related functions for SEGGER Embedded Studio. 707 + Update following middleware. 708 "utilities/middleware/i2c_master.c/h" 709 "utilities/middleware/uart_module.c" 710 711 Others 712 + Update comment, format, typing error, and coding style. 713 + Update and sync startup.s/system.c files. 714 + Change "HT_PWRCU->BAKPSR" to "HT_PWRCU->LDOSR" of HT32F57352. 715 + Fix "HT_AES->KEYR" define error (from KEYR[8] to KEYR[4] for AES128). 716 + Update "BFTM/OneShot" example, fix the register access sequence and time calculation formula. 717 + Update "TM/PWM/main.c", add "HTCFG_PWM_TM_RELOAD" check. 718 + Update "SLED/*" example, for fix error and coding style. 719 + Update "HT32F_DVB_PBInit()" of "ht32f5xxxx_board_01.c", add "LIBCFG_EXTI_4_7_GROUP" support. 720 + Update e-Link32 Pro/Lite Command line tool as "V1.18" ("utilities/elink32pro/eLink32pro.exe"). 721 + Change the project recommended minimum version of SEGGER Embedded Studio from V4.12 to V6.20. 722 723/*----------------------------------------------------------------------------------------------------------*/ 724/* HT32_STD_5xxxx_FWLib_V1.1.1_5938 */ 725/*----------------------------------------------------------------------------------------------------------*/ 726 Release Date: 2022-06-08 727 728 Main Changes 729 + Add new "TM/TriggerCounter_FrequencyMeasure" example. 730 + Add following middleware. 731 "utilities/middleware/spi_module.c" 732 "utilities/middleware/spi_module.h" 733 "utilities/middleware/spi_module_config_templet.h" 734 + Fixed FW library compatibility with ARM compiler version 6 of MDK-ARM V5.37. 735 - Add MDK-ARMv537 project template for MDK-ARM V5.37. 736 - Update "project_template/Script". Those MDK-ARMv537 project templates will be added for use if choose 737 the target IDE is "Keil MDK-ARMv5". The fixed files are as follows: 738 "Script/_CreateProjectScript.bat" 739 "Script/_ProjectConfig.bat" 740 "Script/_ProjectSource.bat" 741 - Update "core_cm0plus.h", fix compiler error. 742 - Update "SLED/ARGB_GetLEDNum", fix compiler warning. 743 - Update "FMC/FLASH_OperationNoHalt", fix the compiler issue of Arm Compiler Version V6.18 and the 744 compiler warning of linker script file. The fixed files are as follows: 745 "FLASH_OperationNoHalt/main.c" 746 "FLASH_OperationNoHalt/linker.lin" 747 - Update following middleware, remove STRCAT3 usage to fix compiler error. 748 "utilities/middleware/uart_module.c" 749 "utilities/middleware/i2c_master.c" 750 "utilities/middleware/spi_module.c" 751 + Update "ht32_retarget.c". Implement __write function to fix compiler error in IAR EWARM Version 9.20 752 or later. 753 + Update GNU Arm makefile in the project_template, fix the compatibility issue that the makefile of GNU Arm 754 Version 11 cannot be compiled. 755 + Update EWARM in the project_template, fix the compiler error that header file path doesn't exist in 756 the file list of Workspace of IAR EWARM Version 7. 757 + Fix SPI initial PDMA parameter in the "utilities/common/spi_flash.c". 758 759 Others 760 + Update comment, format, typing error, and coding style. 761 + Update e-Link32 Pro/Lite Command line tool as "V1.16" ("utilities/elink32pro/eLink32pro.exe"). 762 + Update the following examples to remove compiler warning of the IAR EWARM. 763 "BFTM/TimeMeasure" 764 "TM/PWMOut_PDMA_4CH" 765 "USBD/HID_Keyboard_Virtual_COM" 766 "USBD/USB_UAC_Sound" 767 "USBD/USB_Video" 768 "USBD/Virtual_COM" 769 + Update "TM/PWM" example, add the PWM channel initial function to "pwm.c". 770 + Update "WDT/Period_Reload" example, add WDT_ResetCmd function. 771 + Update and sync create project related files ("_ProjectConfig.bat", "_ProjectConfig.ini"). 772 + Update content of "project_template/IP/Example/readme.txt", add MDK-ARM V5.37 related information. 773 774/*----------------------------------------------------------------------------------------------------------*/ 775/* HT32_STD_5xxxx_FWLib_V1.0.25_5831 */ 776/*----------------------------------------------------------------------------------------------------------*/ 777 Release Date: 2022-04-19 778 779 Main Changes 780 + Add example support of BM53A367A. 781 + Add "LIBCFG_ADC_MVDDA" define, fix the issue that "ADC_MVDDACmd()" function is missing of HT32F50343. 782 + Update EEPROM Basic and EEPROM Emulation middleware, fix the include and define sequence. 783 "utilities/middleware/eeprom_basic.h" 784 "utilities/middleware/eeprom_emulation.h" 785 + Update UART Module middleware, add the "UARTM_IsTxFinished()" API. 786 "utilities/middleware/uart_module.c" 787 "utilities/middleware/uart_module.h" 788 789 Others 790 + Update comment, format, typing error, and coding style. 791 + Update e-Link32 Pro/Lite Command line tool as "V1.0.15" ("utilities/elink32pro/eLink32pro.exe"). 792 793/*----------------------------------------------------------------------------------------------------------*/ 794/* HT32_STD_5xxxx_FWLib_V1.0.24_5762 */ 795/*----------------------------------------------------------------------------------------------------------*/ 796 Release Date: 2022-03-08 797 798 Main Changes 799 + Change to the new Holtek version format (Vm.n.r). 800 + Add following middleware. 801 "utilities/middleware/uart_module.c" 802 "utilities/middleware/uart_module.h" 803 + Add new "FMC/FLASH_OperationNoHalt" example. 804 + Modify "utilities/common/ring_buffer.c", fix the thread-safe issue of "Buffer_GetLength()". 805 806 Others 807 + Update comment, format, typing error, and coding style. 808 + Update "startup_ht32fxxxxx_nn.s", support "USE_HT32_CHIP" define exist at startup.s and project Asm 809 setting in the same time (project's Asm Define has the higher priority). 810 811/*----------------------------------------------------------------------------------------------------------*/ 812/* HT32_STD_5xxxx_FWLib_v023_5734 */ 813/*----------------------------------------------------------------------------------------------------------*/ 814 Release Date: 2022-02-10 815 816 Main Changes 817 + Add new device support. 818 - MXTX6306 819 + Rename previously "EXTI/GPIO_Interrupt" example to "EXTI/EXTI_Key_LED". 820 + Add new "EXTI/GPIO_Interrupt" example. 821 + Update the internal VREF level driver, add the missing voltage level setting/define for the HT32F542xx 822 series. 823 ADC_VREF_2V5 824 ADC_VREF_3V0 825 ADC_VREF_4V0 826 ADC_VREF_4V5 827 828 Others 829 + Update comment, format, typing error, and coding style. 830 + Modify "bool, TRUE, FALSE" define way for C++/.cpp applications. 831 + Add warning message for the HT32F54241 SK ("ht32f54241_sk.h" and "ht32_board_config.h" of the related 832 examples). 833 + Simplify the following examples to use less IO/LED/KEY. 834 - "GPIO/InputOutput" 835 - "EXTI/EXTI_Key_LED" 836 + Update "utilities/common/spi_flash.c and spi_lcd.c", change the SPI Clock prescaler from 2 to 4 when the 837 Core clock is large than 48 MHz. 838 + Update "eLink32pro.exe" from v1.1.2 to v1.1.3. 839 + Update related middleware (eeprom_basic and eeprom_emulation). 840 + Update "ADC/InternalReferenceVoltage" example, add the voltage level setting of the internal VREF for 841 the 5V MCU. 842 843/*----------------------------------------------------------------------------------------------------------*/ 844/* HT32_STD_5xxxx_FWLib_v022_5673 */ 845/*----------------------------------------------------------------------------------------------------------*/ 846 Release Date: 2021-12-09 847 848 Main Changes 849 + Add new device support. 850 HT32F61141 851 + Add new board support. 852 HT32F54241 DVB 853 HT32F54253 DVB 854 + Add new examples: 855 - "SYSTICK/DelayMicrosecond" 856 + Update "ht32fxxxxx_sk.h", "spi_lcd.c/.h", fix the GPIO Chip SEL define mistake which cause the H/W SPI SEL 857 not work of the following SK model. 858 HT32F50230, HT32F50241, HT32F52241, HT32F52253, HT32F52341, HT32F54241, HT32F65232, HT32F65240 859 + Update "ht32f54241_sk.h" and "ht32f54253_sh.h", fix the COM port UART/Pin and SPI LCD BL typing error. 860 + Update "GNU_ARM/linker.ld", fix the heap/stack area overlap problem. 861 + Fix the following library configuration error of HT32F54241/54253. 862 Add: "LIBCFG_CKCU_PLLSRCDIV", "LIBCFG_PWRCU_PORF". 863 Remove: "LIBCFG_CMP" (HT32F54241 only, not support). 864 + Update "example/I2C/TouchKey/ht32_board_config.h", fix the typing error of I2C Port. 865 866 Others 867 + Rename "LIBCFG_NO_PWRCU_PORF" to "LIBCFG_NO_PWRCU_VDDPORF". 868 + Update comment, format, typing error, and coding style. 869 + Update "example/LEDC/7-SegmentDigitalDisplay/main.c", change the frame rate from 40 Hz to 50 Hz. 870 871/*----------------------------------------------------------------------------------------------------------*/ 872/* HT32_STD_5xxxx_FWLib_v021_5582 */ 873/*----------------------------------------------------------------------------------------------------------*/ 874 Release Date: 2021-08-19 875 876 Main Changes 877 + Add example support of HT32F54241/54253. 878 + Update "SPI/Slave" example of HT32F52253, modify the SPI port and pin assignment from SPI1 to SPI0. 879 + Update "SPI/SEL_Software" example of HT32F52253, fix the typing error of SEL GPIO clock. 880 + Update "SPI/Master" example of HT32F52253. 881 - Fix the configuration typing error of "ht32_board_config.h". 882 - Modify the SPI port and pin assignment from SPI1 to SPI0. 883 884 Others 885 + Update comment, format, typing error, and coding style. 886 + Update "_ProjectConfig*.bat" files. 887 + Update "RSTCU/Peripheral_Reset_Function" example, modify "HTCFG_LED0_RST" to "HTCFG_LED1_RST". 888 + Update "SPI/Slave" example, move the IRQHandler define from "ht32f5xxxx_01_it.c" to "ht32_board_config.h" 889 to reduce maintenance time. 890 + Add "LCD_SPI_RST_UNUSE" define for "ht32fxxxxx_sk.h" and "spi_lcd.c", to decide the "spi_lcd.c" controls 891 the LCD_RST pin or not. 892 + Update e-Link32 Pro Commander to V1.10. 893 894/*----------------------------------------------------------------------------------------------------------*/ 895/* HT32_STD_5xxxx_FWLib_v020_5545 */ 896/*----------------------------------------------------------------------------------------------------------*/ 897 Release Date: 2021-07-23 898 899 Main Changes 900 + Add new device support. 901 HT32F54231, HT32F54241 902 HT32F54243, HT32F54253 903 HT32F67741 904 + Add "ht32_time.c/.h" to support following new functions for delay, time measure, and timeout. 905 "Time_Init()" 906 "Time_Delay()" 907 "Time_GetTick()" 908 + Add new examples: 909 - "GPIO/Input" 910 - "GPIO/Output" 911 - "Time/TimeFun" 912 - "Time/TimeFun_UserConf" 913 - "TM/PWMOut_PDMA_4CH" 914 - "USART/RS485_NMM_Slave" 915 + Add new definition, "FLASH_WAITSTATE_MAX". 916 + Fix the problem that "FLASH_BranchCacheCmd()" is not exist of HT32F0006, HT32F61352, and HT32F6135x. 917 + Fix the problem that "PWRCU_WakeupMultiPinCmd()", "PWRCU_WAKEUP_PIN_1" are not exist of HT32F50343. 918 + Fix typing error which cause the "I2C2_IRQn" missing (from "USE_HT32F2243_53" to "USE_HT32F52243_53"). 919 + Modify the following definition (CH4 to CH7 usually have the compare function only but the "TM_FLAG_CHnC" 920 definition is not compatible with the "TM_FLAG_CHnCC"). 921 "TM_FLAG_CH4C" to "TM_FLAG_CH4CC" 922 "TM_FLAG_CH5C" to "TM_FLAG_CH5CC" 923 "TM_FLAG_CH6C" to "TM_FLAG_CH6CC" 924 "TM_FLAG_CH7C" to "TM_FLAG_CH7CC" 925 + Modify "TM_GetCaptureCompare()" to support TM_CH4 ~ TM_CH7 for 8 channel PWM timer. 926 + Add "TM_GetCaptureCompare4()" ~ "TM_GetCaptureCompare7()" functions. 927 + Add "USART_PARITY_MARK" and "USART_PARITY_SPACE" for the UART parity mode. 928 + Update "example/I2C/Interrupt/main.c", fix the configuration error of I2C slave. 929 + Update following example, modify the default value of "gIsINEmpty" from TRUE to FALSE. The default value 930 TRUE may cause the F/W to not send CSW after the first Inquiry CBW Command in a specific condition. 931 "example/USBD/HID_Keyboard_Mass_Storage" 932 "example/USBD/Mass_Storage" 933 "example/USBD/Mass_Storage_IAP" 934 935 Others 936 + Update comment, format, typing error, and coding style. 937 + Adjust and fix error of "LIBCFG_xxxxx" definition. 938 New: 939 "LIBCFG_FMC_PREFETCH", 940 Rename: 941 "LIBCFG_SINK_CURRENT_ENHANCED" to "LIBCFG_GPIO_SINK_CURRENT_ENHANCED" 942 "LIBCFG_WAKEUP_V01" to "LIBCFG_PWRCU_WAKEUP_V01" 943 "LIBCFG_CACHE" to "LIBCFG_FMC_BRANCHCACHE" 944 Remove: 945 "LIBCFG_ADC_INTERNAL_CH_V02", "LIBCFG_NO_FMC_PRE_FETCH", "LIBCFG_NO_FMC_WAIT_STATUS", 946 "LIBCFG_ADC_INTERNAL_CH_V03", "LIBCFG_ADC_INTERNAL_CH_DAC" 947 + Remove unnecessary functions, "PWRCU_WakeupPinIntConfig()" and "PWRCU_WakeupMultiPinIntConfig()". 948 + Remove unuse global variable "DelayTime" of "ebi_lcd.c" and "spi_lcd.c". 949 + Change the member order of the "I2C_InitTypeDef". 950 + Modify the "USART_StickParityCmd()" function to set the PBE bit by default when the command is ENABLE. 951 + Remove compiler warning of GNU by adding the dummy "if" usage of the unused parameter. 952 + Fix the case error of "HT32_Board" include path. 953 954/*----------------------------------------------------------------------------------------------------------*/ 955/* HT32_STD_5xxxx_FWLib_v019_5358 */ 956/*----------------------------------------------------------------------------------------------------------*/ 957 Release Date: 2021-05-11 958 959 Main Changes 960 + Add new examples: 961 - "ADC/OneShot_SWTrigger_ByTM" 962 - "CKCU/HSI_AutoTrim_By_LSE" 963 + Update startup/system files supported of specific MCU projects. 964 Old New 965 ------------------------- ------------------------- 966 - HT32F0006/HT32F61352 967 system_ht32f0006.c to system_ht32f5xxxx_07.c 968 startup_ht32f5xxxx_xxx_01.s to startup_ht32f5xxxx_xxx_07.s 969 - HT32F52344/HT32F52354 970 startup_ht32f5xxxx_01.s to startup_ht32f5xxxx_03.s 971 + Fix the problem of Flash API of HT32F50343 that the AHB clock of the GPIO port was not enable ,but the 972 drive current of SPI_MOSI is adjusted. The fixed item is as follows: 973 - The function "SPI_FLASH_Init()", It is in the "utilities/common/spi_flash.c". 974 - Add new define "#define FLASH_SPI_MOSI_CLK(CK) (CK.Bit.PB)", It is in the 975 "utilities/HT32_Board/ht32f50343_sk.h". 976 + Fixed the system was stuck in CKCU_HSIAutoTrimCmd() because of the misjudgment of CKCU_HSIAutoTrimIsReady(). 977 + Fixed the problem that the example CKCU/HSI_AUTO_Trim_BY_USB uses HSE(CKCU_PLLSRC_HSE) as the USB PLL 978 clock source. Change the USB PLL Clock source to HSI(CKCU_PLLSRC_HSI). 979 + Fix the CHIP ID error in all HT32F6135x projects. Fixed "USE_HT32_CHIP=10" to "USE_HT32_CHIP=17". 980 + Remove the interrupt capability of the DAC. Modify the file as follows: 981 - "example/DAC/Async_2CH/ht32f5xxxx_01_it.c"" 982 - "example/DAC/Async_2CH/main.c" 983 - "example/DAC/Sync_12bit_2CH/ht32f5xxxx_01_it.c" 984 - "example/DAC/Sync_12bit_2CH/main.c" 985 - "trunk/library/Device/Holtek/HT32F5xxxx/Include/ht32f5xxxx_01.h" 986 - "library/HT32F5xxxx_Driver/inc/ht32f5xxxx_dac.h" 987 - "library/HT32F5xxxx_Driver/src/ht32f5xxxx_dac.c" 988 989 Others 990 + Update comment, format, typing error, and coding style. 991 + Update LIBCFG of SCTM. 992 - Add the new definition of LIBCFG for a specific MCU: 993 "#define LIBCFG_SCTM0 (1)" 994 "#define LIBCFG_SCTM1 (1)" 995 - Remove the definition of LIBCFG for a specific MCU: 996 "#define LIBCFG_NO_SCTM (1)" 997 - Update ht325xxxx_tm.c to depend on the new definitions LIBCFG_SCTM0 and LIBCFG_SCTM1. 998 + Update the version of eLink32pro.exe to 1.0.1.1. 999 + Update the following project setting: 1000 - IAR EWARM v6/v7: Modify "_ht32_project_source.c" to "_ht32_project_source.h". 1001 - SEGGER Embedded Studio: Add the new definition "arm_compiler_variant="SEGGER"". 1002 + Remove redundant SCTM definition of 57331/57341. 1003 1004/*----------------------------------------------------------------------------------------------------------*/ 1005/* HT32_STD_5xxxx_FWLib_v018_5303 */ 1006/*----------------------------------------------------------------------------------------------------------*/ 1007 Release Date: 2021-02-26 1008 1009 Main Changes 1010 + Add "Create Project Configuration Menu" to choose the target IDE and Device when the first time to do the 1011 create project operation of the example. The configuration file, "_CreateProjectConfig.bat" is saved to 1012 the root path of the HT32 Firmware Library. You can reset the create project IDE/IC configuration anytime 1013 by deleting the configuration file. 1014 Target IDE/Compiler: 1015 - Keil MDK-ARM v5 1016 - Keil MDK-ARM v4 1017 - IAR EWARM v8 1018 - IAR EWARM v6/v7 1019 - SEGGER Embedded Studio 1020 - GNU [with Keil and GNU make] 1021 - SourceryG++Lite [with Keil] 1022 Target Device: 1023 - xxxxx: Single Device 1024 - xxx*: Series 1025 + Add new examples: 1026 - "ADC_24bit/Convert_Interrupt" 1027 - "NVIC/Disable_Interrupt" 1028 - "TM/InternalTrigger" 1029 - "WDT/Auto_Enable" 1030 + Add Flash programming function of GNU Maker (via e-Link32 Pro/Lite Commander). 1031 "make IC=xxxxx eraseall" 1032 "make IC=xxxxx program" 1033 "make IC=xxxxx run" 1034 + Update "CKCU_HSIAutoTrimCmd()" and "CKCU_HSIAutoTrimIsReady()" function to improve clock stability. 1035 + Fix the cache address problem of "SDDISK_Read()" function. 1036 "USBD/Mass_Storage/sd_disk.c" 1037 + Update GNU project (*.uvprojx), fix the compile error when use new GNU Arm version 1038 ("gcc-arm-none-eabi-10-2020-q2-preview-win32" or above). 1039 + Fix Keil compiling error when disable both retarget and MicroLib. 1040 + Update "ht32f5xxxx_01.h", fix the compatibility issue when user include "stdbool.h". 1041 + Modify GNU compiler settings, output text file (disassembly) after building the code. 1042 + Change the startup/system supporting files of specify MCU device. 1043 Old New 1044 ------------------------- ------------------------- 1045 - HT32F0006/HT32F61352 1046 system_ht32f0006.c to system_ht32f5xxxx_07.c 1047 startup_ht32f5xxxx_xxx_01.s to startup_ht32f5xxxx_xxx_07.s 1048 - HT32F52344/HT32F52354 1049 startup_ht32f5xxxx_01.s to startup_ht32f5xxxx_03.s 1050 + Add "HT32_FWLIB_VER" and "HT32_FWLIB_SVN" in "ht32f5xxxx_lib.h" for the version information of 1051 HT32 Firmware Library. 1052 Example: 1053 "#define HT32_FWLIB_VER (018)" 1054 "#define HT32_FWLIB_VER (5303)" 1055 + Add new AFIO define in "ht32f5xxxx_gpio.h". 1056 - "AFIO_FUN_MCTM0", "AFIO_FUN_MCTM1" 1057 - "AFIO_FUN_GPTM0", "AFIO_FUN_GPTM1", "AFIO_FUN_GPTM2", "AFIO_FUN_GPTM3" 1058 - "AFIO_FUN_PWM0", "AFIO_FUN_PWM1", "AFIO_FUN_PWM2", "AFIO_FUN_PWM3" 1059 + Add following alias of MCTM IRQ handler 1060 "#define MCTM0_IRQn MCTM0UP_IRQn" 1061 "#define MCTM0_IRQHandler MCTM0UP_IRQHandler" 1062 "#define MCTM1_IRQn MCTM1UP_IRQn" 1063 "#define MCTM1_IRQHandler MCTM1UP_IRQHandler" 1064 1065 Others 1066 + Update comment, format, typing error, and coding style. 1067 + Update "TM/PWM_Buzzer" example, move the buzzer function to "buzzer_pwm.c/.h". 1068 + Update "_ProjectConfig*.bat" files. 1069 + Add "Project Source File Setting" functions ("_ProjectSource.ini" and "_ProjectSource.bat"). 1070 + Rename "_CreateProjectUSB.bat" as "_CreateProject.bat". 1071 + Add dummy xxTM C files, to notify the user that SCTM/PWM/GPTM/MCTM timer use the "ht32f5xxxx_tm.c" driver. 1072 "ht32f5xxxx_gptm.c", "ht32f5xxxx_pwm.c", "ht32f5xxxx_sctm.c" 1073 + Add "IS_IPN_MCTM()" and "IS_IPN_GPTM" macro, for use to confirm the xxTMn is GPTM or MCTM. 1074 + Update comment and board/pin configuration of "ADC/OneShot_TMTrigger_PDMA" example. 1075 + Update and sync startup.s/system.c files. 1076 1077/*----------------------------------------------------------------------------------------------------------*/ 1078/* HT32_STD_5xxxx_FWLib_v017_5137 */ 1079/*----------------------------------------------------------------------------------------------------------*/ 1080 Release Date: 2020-12-31 1081 1082 Main Changes 1083 + Update IAR linker.icf, modify the ROM/RAM size. 1084 + Add "LCDENS" related notice of "ht32f5xxxx_lcd.c/.h". 1085 + Fix Keil compiling error when disable both retarget and MicroLib. 1086 + Update "ht32f5xxxx_flash.c", fix the flash erase/program related flow. 1087 1088 Others 1089 + Update comment, format, typing error, and coding style. 1090 + Update SPI chip select define and SPI configuration of "utilities/common/spi_lcd.c & spi_lcd.h". 1091 + Add "BOARD_DISABLE_EEPROM" define of "utilities/common/i2c_eeprom.c". 1092 + Add notice of VREF stable time and output function. 1093 + Update create project script. 1094 1095/*----------------------------------------------------------------------------------------------------------*/ 1096/* HT32_STD_5xxxx_FWLib_v017_5074 */ 1097/*----------------------------------------------------------------------------------------------------------*/ 1098 Release Date: 2020-11-08 1099 1100 Main Changes 1101 + Add new device and example support. 1102 HT32F65232, HT32F5828 1103 + Add "ADC_DualModeConfig()" API for the dual ADC mode of HT32F65230/65240. 1104 + Add "ADC/OneShot_PWMTrigger_Dual_ADC" example. 1105 + Update "startup_ht32f5xxxx_*_05.s" to support HT32F5828. 1106 + Add "system_ht32f5xxxx_08.c" and "startup_ht32f5xxxx_*_08.s" for HT32F652xx series. 1107 + Fix the FIFF/TIFN(Fsampling/Event) setting error of the following function and typedef of the 1108 HT32F65230/65240. 1109 "TM_CaptureInit()" 1110 "TM_PwmInputInit()" 1111 "TM_CHFDIV_Enum" 1112 + Modify the function "MCTM_UpdateDisable()" to "MCTM_UpdateEventDisable" and add "MCTM_UEV1UD/MCTM_UEV1OD" 1113 enum for HT32F65230/65240. 1114 + Add OCR support and update CMP_INPUT_x define for HT32F65232. 1115 + Rename "startup_ht32f65230_40.s" to "startup_ht32fxxxx_08.s" for HT32F652xx series. 1116 + Rename "ht32f65230_40_opa.c/h" to "ht32f652xx_opa.c/h". 1117 + Rename "ht32f65230_40_adc.c/h" to "ht32f652xx_adc.c/h". 1118 + Add missing define of ADC_TRIG_XXXX and modify "ht32f652xx_adc.c/h" for support HT32F652xx series. 1119 + Modify "ht32f5xxxx_rtc.c/h", use LIBCFG_LSE to disable "RTC_SRC_LSE", "RTC_LSECmd()", and 1120 "RTC_LSESMConfig()". 1121 + Remove un-support functions of HT32F5xxxx series. 1122 "TM_EtiExternalClockConfig()" 1123 "TM_EtiConfig()" 1124 + Add missing enum, "TM_CKDIV_8" for HT32F652xx series. 1125 + Add "MCTM_CHBRKCTRConfig2()" MCTM to support Break2 of HT32F652xx series. 1126 + Add missing MCTM interrupt define of HT32F652xx series. 1127 "MCTM_INT_CH0CD" 1128 "MCTM_INT_CH1CD" 1129 "MCTM_INT_CH2CD" 1130 "MCTM_INT_CH3CD" 1131 "MCTM_INT_OVER" 1132 "MCTM_INT_UNDER" 1133 1134 Others 1135 + Update "system_ht32f5xxxx_04.c", remove unnecessary define. 1136 + Update comment, format, typing error, and coding style. 1137 + Add below notice of examples to inform the user to check the local structure variable without a 1138 default value. 1139 "Notice that the local variable (structure) did not have an initial value. 1140 Please confirm that there are no missing members in the parameter settings below this function." 1141 + Add "LIBCFG_EXTI_4_9_GROUP" define for the chip who supported extra EXTI interrupt channel. 1142 + Update "MCTM_CHBRKCTRConfig()" function to keep "CHMOE" value. 1143 1144/*----------------------------------------------------------------------------------------------------------*/ 1145/* HT32_STD_5xxxx_FWLib_v016_4983 */ 1146/*----------------------------------------------------------------------------------------------------------*/ 1147 Release Date: 2020-10-16 1148 1149 Main Changes 1150 + Add new device and example support. 1151 HT32F61355, HT32F61356, HT32F61357 1152 + Add new board support. 1153 HT32F65240 Starter Kit 1154 + Add more example support for HT32F65240 DVB. 1155 + Add a new example. 1156 "OPA/OPA_Enable" 1157 + Change the default USB LDO setting from the enable mode to bypass mode. 1158 + Update "SPI/FIFO_SEL_Hardware" example. Use timeout interrupt and RX_FIFO length to read the 1159 corresponding data (Previously, it was fixed to read 4 bytes which may cause the data loss problem in 1160 specific conditions). 1161 + Update "CKCU/Clock_Configuration_LSI" example. Add wait for LSI clock ready before the system clock 1162 source switches to LSI (Otherwise, the switching may fail). 1163 + Update "SPI/Slave" example to fix missing EXTI interrupt service routine of HT32F52354. 1164 + Modify "TM/PWM" example to output the complete PWM signal before stopping it. 1165 + Update CMP driver, "ht32f5xxxx_cmp.c/h" and "ht32f65230_40_libcfg.h". Support new CMP function of 1166 HT32F65230/65240. 1167 + Update CMP example "CMP/ComparatorInterrupt" to support HT32F65230/65240 and improve readability. 1168 + Remove "OFVCR" parameter of "HT_OPA_TypeDef" struct in the "ht32f5xxx_01.h". This register is not 1169 supported by the HT32F65230/65240. 1170 + Remove the following unnecessary API in the "ht32f65230_40_opa.c" and "ht32f65230_40_opa.h". 1171 "void OPA_Config(HT_OPA_TypeDef* HT_OPAn, u32 mode, u32 cancellation)" 1172 "void OPA_CancellationModeConfig(HT_OPA_TypeDef* HT_OPAn, u16 OPA_REF_INPUT)" 1173 "void OPA_SetCancellationVaule(HT_OPA_TypeDef* HT_OPAn, u32 cancellation)" 1174 "u32 OPA_GetCancellationVaule(HT_OPA_TypeDef* HT_OPAn)" 1175 1176 Others 1177 + Update comment, format, typing error, and coding style. 1178 + Update "I2C/Interrupt/main.c" to improve readability. 1179 + Add below notice into USB examples to inform the user turn on the HSI Auto Trim function when the PLL 1180 clock source is HSI (PLL for USB 48 MHz clock). 1181 "Msut turn on if the USB clock source is from HSI (PLL clock Source)" 1182 + Remove the following unnecessary files. 1183 "WDT/Period_Reload/ht32_board_config.h" 1184 "FMC/FLASH_Write_Protection/ht32_board_config.h" 1185 + Remove the remote wake-up function in the "USB_Video/main.c". 1186 1187/*----------------------------------------------------------------------------------------------------------*/ 1188/* HT32_STD_5xxxx_FWLib_v015_4909 */ 1189/*----------------------------------------------------------------------------------------------------------*/ 1190 Release Date: 2020-08-11 1191 1192 Main Changes 1193 + Add the following files to use e-Link32 Pro with SEGGER Embedded Studio. Refer to the 1194 "readme e-Link32 Pro.txt" for how to use it. 1195 "emStudiov4/readme e-Link32 Pro.txt" 1196 "emStudiov4/Project_xxxxx.bat" 1197 "emStudiov4/_MassErase.bat" 1198 + Add QSPI support. 1199 "ht32f5xxxx_spi.c". 1200 "QSPI_QuadCmd()" 1201 "QSPI_DirectionConfig()" 1202 "utilities/common/spi_flash.c" 1203 "SPI_FLASH_WriteStatus2()" 1204 "QSPI_FLASH_BufferQuadRead()" 1205 "QSPI_FLASH_BufferQuadReadByDMA()" 1206 "QSPI_FLASH_BufferWrite()" 1207 "QSPI_FLASH_BufferWriteByDMA()" 1208 "utilities/HT32_Board" 1209 "ht32f52367_sk.h" 1210 "ht32f0006_dvb.h" 1211 + Add new examples. 1212 "TM/PWM" 1213 "TM/UpdateEvent" 1214 "QSPI/Flash_Quad_Mode_PDMA" 1215 + Change the USB LDO default state from ON (PWRCU_VREG_ENABLE) to OFF (PWRCU_VREG_BYPASS) and 1216 add below notice description. 1217 "USB LDO Should be enabled (PWRCU_VREG_ENABLE) if the MCU VDD > 3.6 V." 1218 + Change the driving current as 8 mA of LCD/SPI Flash utilities driver SPI pins for HT32F50343 (since the 1219 default operation voltage of Starter Kit is 3.3 V). 1220 + Add "SPI_FLASH_WaitForWriteEnd()" function in the end of the write status operation 1221 ("SPI_FLASH_WriteStatus()"). 1222 + Fix typing error of the define, "LIBCFG_MAX_SPEED" for HT32F52220/52230/52231/52241/52243/52253. 1223 There are a few examples that refer to this value to set the IP-related frequency. 1224 + Fix the I2S clock setting error of the following example. 1225 "I2S/CodecLoopback_PDMA" 1226 "USBD/USB_UAC_Sound" 1227 "USBD/USB_UAC_Sound_RateControl" 1228 + Add below notice of examples to inform the user to check the local structure variable without a 1229 default value. 1230 "Notice that the local variable (structure) did not have an initial value. 1231 Please confirm that there are no missing members in the parameter settings below this function." 1232 + Fix defined problem of "utilities/common/ebi_lcd.c". Change "EBI_FUN_BYTELAND" / "EBI_FUN_ASYNCREADY" to 1233 "LIBCFG_EBI_BYTELAND_ASYNCREADY". 1234 + Fix the "I2S_FIFOTrigLevelConfig()" error which did not clear the field of I2S FCR correctly. 1235 + Fix "RPRE_MASK" define error for "RTC_SetPrescaler()" function. 1236 + Add utilities drivers into HT32F0006/HT32F61352 project. 1237 "i2c_eeprom.c" 1238 "spi_flash.c" 1239 "spi_lcd.c" 1240 1241 Others 1242 + Update comment, format, typing error, and coding style. 1243 + Add below notice in the "FMC/FLASH_Security" example. 1244 "The Option Byte will be write protected (cannot be changed again) after the 1245 Security Protection is enabled. Refer to the user manual for details." 1246 + Update and modify naming rule of the "HTCFG_xxxx" configuration define in the "ht32_board_config.h". 1247 "I2S/CodecLoopback_PDMA" 1248 + Update the following examples to remove compiler warning of the GNU compiler. 1249 "SLED/ARGB_GetLEDNum" 1250 "USART/PDMA" 1251 + Add "-Waddress-of-packed-member" #pragma of below examples to remove compiler warning of the 1252 GNU compiler. 1253 "USBD/Mass_Storage" 1254 "USBD/HID_Keyboard_Mass_Storage" 1255 + Add the following notice in the Program/Erase related function. 1256 "HSI must keep turn on when doing the Flash operation (Erase/Program)." 1257 + Remove HSI disable setting of Configuration Wizard and add notice in the "system_xxxxx_nn.c". 1258 1259/*----------------------------------------------------------------------------------------------------------*/ 1260/* HT32_STD_5xxxx_FWLib_v014_4736 */ 1261/*----------------------------------------------------------------------------------------------------------*/ 1262 Release Date: 2020-04-08 1263 1264 Main Changes - Modification & Improvement 1265 + Add "USBDClass_Reset()" into the "USBD/*" example to reset related flag for the self-power application. 1266 + Modify "ht32f5xxxx_aes.c", fix "AES_SetKeyTable()" and "_AES_CryptData()" functions who did not clear 1267 related fields before set it. 1268 + Update UxART related example, turn on internal pull up to prevent unknown state. 1269 + Remove unnecessary RTC compare match restart setting of the "RTC/Calendar_BackupDomain" example. 1270 (which cause the time not correct after entering the low power mode). 1271 + Make up the init structure member when the XXXXX_InitTypeDef is a local variable (which without the 1272 default value). For example, add the following code. 1273 "MCTM_OutputInitStructure.AsymmetricCompare = 0;" 1274 "OutInit.ControlN = TM_CHCTL_DISABLE;" 1275 + Update "TM/InputCapture" example, fix the Pulse Width Count formula (shall be plus with 1). 1276 + Fix RAM size from 8K to 16K of HT32F0006 (LIBCFG_RAM_SIZE). 1277 + Update the following example to improve readability. 1278 "ADC/AnalogWatchdog" 1279 "ADC/Continuous_Potentiometer" 1280 "ADC/Discontinuous_EXTITrigger" 1281 "ADC/InternalReferenceVoltage" 1282 "ADC/OneShot_PWMTrigger" 1283 "ADC/OneShot_PWMTrigger_with_Delay" 1284 "ADC/OneShot_TMTrigger_PDMA" 1285 "ADC/Two_Group_MaxCH" 1286 "EXTI/GPIO_Interrupt" 1287 "HWDIV/DIV32" 1288 "TM/InputCapture" 1289 "TM/MatchOutputActive" 1290 "TM/MatchOutputToggle" 1291 "TM/PWM_Buzzer" 1292 "TM/PWMInput" 1293 "TM/PWMOut_PDMA" 1294 "TM/SinglePulseMode" 1295 "TM/TriggerCounter" 1296 "USART/Interrupt" 1297 "USART/Interrupt_FIFO" 1298 "USART/PDMA" 1299 "USART/Polling" 1300 "USART/Retarget" 1301 "USBD/HID_Demo" 1302 "USBD/HID_DemoVendorReport" 1303 1304 Main Changes - API Function & Compatibility 1305 + Add "USART_GetIntStatus()" function to get the both enabled and occurred interrupt source. 1306 + Remove the "I2C_Cmd()" in the "I2C_Init()" function since it shall be called after the I2C related 1307 settings. User shall call the "I2C_Cmd()" by themself after the "I2C_Init()". 1308 + Add "DR_8BIT", "DR_16BIT", and "DR_32BIT" define for the "HT_SLEDn" structure. 1309 + Modify "ADC_RegularChannelConfig()", add the last variable-length argument for the code compatibility 1310 between the general HT32 model and the specific model (with the independent sample & hold function of each 1311 ADC channel). 1312 "ADC_RegularChannelConfig(HT_ADC_TypeDef* HT_ADCn, u8 ADC_CH_n, u8 Rank, ...)" 1313 + Modify the following MCTM IRQ define for compatibility. 1314 Old New 1315 ------------- ---------------- 1316 MCTM_BRK_IRQn MCTM0_BRK_IRQn 1317 MCTM_UP_IRQn MCTM0_UP_IRQn 1318 MCTM_TR_UP2_IRQn MCTM0_TR_UP2_IRQn 1319 MCTM_CC_IRQn MCTM0_CC_IRQn 1320 GPTM_G_IRQn GPTM0_G_IRQn 1321 GPTM_VCLK_IRQn GPTM0_VCLK_IRQn 1322 + Modify "AFIO_FUN_ADC" as AFIO_FUN_ADC0. 1323 + Add the following functions of "ht32f5xxxx_div.c". 1324 "DIV_IsDivByZero()": Return the division by zero flag. 1325 "DIV_uDiv32()": Do the 32-bit unsigned division. 1326 "DIV_uGetLastRemainder()": Get remainder of last 32-bit unsigned division. 1327 + Add "u64" definition. 1328 + Add the following definition for convenience. 1329 PDMACH0_IRQn ~ PDMACH5_IRQn 1330 AFIO_FUN_MCTM0 1331 AFIO_FUN_GPTM0 ~ AFIO_FUN_GPTM3 1332 AFIO_FUN_PWM0 ~ AFIO_FUN_PWM3 1333 AFIO_FUN_SCTM0 ~ AFIO_FUN_SCTM3 1334 + Add "LIBCFG_MAX_SPEED" in the file "ht32fxxxxx_libcfg.h" which indicate the maximum core speed. 1335 1336 Main Changes - New Example & Supporting 1337 + Add new examples. 1338 "BFTM/OneShot" 1339 "BFTM/TimeMeasure" 1340 "Mono_LCD/LCD_module" (for ESK32-A3A31 mono LCD module) 1341 "SLED/ARGB_GetLEDNum" 1342 "USBD/HID_DemoVendorReport" 1343 + Add example support of HT32F65230/65240 1344 ADC, BFTM, CRC, EXTI, FMC, GPIO, HWDIV, NVIC, PDMA, PWRCU, RSTCU, RTC, SWDIV, SYSTICK, TM, WDT 1345 + Rename examples as below. 1346 IP Old Name New Name 1347 -------- -------- -------- 1348 ADC EXTITrigger_DiscontinuousMode Discontinuous_EXTITrigger 1349 ADC PDMA_ADCResult OneShot_TMTrigger_PDMA 1350 ADC Potentiometer_ContinuousMode Continuous_Potentiometer 1351 ADC TM_Trigger OneShot_PWMTrigger 1352 ADC TM_Trigger_with_Delay OneShot_PWMTrigger_with_Delay 1353 QSPI Flash Flash_Quad_Mode 1354 TM PWMOutput PWM_Buzzer 1355 USART HyperTerminal_TxRx Retarget 1356 USART HyperTerminal_TxRx_Interrupt Interrupt 1357 USART HyperTerminal_TxRx_Interrupt_FIFO Interrupt_FIFO 1358 Mono_LCD 8CHAR_14SEG_Demo Demo 1359 1360 Others 1361 + Update comment, format, typing error, and coding style. 1362 + Update and modify naming rule of the "HTCFG_xxxx" configuration define in the "ht32_board_config.h". 1363 + Update "ht32_series.c/h" and "ht32_retarget_usbdconf.h" to improve the compatibly of the 1364 terminal software. 1365 + Add ring buffer support of the "Virtual_COM" and "HID_Keyboard_Virtual_COM" examples. 1366 + Fix interrupt mode of UxART retarget, remove unnecessary FIFO/interrupt configuration of the 1367 retarget function. 1368 + Update "system_ht32fxxxxx_nn.c" (coding style only). 1369 1370/*----------------------------------------------------------------------------------------------------------*/ 1371/* HT32_STD_5xxxx_FWLib_v013_4429 */ 1372/*----------------------------------------------------------------------------------------------------------*/ 1373 Release Date: 2019-12-05 1374 1375 Main Changes 1376 + Update "USBD/Virtual_COM" example, add ZLP process for BULK transfer. 1377 + Fix memory size error of HT32F65230. 1378 + Modify "ht32f65230_40_libcfg.h", fix the "USE_MEM_HT32F65230" define problem of HT32F65230. 1379 1380 Others 1381 + Fix typing error of ""USBD/HID_Keyboard_Virtual_COM" example. 1382 1383/*----------------------------------------------------------------------------------------------------------*/ 1384/* HT32_STD_5xxxx_FWLib_v013_4425 */ 1385/*----------------------------------------------------------------------------------------------------------*/ 1386 Release Date: 2019-11-29 1387 1388 Main Changes 1389 + Add new device support. 1390 HT32F65230 1391 + Changes for HT32F65230 and HT32F65240 1392 Change USE_HT32F65240 to USE_HT32F65230_40. 1393 Rename "startup_ht3265240_xxx.s" to "startup_ht3265230_40_xxx.s". 1394 + Update "HID_Demo_UI.exe" to support HID Report ID. 1395 + Add "USBD/HID_DemoVendorReport" example. 1396 + Add UART0_IRQn ~ UART3_IRQn define for HT32F52357/52367 (map to UART0_UART2_IRQn and UART1_UART3_IRQn). 1397 + Add "RETARGET_UxART_BAUDRATE" setting to change the retarget UART baudrate in "ht32f5xxxx_conf.h". 1398 + Add "RETARGET_HSI_ATM" setting to turn on/off the auto-trim function of HSI. 1399 + Add "RETARGET_DEFINE_HANDLER" setting to remove the UxARTn_IRQHandler() define of the retarget. 1400 This setting is used for the model who grouping two UART Interrupt into one vector. 1401 + Add non-block mode of USB Virtual-COM retarget function ((Drop data if USB or terminal software is 1402 not ready). 1403 + Fix EXTI4_IRQn ~ EXTI15_IRQn define error of HT32F65230/65240. 1404 + Add SWCLK toggle of "GPIO_DisableDebugPort()" function. 1405 1406 Others 1407 + Add "USAGE_PAGE_L" define of "USB/HID_Demo" example. 1408 + Add "UART0_UART2_IRQHandler()" and "UART1_UART3_IRQHandler" example in the file "ht32f5xxxx_01_it.c" for 1409 HT32F52357/52367. 1410 + Update format and coding style. 1411 1412/*----------------------------------------------------------------------------------------------------------*/ 1413/* HT32_STD_5xxxx_FWLib_v012_4285 */ 1414/*----------------------------------------------------------------------------------------------------------*/ 1415 Release Date: 2019-10-18 1416 1417 Main Changes 1418 + Add new device support. 1419 HT32F50343, HT32F59041, HT32F59741, HF5032 1420 + Fix HT32F65240 IRQ number error of "USART0_IRQn" and "UART0_IRQn". 1421 + Fix "ADC_CH_GND_VREF" and "ADC_CH_VDD_VREF" define error of HT32F65240. 1422 + Add "GPIO_GetID()" function to convert the HT_GPIOx to GPIO_Px. 1423 + Add "LIBCFG_PWRCU_NO_PORF" define of HT32F65240 to fix the "PWRCU_DeInit()" function not work. 1424 + Update "system_ht32fxxxxx.c" and "startup_ht32fxxxxx_xx_nn.s". 1425 + Rename "startup_ht32f5xxxx_01/02.s" of IAR as "startup_ht32f5xxxx_iar_01/02.s". 1426 + Move the "common/*.h" include from the begin to the end (after the pin define) in the file 1427 "HT32_Board/ht32fxxxx_sk/dvb.h". The original include way leads to the pin define lost when you 1428 use the EBI_LCD->EBI_LCD_RAM outside the "ebi_lcd.c". 1429 + Update "ebi_lcd.c", fix LCD_SPI_BL_GPIO_XXX define error (shall be LCD_EBI_BL_GPIO_XXX). 1430 + Fix error of "_CreateProjectScript.bat" which cause the stack size and RW base can not be set by the 1431 "_ProjectConfig.bat" of the emStudiov4 project. 1432 1433 Others 1434 + Remove the wrong define, "LIBCFG_CKCU_USB_PLL_96M" of HT32F52367. 1435 + Add calculation method of PLL clock in the file, "system_ht32f5xxxx_nn.c". 1436 + Add "utilities/common/lcd.h" to put the lcd related register together. 1437 + Update example to improve readability. 1438 1439/*----------------------------------------------------------------------------------------------------------*/ 1440/* HT32_STD_5xxxx_FWLib_v011_4188 */ 1441/*----------------------------------------------------------------------------------------------------------*/ 1442 Release Date: 2019-08-05 1443 1444 Main Changes 1445 + Add new device support. 1446 HT32F57331, HT32F57341, HT32F57342, HT32F57352, HT32F52357, HT32F52367, HT32F52142, 1447 HT32F65240, HT32F61352, HT50F32002, HT50F32003 1448 + Fix define error of "ht32fxxxxx_libcfg.h". 1449 + Update "system_ht32fxxxxx.c" and "startup_ht32fxxxxx_xx_nn.s". 1450 + Rename "startup_ht32f5xxxx_nn.s" of IAR as "startup_ht32f5xxxx_iar_nn.s". 1451 + Modify ADC related define (The left side old one is still kept for backward compatible). 1452 HT_ADC -> HT_ADC0 1453 ADC -> ADC0 1454 ADC_IRQn -> ADC0_IRQn 1455 + Fix typing error of the function name below. 1456 SPI_GUARDTCmd(), SPI_GUARDTConfig() 1457 1458 Others 1459 + Update content of "readme.txt". 1460 + Add s64 ("typedef signed long long s64;"). 1461 + Update comment and coding style. 1462 + Update and sync "ht32f5xxxx_conf.h". 1463 + Update and sync create project related files ("_ProjectConfig.bat", "_CreateProjectScript.bat"). 1464 + Update "HT32F5xxxx_01_DebugSupport.ini". 1465 + Update "ht32_op.s" and "ht32_op.c". 1466 1467/*----------------------------------------------------------------------------------------------------------*/ 1468/* HT32_STD_5xxxx_FWLib_v010_3748 */ 1469/*----------------------------------------------------------------------------------------------------------*/ 1470 Release Date: 2019-04-09 1471 1472 Main Changes 1473 + Update functions of "ht32f5xxxx_dac_dual16.c". 1474 + Update Create Project script, add Script folder in project_template. 1475 + Fix VREFCR/VREFVALR register address error of HT_ADC_TypeDef. 1476 + Fix "ADC_VREFConfig()" error (ADC_VREF_x shift error). 1477 + Add "ADC_MVDDACmd()" function. 1478 + Add "PWRCU_DeepSleep2Ex()" function for the case which wakeup by EXTI in the short time or the wakeup 1479 source keeps active. 1480 Notice: PWRCU_DeepSleep2Ex() function will affect the accuracy of RTC for the date/time application. 1481 + Add "TM/TriggerCounter" example. 1482 + Add "ADC/InternalReferenceVoltage" example. 1483 + Update "ADC/Potentiometer_ContinuousMode" example, remove division in the ISR of ADC. 1484 1485 Others 1486 + Update "ht32f5xxxx_usbd.c" and "ht32_usbd_core.c", add Force USB Reset Control function (apply to specific 1487 model only). 1488 + Update/sync startup.s/system.c files, fix PLL range and content errors. 1489 + Update "BootProcess" function. 1490 + Update/sync "ht32_op.s" and "ht32_op.c". 1491 + Update "PWRCU/DeepSleepMode1" examples, fix compile error when set "DISABLE_DEBUG_PIN" = 1. 1492 + Update "PWRCU/PowerDownMode" examples 1493 - Update EXTI ISR to reduce maintenance time. 1494 - Add "DISABLE_DEBUG_PIN" function. 1495 + Update/sync "FlashMacro.mac". 1496 + Update Keil after build setting 1497 - Add double quotes (") in the command. 1498 - Change filename keyword from "#L" to "!L" (relative path specification to the current folder). 1499 - Update "fromelf.txt" and "objcopy.txt" 1500 1501/*----------------------------------------------------------------------------------------------------------*/ 1502/* HT32_STD_5xxxx_FWLib_v009_3383 */ 1503/*----------------------------------------------------------------------------------------------------------*/ 1504 Release Date: 2019-02-12 1505 1506 Main Changes 1507 + Add SEGGER Embedded Studio IDE support (beta version). 1508 + Update "EXTI/WakeUp_DeepSleepMode1" Example, fix channel error of EXTI clear wakeup flag and add LED3 1509 (for some SK have only LED2 and LED3 on board). 1510 1511 Others 1512 + Update comment and coding style. 1513 + Add "USBD/USB_UAC_Sound_RateControl" Example. 1514 + Add "USBD/HID_Keyboard_Mass_Storage" Example. 1515 + Update utilities/common/spi_flash.c/h", change the way of HT_PDMA define. 1516 + Update HT32F0006 MDK-ARM project related files (uvproj*). fix SRAM size. 1517 + Update "LIBCFG_DAC" as "LIBCFG_DACDUAL16" for HT32F0006. 1518 + Add "LIBCFG_DACDUAL16" define for "ht32f5xxxx_dac_dual16.h" of "ht32f5xxxx_lib.h". 1519 + Fix missed "I2C2_IRQHandler" and "AES_IRQHandler" in "startup_ht32f5xxxx_01.s" files (both MDK-ARM and 1520 EWARM). 1521 1522/*----------------------------------------------------------------------------------------------------------*/ 1523/* HT32_STD_5xxxx_FWLib_v008_3322 */ 1524/*----------------------------------------------------------------------------------------------------------*/ 1525 Release Date: 2018-12-17 1526 1527 Main Changes 1528 + Fix filename error of IAR EWARM and GNU make file ("ht32f5xxxx_dac_dual16.c"). 1529 1530 Others 1531 + Update "startup_ht32f5xxxx_xxxx.s". 1532 1533/*----------------------------------------------------------------------------------------------------------*/ 1534/* HT32_STD_5xxxx_FWLib_v008_3314 */ 1535/*----------------------------------------------------------------------------------------------------------*/ 1536 Release Date: 2018-12-12 1537 1538 Main Changes 1539 + Add new device support. 1540 HT32F0006 1541 + Modify Control IN/OUT method of USB Core, to fix USB transfer problem when CPU in the lower speed or late 1542 USB interrupt case. 1543 + Add workaround for PDMA CH3 issue (Interrupt Enable bit of CH3 is not work). 1544 + Modify "CKCU_ATC_EXT_PIN" as "CKCU_ATC_CKIN". 1545 1546 Others 1547 + Fix typing error of MCTM. 1548 + Add "LIBCFG_ipname" define to the IP channel of "ht32f5xxxx_pdma.h". 1549 + Add "USBD_DisableDefaultPull()" function to disable pull resistance when the USB is not use. 1550 + Update comment and coding style. 1551 + Rename RTC example as below. 1552 "Calendar" -> "Time" 1553 "Calendar_backup_Domain" -> "Time_BackupDomain" 1554 + Add new example, "RTC/Calendar_BackupDomain". 1555 + Update "EXTI/WakeUp_DeepSleepMode1" example. 1556 1557/*----------------------------------------------------------------------------------------------------------*/ 1558/* HT32_STD_5xxxx_FWLib_v007_3076 */ 1559/*----------------------------------------------------------------------------------------------------------*/ 1560 Release Date: 2018-09-30 1561 1562 Main Changes 1563 + Update HardFault_Handler of "ht32f5xxxx_01_it.c",add the debug instruction and system reset. 1564 + Update AES examples, add zero init of local Struct (AES_InitTypeDef AES_InitStruct). 1565 + Add "__HT_check_sp" and "__HT_check_heap" symbol into startup.s and watchpoint command into 1566 "HT32F5xxxx_01_DebugSupport.ini" for debug stack/heap underflow, overflow, and overwrite. 1567 + Add GNU Make support of GNU Arm compiler. 1568 + Add 52354 IAR project files into "project_template/IP/Template_USB". 1569 + Add "LIBCFG_ADC_INTERNAL_CH_V02" define to fix the "ADC_CH_GNDREF/ADC_CH_VREF" mismatch of HT32F502xx 1570 Series (The ADC input channel number of analog ground/power is different between HT32F502xx and other 1571 series). 1572 + Update "USBD/HID_Keyboard_Joystick" and "USBD/HID_Mouse" example, change the set flag sequence 1573 (before USBDCore_EPTWriteINData). 1574 1575 Others 1576 + Add "objcooy.txt" which shows how to use obj tools of GNU Arm compiler. 1577 + Update format and coding style. 1578 1579/*----------------------------------------------------------------------------------------------------------*/ 1580/* HT32_STD_5xxxx_FWLib_v007_2962 */ 1581/*----------------------------------------------------------------------------------------------------------*/ 1582 Release Date: 2018-08-02 1583 1584 Main Changes 1585 + Add GNU Arm compiler support. 1586 - Add project_template related files 1587 - "startup_ht32f5xxxx_gcc_nn.s" 1588 - "linker.ld" (link script) 1589 + Fix typing error of "ht32f52230_sk.h" file. 1590 "COM1_IRQHandler" shall be "UART0_IRQHandler". 1591 + Fix startup.s error of IAP example which cause UART not work. 1592 + Rename "CreatProject.bat" to "_CreateProject.bat" and update its content. 1593 + Update "ht32f5xxxx_tm.c/.h", add following functions which have TM_CH_n parameter. 1594 void TM_ForcedOREF(HT_TM_TypeDef* TMx, TM_CH_Enum TM_CH_n, TM_OM_Enum ForcedAction) 1595 void TM_SetCaptureCompare(HT_TM_TypeDef* TMx, TM_CH_Enum TM_CH_n, u16 Cmp) 1596 void TM_SetAsymmetricCompare(HT_TM_TypeDef* TMx, TM_CH_Enum TM_CH_n, u16 Cmp) 1597 u32 TM_GetCaptureCompare(HT_TM_TypeDef* TMx, TM_CH_Enum TM_CH_n) 1598 1599 Others 1600 + Fix compile error when turn on Library debug mode (HT32_LIB_DEBUG = 1). 1601 + Fix compile warning/error of GNU Arm compiler. 1602 1603/*----------------------------------------------------------------------------------------------------------*/ 1604/* HT32_STD_5xxxx_FWLib_v006_2891 */ 1605/*----------------------------------------------------------------------------------------------------------*/ 1606 Release Date: 2018-07-14 1607 1608 Main Changes 1609 + None 1610 1611 Others 1612 + Add "USBD/HID_Keyboard_Virtual_COM" example. 1613 + Add "ADC/Two_Group_MaxCH" example. 1614 1615/*----------------------------------------------------------------------------------------------------------*/ 1616/* HT32_STD_5xxxx_FWLib_v006_2863 */ 1617/*----------------------------------------------------------------------------------------------------------*/ 1618 Release Date: 2018-06-11 1619 1620 Main Changes 1621 + Add new device support. 1622 HT32F52344, HT32F52354 1623 + Add DMA support of "utilities/common/spi_flash.c". 1624 + Add missed function prototype declaration of "GPIO_SinkConfig()" in "ht32f5xxxx_gpio.h". 1625 + Add "EXTI_GetEdgeFlag()" function. 1626 + Add LIBCFG_AES_SWAP function to process endian issue of AES. 1627 1628 Others 1629 + Update project and "ht32f5826_libcfg.h" typing error of HT32F5826. 1630 + Fix "LIBCFC_CKCU_USB_PLL" typing error of ht32fxxxx_libcfg.h and example code (shall be LIBCFG_CKCU_USB_PLL). 1631 + Add LED3 toggle of "//project_template/IP/Example" since HT32F52253 Starter Kit using LED2 and LED3. 1632 + Fix compiler error of "USBD/USB_UAC_Sound" Example. 1633 + Remove unnecessary define "LIBCFG_CKCU_INTERRUPT_FLAG_V01". 1634 + Update ht32_op.s and ht32_op.c (improve readability). 1635 + FIx memory size typing error of HT32F0008 project. 1636 + Add LIBCFG_FMC_CMD_READY_WAIT define to insert NOP after ISP command for specific model. 1637 + Update USB's example, driver, an setting related to the LIBCFG_CKCU_USB_PLL_96M. 1638 + Update comment and coding style. 1639 + Add MDK_ARMv5 project of IAP example. 1640 + Fix HT32F52352 IAP_PPBIT define error of "IAP/IAP_UI" example. 1641 + Change buffer size of "IAP/IAP_UI" example for the MCU runs on the slower speed. 1642 + Update "USBD/Mass_Storage" example. 1643 + Update "ht32f5xxxx_ckcu.c" to remove unnecessary register write of PLL. 1644 + Update "EXTI/GPIO_Interrupt" example to reduce maintenance effort. 1645 + Update "ht32f52352_sk.h", "ht32f52354_sk.h", and "ebi_lcd.h" to support EBI 8-bit mode with SPI dual output. 1646 1647/*----------------------------------------------------------------------------------------------------------*/ 1648/* HT32_STD_5xxxx_FWLib_v006_2687 */ 1649/*----------------------------------------------------------------------------------------------------------*/ 1650 Release Date: 2018-04-12 1651 1652 Main Changes 1653 + Add SourceryG++Lite compiler support. 1654 - Add project_template related files 1655 - "startup_ht32f5xxxx_cs3_nn.s" 1656 - "linker.ld" (link script) 1657 + Fix typing error of "Project_50241.uvproj" files. 1658 1659 Others 1660 + Update "ht32f5xxxx_conf.h" for AUTO_RETURN (\r) option. 1661 + Update "ht32f5xxxx_div.h" to remove compiler error of SourceryG++Lite compiler. 1662 1663/*----------------------------------------------------------------------------------------------------------*/ 1664/* HT32_STD_5xxxx_FWLib_v005_2639 */ 1665/*----------------------------------------------------------------------------------------------------------*/ 1666 Release Date: 2018-02-28 1667 1668 Main Changes 1669 + Add "I2C_SpeedOffset" parameter of "I2C_InitTypeDef" struct to reach real I2C speed. 1670 + Add "CKCU/HSI_AutoTrim_By_USB" Example. 1671 + Add "USBD/HID_Keyboard_Joystick" Example. 1672 + Update "CKCU_HSIAutoTrimIsReady" function of "ht32f5xxxx_ckcu.c". 1673 1674 Others 1675 + Update SPI/PDMA example to support HT32F52243/52253. 1676 + Add "I2C_SpeedOffset" parameter of I2C related examples. 1677 + Update "i2c_eeprom.c" to remove warning on specify compiler. 1678 + Modify EXTI related code of "USBD/HID_Keyboard" Example to reduce maintenance effort. 1679 1680/*----------------------------------------------------------------------------------------------------------*/ 1681/* HT32_STD_5xxxx_FWLib_v005_2481 */ 1682/*----------------------------------------------------------------------------------------------------------*/ 1683 Release Date: 2017-12-30 1684 1685 Main Changes 1686 + None 1687 1688 Others 1689 + Update I2S and USB UAC related examples (Coding style and remove unuse define). 1690 + Fix I2S setting of "USB_UAC_Sound" example. 1691 + Fix define error of "PWRCU/DeepSleepMode1" example. 1692 1693/*----------------------------------------------------------------------------------------------------------*/ 1694/* HT32_STD_5xxxx_FWLib_v005_2470 */ 1695/*----------------------------------------------------------------------------------------------------------*/ 1696 Release Date: 2017-12-29 1697 1698 Main Changes 1699 + Add new device support. 1700 HT32F50231, HT32F50241 1701 Note: The examples of HT32F50220, HT32F50230, HT32F50231, HT32F50241 are under test. Please contact us if 1702 any question. Thanks. 1703 + Update boot related functions of "startup_ht32f5xxxx_nn.s" and "system_ht32f5xxxx_nn.c". 1704 + Fix USB example code which forget to turn on USB PLL of HT32F0008. 1705 + Update IAP example to support HT32F0008. 1706 + Add "GPIO_DisableDebugPort()"" function to disable SWD function. 1707 + Add "GPIO_SinkConfig()" function for sink current configuration (Apply to specific model only). 1708 + Update "ht32_op.c" and "ht32_op.s" to support enable WDT function by Flash Option byte (Apply to specific 1709 model only). 1710 + Add "Clock_Configuration_LSI" example to show how to configure the system clock between High Speed 1711 (PLL, HSI, or HSE) and LSI. 1712 1713 Others 1714 + Fix errors of following examples (related to the MCU we added recently). 1715 "EXTI/GPIO_Interrupt" 1716 "PWRCU/BOD_LVD" 1717 "PWRCU/PowerDownMode" 1718 "RAND/Random_Number" 1719 "SPI/Slave" 1720 "TM/MatchOutputToggle" 1721 "TM/PWMOut_PDMA" 1722 "TM/PWMOutput" 1723 "TM/SinglePulseMode" 1724 "USART/HyperTerminal_TxRx_Interrupt_FIFO" 1725 "USART/PDMA" 1726 + Fix "LIBCFG_CHIPNAME" typing error of HT32F50220/50230. 1727 + Remove useless "RTC_LSICmd()"" function. 1728 + Update "RTC_LSILoadTrimData()" to prevent hardfault if RTC clock is not enabled when calling this function. 1729 + Update typing error and coding style of "ht32f5xxxx_ckcu.h". 1730 + Change pin assignment of HT32F0008's example. 1731 1732/*----------------------------------------------------------------------------------------------------------*/ 1733/* HT32_STD_5xxxx_FWLib_v005_2267 */ 1734/*----------------------------------------------------------------------------------------------------------*/ 1735 Release Date: 2017-11-30 1736 1737 Main Changes 1738 + Add new device support. 1739 HT32F0008 1740 HT32F50220, HT32F50230 1741 1742 Others 1743 + Update "ht32_virtual_com.inf" file, add Digital Signature. 1744 + Update "ht32_usbd_core.c/.h", add vendor request call back capability. 1745 + Fix compiler warning when turn on library debug mode. 1746 + Fix IAR project setting of IAP related examples (Output format). 1747 1748/*----------------------------------------------------------------------------------------------------------*/ 1749/* HT32_STD_5xxxx_FWLib_v004_1996 */ 1750/*----------------------------------------------------------------------------------------------------------*/ 1751 Release Date: 2017-10-19 1752 1753 Main Changes 1754 + Update "system_ht32F5xxxx_03.c", modify PLL related setting. 1755 + Change "LIBCFG_WP_2PAGE_PER_BIT" to "LIBCFG_FLASH_2PAGE_PER_WPBIT". 1756 1757 Others 1758 + Update "PWRCU/DeepSleepMode2" example, fix compiler error when DISABLE_DEBUG_PIN = 1. 1759 + Update "WDT/Period_Reload" example, fix comment typing error. 1760 + Add "LIBCFG_CHIPNAME" define. 1761 + Update project setting. 1762 + Update "NVIC/External_Interrupt" example, remove unuse define. 1763 1764/*----------------------------------------------------------------------------------------------------------*/ 1765/* HT32_STD_5xxxx_FWLib_v004_1790 */ 1766/*----------------------------------------------------------------------------------------------------------*/ 1767 Release Date: 2017-09-05 1768 1769 Main Changes 1770 + Fix vector table error ("startup_ht32f5xxxx_01.s"). 1771 1772 Others 1773 + Update "system_ht32f5xxxx_xx.c". 1774 + Update Keil project setting, enable "User->After Build Run #1" as default value to output Binary file. 1775 1776/*----------------------------------------------------------------------------------------------------------*/ 1777/* HT32_STD_5xxxx_FWLib_v004_1753 */ 1778/*----------------------------------------------------------------------------------------------------------*/ 1779 Release Date: 2017-08-31 1780 1781 Main Changes 1782 + Rename "HT32F520xx_FWLib" to "HT32_STD_5xxxx_FWLib" and "520xx" to "5xxxx". 1783 The following files are also renamed. 1784 Old New 1785 ====================================== ====================================== 1786 startup_ht32f520xx_01.s startup_ht32f5xxxx_01.s 1787 system_ht32f520xx_01.c system_ht32f5xxxx_01.c 1788 system_ht32f5xxxx_02.c system_ht32f5xxxx_02.c 1789 ht32f520xx_01_it.c ht32f5xxxx_01_it.c 1790 ht32f523xx_01_usbdconf.h ht32f5xxxx_01_usbdconf.h 1791 ht32f520xx_01_conf.h ht32f5xxxx_conf.h 1792 HT32F520xx_01_DebugSupport.ini HT32F5xxxx_01_DebugSupport.ini 1793 ht32f520xx_sk.c ht32f5xxxx_board_01.c 1794 ht32f520xx_01.h ht32f5xxxx_01.h 1795 1796 Others 1797 + Update "ht32_usbd_core.c" to support vendor function. 1798 + Add "USE_MEM_HT32F5xxxx" define into project. 1799 + Add "USE_MEM_HT32F5xxxx" default define into "ht32f5xxxx_xx_libcfg.h". 1800 + Update the IAP Example. Change IAP loader size from 3 KBytes to 4 KBytes (Since the code size of IAP 1801 example for IAR EWARM is large than 3 KB). 1802 + Add new device support 1803 HT32F5826 1804 1805/*----------------------------------------------------------------------------------------------------------*/ 1806/* HT32F520xx_FWLib_v003_1661 */ 1807/*----------------------------------------------------------------------------------------------------------*/ 1808 Release Date: 2017-07-27 1809 1810 Main Changes 1811 + Add hardware divider driver, "ht32f520xx_div.c/h" 1812 + Update following example to support HT32F52243 and HT32F52253. 1813 DIV, IAP, SPI, TM 1814 Note: The code size of IAP example for IAR EWARM is large than 3 KB. It over Reserved size of the IAP 1815 area. We will update it in the next version. 1816 1817 Others 1818 + Update project related file and setting. 1819 + Modify USB/Mass_Storage example for WIN10 compatibility issue. 1820 + Update "ht32_op.c" and "ht32_op.s", add CK_CODE/CK_DATA/CK_CODEOP in Option Bytes (same format with e-Writer32). 1821 1822/*----------------------------------------------------------------------------------------------------------*/ 1823/* HT32F520xx_FWLib_v003_1566 */ 1824/*----------------------------------------------------------------------------------------------------------*/ 1825 Release Date: 2017-07-17 1826 1827 Main Changes 1828 + Fix COM1 & BUZZER setting error of "ht32f52253_sk.h". 1829 + Update following example to support HT32F52243 and HT32F52253. 1830 ADC, I2C 1831 1832 Others 1833 + Update ht32_op.s and ht32_op.c 1834 1835/*----------------------------------------------------------------------------------------------------------*/ 1836/* HT32F520xx_FWLib_v003_1534 */ 1837/*----------------------------------------------------------------------------------------------------------*/ 1838 Release Date: 2017-07-03 1839 1840 Main Changes 1841 + Add new device support 1842 HT32F52243, HT32F52253 1843 Note: The following example is not supported yet for the HT32F52243 and HT32F52253. 1844 ADC, DIV, I2C, IAP, SPI, TM 1845 + Add IAR EWARMv8 project template (create by IAR EWARM v8.11). 1846 + Update "system_ht32f520xx_01.c" and "system_ht32f520xx_02.c" to support different setting between 1847 IAP and AP. 1848 + Fix "ht32_retarget.c" error (UxART Rx interrupt is no need to turn on). 1849 + Update UxART driver to sync with HT32_STD_1xxxx FW Library. 1850 + Modify following variable name of "MCTM_CHBRKCTRInitTypeDef". 1851 Break -> Break0 1852 BreakPolarity -> Break0Polarity 1853 1854 Others 1855 + Update project related file and setting. 1856 + Upgrade the version of IAR EWARM project template from v6.20 to v6.50. 1857 Note: 1858 1. Supported CMSIS-DAP: IAR EWARM v6.50 and above. 1859 2. RDI/e-Link32 is not supported anymore from the v8.xx of IAR EWARM. 1860 3. For the Cortex-M0+, you must use IAR EWARM v6.40 and above. 1861 + Update file format and coding style. 1862 + Modify "EXTI_DebounceCnt" of "EXTI_InitTypeDef" from u32 to u16, to prevent count setting over range. 1863 1864/*----------------------------------------------------------------------------------------------------------*/ 1865/* HT32F520xx_FWLib_v002_1320 */ 1866/*----------------------------------------------------------------------------------------------------------*/ 1867 Release Date: 2017-05-04 1868 1869 Main Changes 1870 + Fix IAR compiler failed issue of "ht32_cm0plus_misc.c" (Tool Internal Error with Access violation error). 1871 1872 Others 1873 + Fix config error of ADC example, "PWMTrigger_OneShotMode". 1874 + Rename ADC example "PWMTrigger_OneShotMode" as "TM_Trigger". 1875 + Add ADC example, "TM_Trigger_with_Delay". 1876 + Fix I2C register naming (ADDBR to ADDSR). 1877 + Fix build error when Library Debug mode enable. 1878 + Fix IAP example, add "USART_ClearFlag(HTCFG_UART_PORT, USART_FLAG_TOUT)" in the UART ISR. 1879 + Fix SPI Flash dual read, enable dual read function (SPI_DUALCmd()) before send dummy bytes. 1880 1881/*----------------------------------------------------------------------------------------------------------*/ 1882/* HT32F520xx_FWLib_v002_1143 */ 1883/*----------------------------------------------------------------------------------------------------------*/ 1884 Release Date: 2016-10-11 1885 1886 Main Changes 1887 + Fix FLASH_WP_ALLPAGE_SET macro error. 1888 + Add memory footprint information (ht32fxxxxx_xx_libcfg.h). 1889 1890 Others 1891 + Update typing error and naming rule. 1892 + Update "ht32f520xx_02.h" variable data type define to prevent data type confusion (such as const s32 not 1893 equal to sc32). 1894 + Modify Re-target to USB Tx buffer size from 63 to 1. Add notice message for SERIAL_Flush() when Tx buffer 1895 size is lager than 1. 1896 + Update MDK_ARMv5 project setting. 1897 1898/*----------------------------------------------------------------------------------------------------------*/ 1899/* HT32F520xx_FWLib_v002_966 */ 1900/*----------------------------------------------------------------------------------------------------------*/ 1901 Release Date: 2016-08-17 1902 1903 Main Changes 1904 + Add "CKCU_HSIAutoTrimIsReady()" functions. 1905 + Fix Re-target USB virtual bug (Bulk out 64 Bytes without zero length OUT is not allow). 1906 + Add example code. 1907 + Update IAR EWARM project of example codes. 1908 + Add random number function/example. 1909 1910 Others 1911 + Rename and update "HT32_Virtual_COM.inf". Add VID/PID for e-Link32Pro USB to UART function. 1912 + Update pin assignment of HT32F52341 SPI/Master example. 1913 + Fix "CKCU_GetClocksFrequency()" and "CKCU_GetPLLFrequency()" error. 1914 + Update typing error and naming rule. 1915 + Fix USB descriptor error of "ht32_retarget_desc.h". 1916 + Fix CKCU/Clock_Configuration example error (CKOUT pin). 1917 1918/*----------------------------------------------------------------------------------------------------------*/ 1919/* HT32F520xx_FWLib_v002_820 */ 1920/*----------------------------------------------------------------------------------------------------------*/ 1921 Release Date: 2016-06-20 1922 1923 Main Changes 1924 + Fix IAP_Text_RAM example setting error. 1925 + Fix "_USBD_CopyMemory()" error. 1926 + Fix EXTI init sequence of HT32F_DVB_PBInit() which may cause unexpect EXTI interrupt. 1927 + Fix LIBCFG_WP_2PAGE_PER_BIT define error of HT32F52331/41. 1928 + Add project files of MDK_ARMv5 (*.uvprojx), select CMSIS-DAP debug adapter as default setting. 1929 1930 Others 1931 + Fix IAR scanf not work issue 1932 + Add UART interrupt mode for Re-target. 1933 + Improve efficiency of USB re-target (USB IN). 1934 + Modify uIsTerminalOpened check method. 1935 + Fix Re-target to USB bug (OUT data overrun the Rx buffer). 1936 + Remove unnecessary divide/mod operation ("ring_buffer.c", "ht32_serial.c"). 1937 + Remove unnecessary code of "ht32f520xx_tm.c". 1938 + Fix Buffer_GetLength error of "ring_buffer.c". 1939 + Modify __RBIT as RBIT of "ht32_cm0plus_misc.c" (__RBIT is keyword of IAR). 1940