Skip to content

[CH32VM00X] Support TSSOP20 variants ch32v002f4 ch32v006f8 #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d33ea3d
Support for CH32V002F4
maxint-rd Jun 10, 2025
b3a6996
Support CH32V006F8
maxint-rd Jun 10, 2025
1e87575
Support for CH32V002F4
maxint-rd Jun 10, 2025
2b0263c
Support for CH32V002F4 CH32V006F8, peripheral menu in IDE
maxint-rd Jun 10, 2025
c54a193
Add CH32VM00x
maxint-rd Jun 10, 2025
6519967
fix clock capitalization (see #66 and #27)
maxint-rd Jun 10, 2025
23446f6
TSSOP20 details
maxint-rd Jun 10, 2025
f32234d
added info
maxint-rd Jun 14, 2025
dc823f8
Added info and instructions
maxint-rd Jun 14, 2025
820b763
Enable all peripherals when IDE_MENU_PERIPHERALS is not defined
maxint-rd Jun 14, 2025
4ffd1ed
support-CH32V002F4-CH32V006F8 (#200)
maxint-rd Jun 14, 2025
e55d446
Added links to related info.
maxint-rd Jun 15, 2025
dba3e59
No PortB on CH32V002
maxint-rd Jul 1, 2025
0ba5748
No PortB on CH32V002, size optimization for CH32V002
maxint-rd Jul 1, 2025
a3b878e
Check for GPIOB_BASE definition
maxint-rd Jul 1, 2025
5668061
Support dual/single use of USART1 and USART2, see notes in variant...h
maxint-rd Jul 11, 2025
d737928
Do not use V006 defaults for CH32V002F4
maxint-rd Jul 14, 2025
5ca1a93
V002 and V004 have no USART2
maxint-rd Jul 14, 2025
c06c41f
Optimize flash size (see #204) and fix reversed micros() (issue #65)
maxint-rd Jul 14, 2025
2d8d867
avoid 64-bit division by delayMicroseconds() (see #204)
maxint-rd Jul 14, 2025
b20f55a
Update from latest EVT code required to support EEPROM library
maxint-rd Jul 21, 2025
8a07800
Support larger EEPROM (122B), tested on V002/V006 (and also X033)
maxint-rd Jul 21, 2025
eabaea3
Updated version and documentation
maxint-rd Jul 21, 2025
c9932eb
Updated documentation
maxint-rd Jul 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 142 additions & 4 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

menu.pnum=Board Select
menu.clock=Clock Select

#menu.peripherals=peripherals
menu.periADC=ADC Module
menu.periUART=UART Module
menu.periSPI=SPI Module
menu.periI2C=I2C Module
menu.periI2Cslave=I2C Slave Option
menu.periTimer=Hardware Timer

menu.xserial=U(S)ART support
menu.usb=USB support (if available)
menu.xusb=USB speed (if available)
Expand All @@ -14,8 +23,8 @@ menu.upload_method=Upload method



##############################################################################
##CH32V00x_EVT Board
#############################################################################
##CH32V00x EVT Board

CH32V00x_EVT.name=CH32V00x
CH32V00x_EVT.build.core=arduino
Expand All @@ -38,7 +47,7 @@ CH32V00x_EVT.menu.pnum.CH32V003F4.build.variant=CH32V00x/CH32V003F4
CH32V00x_EVT.menu.pnum.CH32V003F4.build.chip=CH32V003F4
CH32V00x_EVT.menu.pnum.CH32V003F4.build.march=rv32ecxw
CH32V00x_EVT.menu.pnum.CH32V003F4.build.mabi=ilp32e
CH32V00x_EVT.menu.pnum.CH32V003F4.build.math_lib_gcc=-lm
CH32V00x_EVT.menu.pnum.CH32V003F4.build.math_lib_gcc=-lm
CH32V00x_EVT.menu.pnum.CH32V003F4.build.IQ_math_RV32=
CH32V00x_EVT.menu.pnum.CH32V003F4.build.ch_extra_lib=-lprintf

Expand All @@ -53,6 +62,31 @@ CH32V00x_EVT.menu.upload_method.ispMethod.upload.protocol=
CH32V00x_EVT.menu.upload_method.ispMethod.upload.options=
CH32V00x_EVT.menu.upload_method.ispMethod.upload.tool=wchisp

# Peripherals Options
CH32V00x_EVT.menu.periADC.disable=disabled (default)
CH32V00x_EVT.menu.periADC.disable.build.periADC=
CH32V00x_EVT.menu.periADC.enable=enabled
CH32V00x_EVT.menu.periADC.enable.build.periADC=-DADC_MODULE_ENABLED
CH32V00x_EVT.menu.periUART.disable=disabled (default)
CH32V00x_EVT.menu.periUART.disable.build.periUART=
CH32V00x_EVT.menu.periUART.enable=enabled
CH32V00x_EVT.menu.periUART.enable.build.periUART=-DUART_MODULE_ENABLED
CH32V00x_EVT.menu.periSPI.disable=disabled (default)
CH32V00x_EVT.menu.periSPI.disable.build.periSPI=
CH32V00x_EVT.menu.periSPI.enable=enabled
CH32V00x_EVT.menu.periSPI.enable.build.periSPI=-DSPI_MODULE_ENABLED
CH32V00x_EVT.menu.periI2C.disable=disabled (default)
CH32V00x_EVT.menu.periI2C.disable.build.periI2C=
CH32V00x_EVT.menu.periI2C.enable=enabled
CH32V00x_EVT.menu.periI2C.enable.build.periI2C=-DI2C_MODULE_ENABLED
CH32V00x_EVT.menu.periI2Cslave.disable=disabled (default)
CH32V00x_EVT.menu.periI2Cslave.disable.build.periI2Cslave=-DOPT_I2C_SLAVE=0
CH32V00x_EVT.menu.periI2Cslave.enable=enabled
CH32V00x_EVT.menu.periI2Cslave.enable.build.periI2Cslave=-DOPT_I2C_SLAVE=1
CH32V00x_EVT.menu.periTimer.disable=disabled (default)
CH32V00x_EVT.menu.periTimer.disable.build.periTimer=
CH32V00x_EVT.menu.periTimer.enable=enabled
CH32V00x_EVT.menu.periTimer.enable.build.periTimer=-DTIM_MODULE_ENABLED

# Clock Select
CH32V00x_EVT.menu.clock.48MHz_HSI=48MHz Internal
Expand Down Expand Up @@ -130,6 +164,23 @@ CH32VM00X_EVT.build.variant_h=variant_{build.board}.h
CH32VM00X_EVT.debug.tool=gdb-WCH_LinkE


#CH32V002F4 EVT Board
CH32VM00X_EVT.menu.pnum.CH32V002F4=CH32V002F4 EVT
CH32VM00X_EVT.menu.pnum.CH32V002F4.node=NODE_V002F4
CH32VM00X_EVT.menu.pnum.CH32V002F4.upload.maximum_size=16384
CH32VM00X_EVT.menu.pnum.CH32V002F4.upload.maximum_data_size=4096
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.mcu=QingKe-V2C
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.board=CH32V002F4
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.series=CH32VM00X
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.variant=CH32VM00X/CH32V002F4
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.chip=CH32V002F4
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.march=rv32ecxw
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.mabi=ilp32e
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.math_lib_gcc=-lm
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.IQ_math_RV32=
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.ch_extra_lib=-lprintf
CH32VM00X_EVT.menu.pnum.CH32V002F4.build.ldscript=LinkV002.ld

#CH32V006K8 EVT Board
CH32VM00X_EVT.menu.pnum.CH32V006K8=CH32V006K8 EVT
CH32VM00X_EVT.menu.pnum.CH32V006K8.node=NODE_V006K8
Expand All @@ -145,7 +196,24 @@ CH32VM00X_EVT.menu.pnum.CH32V006K8.build.mabi=ilp32e
CH32VM00X_EVT.menu.pnum.CH32V006K8.build.math_lib_gcc=-lm
CH32VM00X_EVT.menu.pnum.CH32V006K8.build.IQ_math_RV32=
CH32VM00X_EVT.menu.pnum.CH32V006K8.build.ch_extra_lib=-lprintf

CH32VM00X_EVT.menu.pnum.CH32V006K8.build.ldscript=Link.ld

#CH32V006F8 EVT Board
CH32VM00X_EVT.menu.pnum.CH32V006F8=CH32V006F8 EVT
CH32VM00X_EVT.menu.pnum.CH32V006F8.node=NODE_V006F8
CH32VM00X_EVT.menu.pnum.CH32V006F8.upload.maximum_size=63488
CH32VM00X_EVT.menu.pnum.CH32V006F8.upload.maximum_data_size=8192
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.mcu=QingKe-V2C
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.board=CH32V006F8
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.series=CH32VM00X
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.variant=CH32VM00X/CH32V006F8
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.chip=CH32V006F8
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.march=rv32ecxw
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.mabi=ilp32e
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.math_lib_gcc=-lm
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.IQ_math_RV32=
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.ch_extra_lib=-lprintf
CH32VM00X_EVT.menu.pnum.CH32V006F8.build.ldscript=Link.ld

# Upload menu
CH32VM00X_EVT.menu.upload_method.swdMethod=WCH-SWD
Expand All @@ -158,6 +226,34 @@ CH32VM00X_EVT.menu.upload_method.ispMethod.upload.options=
CH32VM00X_EVT.menu.upload_method.ispMethod.upload.tool=wchisp


# Peripherals Options
CH32VM00X_EVT.menu.periADC.disable=disabled (default)
CH32VM00X_EVT.menu.periADC.disable.build.periADC=
CH32VM00X_EVT.menu.periADC.enable=enabled
CH32VM00X_EVT.menu.periADC.enable.build.periADC=-DADC_MODULE_ENABLED
CH32VM00X_EVT.menu.periUART.disable=disabled (default)
CH32VM00X_EVT.menu.periUART.disable.build.periUART=
CH32VM00X_EVT.menu.periUART.enable=enabled
CH32VM00X_EVT.menu.periUART.enable.build.periUART=-DUART_MODULE_ENABLED
CH32VM00X_EVT.menu.periSPI.disable=disabled (default)
CH32VM00X_EVT.menu.periSPI.disable.build.periSPI=
CH32VM00X_EVT.menu.periSPI.enable=enabled
CH32VM00X_EVT.menu.periSPI.enable.build.periSPI=-DSPI_MODULE_ENABLED
CH32VM00X_EVT.menu.periI2C.disable=disabled (default)
CH32VM00X_EVT.menu.periI2C.disable.build.periI2C=
CH32VM00X_EVT.menu.periI2C.enable=enabled
CH32VM00X_EVT.menu.periI2C.enable.build.periI2C=-DI2C_MODULE_ENABLED
CH32VM00X_EVT.menu.periI2Cslave.disable=disabled (default)
CH32VM00X_EVT.menu.periI2Cslave.disable.build.periI2Cslave=-DOPT_I2C_SLAVE=0
CH32VM00X_EVT.menu.periI2Cslave.enable=enabled
CH32VM00X_EVT.menu.periI2Cslave.enable.build.periI2Cslave=-DOPT_I2C_SLAVE=1
CH32VM00X_EVT.menu.periTimer.disable=disabled (default)
CH32VM00X_EVT.menu.periTimer.disable.build.periTimer=
CH32VM00X_EVT.menu.periTimer.enable=enabled
CH32VM00X_EVT.menu.periTimer.enable.build.periTimer=-DTIM_MODULE_ENABLED



# Clock Select
CH32VM00X_EVT.menu.clock.48MHz_HSI=48MHz Internal
CH32VM00X_EVT.menu.clock.48MHz_HSI.build.flags.clock=-DSYSCLK_FREQ_48MHz_HSI=48000000 -DF_CPU=48000000
Expand Down Expand Up @@ -250,6 +346,22 @@ CH32X035_EVT.menu.pnum.CH32X035G8U.build.math_lib_gcc=-lm
CH32X035_EVT.menu.pnum.CH32X035G8U.build.IQ_math_RV32=
CH32X035_EVT.menu.pnum.CH32X035G8U.build.ch_extra_lib=-lprintf

#CH32X033F8P EVT Board
CH32X035_EVT.menu.pnum.CH32X033F8P=CH32X033F8P EVT
CH32X035_EVT.menu.pnum.CH32X033F8P.node=NODE_X033F8P
CH32X035_EVT.menu.pnum.CH32X033F8P.upload.maximum_size=63488
CH32X035_EVT.menu.pnum.CH32X033F8P.upload.maximum_data_size=20480
CH32X035_EVT.menu.pnum.CH32X033F8P.build.mcu=QingKe-V4C
CH32X035_EVT.menu.pnum.CH32X033F8P.build.board=CH32X033F8P
CH32X035_EVT.menu.pnum.CH32X033F8P.build.series=CH32X035
CH32X035_EVT.menu.pnum.CH32X033F8P.build.variant=CH32X035/CH32X033F8P
CH32X035_EVT.menu.pnum.CH32X033F8P.build.chip=CH32X033F8P
CH32X035_EVT.menu.pnum.CH32X033F8P.build.march=rv32imacxw
CH32X035_EVT.menu.pnum.CH32X033F8P.build.mabi=ilp32
CH32X035_EVT.menu.pnum.CH32X033F8P.build.math_lib_gcc=-lm
CH32X035_EVT.menu.pnum.CH32X033F8P.build.IQ_math_RV32=
CH32X035_EVT.menu.pnum.CH32X033F8P.build.ch_extra_lib=-lprintf


# Upload menu
CH32X035_EVT.menu.upload_method.swdMethod=WCH-SWD
Expand All @@ -261,6 +373,32 @@ CH32X035_EVT.menu.upload_method.ispMethod.upload.protocol=
CH32X035_EVT.menu.upload_method.ispMethod.upload.options=
CH32X035_EVT.menu.upload_method.ispMethod.upload.tool=wchisp

# Peripherals Options
CH32X035_EVT.menu.periADC.disable=disabled (default)
CH32X035_EVT.menu.periADC.disable.build.periADC=
CH32X035_EVT.menu.periADC.enable=enabled
CH32X035_EVT.menu.periADC.enable.build.periADC=-DADC_MODULE_ENABLED
CH32X035_EVT.menu.periUART.disable=disabled (default)
CH32X035_EVT.menu.periUART.disable.build.periUART=
CH32X035_EVT.menu.periUART.enable=enabled
CH32X035_EVT.menu.periUART.enable.build.periUART=-DUART_MODULE_ENABLED
CH32X035_EVT.menu.periSPI.disable=disabled (default)
CH32X035_EVT.menu.periSPI.disable.build.periSPI=
CH32X035_EVT.menu.periSPI.enable=enabled
CH32X035_EVT.menu.periSPI.enable.build.periSPI=-DSPI_MODULE_ENABLED
CH32X035_EVT.menu.periI2C.disable=disabled (default)
CH32X035_EVT.menu.periI2C.disable.build.periI2C=
CH32X035_EVT.menu.periI2C.enable=enabled
CH32X035_EVT.menu.periI2C.enable.build.periI2C=-DI2C_MODULE_ENABLED
CH32X035_EVT.menu.periI2Cslave.disable=disabled (default)
CH32X035_EVT.menu.periI2Cslave.disable.build.periI2Cslave=-DOPT_I2C_SLAVE=0
CH32X035_EVT.menu.periI2Cslave.enable=enabled
CH32X035_EVT.menu.periI2Cslave.enable.build.periI2Cslave=-DOPT_I2C_SLAVE=1
CH32X035_EVT.menu.periTimer.disable=disabled (default)
CH32X035_EVT.menu.periTimer.disable.build.periTimer=
CH32X035_EVT.menu.periTimer.enable=enabled
CH32X035_EVT.menu.periTimer.enable.build.periTimer=-DTIM_MODULE_ENABLED


# Clock Select
CH32X035_EVT.menu.clock.48MHz_HSI=48MHz Internal
Expand Down
33 changes: 28 additions & 5 deletions cores/arduino/ch32/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,39 @@ uint32_t getCurrentMillis(void)

uint32_t getCurrentMicros(void)
{

#if defined(CH32VM00X) || defined(CH32V00x)
// MMOLE 250708: a uint64_t division causes need for __udivdi3, which is quite large (more than 1KB)
// SysTick->CMP and CNT are 32-bit values, let's try to avoid 64 bit divisions to minimize Flash usage
// (This might cause smaller roll-over, but who cares...)
// NOTE: 64 bit divisions are also used by delayMicroseconds() in wiring_time.h
uint32_t m0 = GetTick();
__IO uint32_t u0 = SysTick->CNT;
uint32_t m1 = GetTick();
__IO uint32_t u1 = SysTick->CNT; //may be a interruption
uint32_t tms = SysTick->CMP + 1;

if (m1 != m0) {
//return (m1 * 1000 + ((tms - u1) * 1000) / tms);
return m1 * 1000 + u1 * 1000 / tms; // fix issue #65
} else {
//return (m0 * 1000 + ((tms - u0) * 1000) / tms);
return m0 * 1000 + u0 * 1000 / tms; // fix issue #65
}
#else
uint64_t m0 = GetTick();
__IO uint64_t u0 = SysTick->CNT;
uint64_t m1 = GetTick();
__IO uint32_t u1 = SysTick->CNT; //may be a interruption
uint64_t tms = SysTick->CMP + 1;

if (m1 != m0) {
return (m1 * 1000 + ((tms - u1) * 1000) / tms);
//return (m1 * 1000 + ((tms - u1) * 1000) / tms);
return m1 * 1000 + u1 * 1000 / tms; // fix issue #65
} else {
return (m0 * 1000 + ((tms - u0) * 1000) / tms);
//return (m0 * 1000 + ((tms - u0) * 1000) / tms);
return m0 * 1000 + u0 * 1000 / tms; // fix issue #65
}
#endif
}


Expand Down Expand Up @@ -112,9 +133,11 @@ uint32_t getCurrentMicros(void)
tms = (tms << 32) + *((__IO uint32_t *)SYSTICK_CMPL) + 1;

if (m1 != m0) {
return (m1 * 1000 + ((tms - u1) * 1000) / tms);
//return (m1 * 1000 + ((tms - u1) * 1000) / tms);
return m1 * 1000 + u1 * 1000 / tms; // fix issue #65
} else {
return (m0 * 1000 + ((tms - u0) * 1000) / tms);
//return (m0 * 1000 + ((tms - u0) * 1000) / tms);
return m0 * 1000 + u0 * 1000 / tms; // fix issue #65
}
}

Expand Down
28 changes: 27 additions & 1 deletion cores/arduino/wiring_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,31 @@ extern void delay(uint32_t ms) ;
static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused));
static inline void delayMicroseconds(uint32_t us)
{
#if defined(CH32VM00X) || defined(CH32V00x)
// MMOLE 250708: a uint64_t division causes need for __udivdi3, which is quite large (more than 1KB)
// SysTick->CMP and CNT are 32-bit values, let's try to avoid 64 bit divisions to minimize Flash usage
// (This might cause smaller roll-over, but who cares...)
// NOTE: 64 bit divisions are also used by micros() in clock.c
__IO uint32_t currentTicks = SysTick->CNT;
/* Number of ticks per millisecond */
uint32_t tickPerMs = SysTick->CMP + 1;
/* Number of ticks to count */
uint32_t nbTicks = ((us - ((us > 0) ? 1 : 0)) * tickPerMs) / 1000;
/* Number of elapsed ticks */
uint32_t elapsedTicks = 0;
__IO uint32_t oldTicks = currentTicks;
do {
currentTicks = SysTick->CNT;
// elapsedTicks += (oldTicks < currentTicks) ? tickPerMs + oldTicks - currentTicks :
// oldTicks - currentTicks;

//increment
elapsedTicks += (oldTicks <= currentTicks) ? currentTicks - oldTicks :
tickPerMs - oldTicks + currentTicks;

oldTicks = currentTicks;
} while (nbTicks > elapsedTicks);
#else
__IO uint64_t currentTicks = SysTick->CNT;
/* Number of ticks per millisecond */
uint64_t tickPerMs = SysTick->CMP + 1;
Expand All @@ -83,7 +108,8 @@ static inline void delayMicroseconds(uint32_t us)
tickPerMs - oldTicks + currentTicks;

oldTicks = currentTicks;
} while (nbTicks > elapsedTicks);
} while (nbTicks > elapsedTicks);
#endif
}
#else
#define SYSTICK_CNTL (0xE000F004)
Expand Down
19 changes: 16 additions & 3 deletions libraries/EEPROM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ The EEPROM library provides an easy to use interface to interact with the intern
This CH32 version of the library provides a familiar API to emulated EEPROM using the Option bytes area in flash memory.

Ported to CH32 by Maxint R&D, based on multiple sources:
- Code from the Option Data example of CH32V003fun by @CNLOHR.
- Code from the Option Data example of CH32V003fun by @CNLOHR and various WCH EVT Flash examples.
- Arduino original copyright (c) 2006 David A. Mellis. All right reserved. New version by Christopher Andrews 2015.
- ESP8266 version copyright (c) 2014 Ivan Grokhotkov. All rights reserved.

## Table of contents
- [CH32V003 emulated EEPROM](#ch32v003-emulated-eeprom)
- [CH32 boards with larger emulated EEPROM](#ch32-boards-with-larger-emulated-eeprom)
- [How to use this library](#how-to-use-this-library)
- [Library functions](#library-functions)
- [Features & limitations](#features--limitations)
Expand Down Expand Up @@ -41,6 +42,17 @@ Layout for uint8_t _data[26]: { ob[4], ob[6], ob[16...62] ].

The first release of this library was made for the CH32V003 and only uses the user select word storage area.
It was tested using Arduino IDE 2.3.2 and OpenWCH core 1.0.4.

### CH32 boards with larger emulated EEPROM
Depending on the board, the size of the user-defined information storage area can be different, allowing for a larger emulated EEPROM.
For all CH32 chips the starting address is 0x1FFFF800. The first 16 bytes is for configuration, including 4 bytes for data0/data1.
The remainder can be used for EEPROM values and their inverse. The method to write these bytes can be different per chip.
- 64B => 2+(64-16)/2=2+24=26B: CH32V003
- 128B => 2+(128-16)/2=2+56=58B: CH32V103, CH32V20x, CH32V30x/31x
- 256B => 2+(256-16)/2=2+120=122B: CH32V002/V004/V006/V007, CH32X033/X035

Currently tested to work: CH32V003/CH32V002/CH32V006/CH32X033.
(CH32VM00X required updated ch32v00x_flash.c from latest EVT code)
Future releases of this library may support other CH32 processors and allow for larger memory sizes.

### **How to use this library**
Expand Down Expand Up @@ -150,8 +162,9 @@ The method returns a `uint32_t` value, containing the data0 and data1 bytes and
---

## Features & limitations
- The first release of this library was made only for the CH32V003 and has been tested on that MCU only. Other members of the CH32 may behave incorrectly or not work at all.
- This EEPROM implementation for the CH32V003 has only 26 bytes available. When addressing more, things are likely to go wrong. A future release may allow using more pages from the flash memory.
- The first release of this library was made for the CH32V003, offering 26 bytes of emulated EEPROM. It was tested on CH32V003 and CH32X033.
. The next release offered 122 bytes of emulated EEPROM on CH32X035/X033 and CH32VM00X (V002/V004/V006/V008). It passed tests on V002, V006 and X033.
- Other members of the CH32 may behave incorrectly or not work at all. A test on V103 showed issues writing more than the first two bytes.
- Most CH32 EEPROM methods are the same as their equivalent on regular Arduino's. BEWARE: The begin() and end() methods are like their counterparts for ESP8266/ESP32, but are very different from the begin() and end() methods of EEPROM v2.0 by Christopher Andrews, who introduced them to support C++ iterators. This library follows the begin() convention introduced by the Serial and Wire classes, i.e. to initialize the object.

## Disclaimer
Expand Down
2 changes: 1 addition & 1 deletion libraries/EEPROM/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=EEPROM
version=1.0.0
version=1.0.2507
author=Maxint
maintainer=https://github.com/maxint-rd
sentence=Enables reading and writing to non-volatile storage in the processor.
Expand Down
Loading