Skip to content
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

Register inconsistencies #53

Open
mrx23dot opened this issue Nov 28, 2024 · 3 comments
Open

Register inconsistencies #53

mrx23dot opened this issue Nov 28, 2024 · 3 comments

Comments

@mrx23dot
Copy link

In this repo there are many ch32v00x.h files,

worst of all they disagree, e.g.

ch32v003-main\EVT\EXAM\SRC\Peripheral\inc\ch32v00x.h
#define ADC_JOFFSET1                            ((uint16_t)0x0FFF) /* Data offset for injected channel 1 */
#define ADC_RDATAR_DATA                         ((uint32_t)0x0000FFFF) /* Regular data */
#define FLASH_CTLR_PAGE_PG                      ((uint16_t)0x00010000) /* Page Programming 64Byte */
#define GPIO_LCKK                               ((uint32_t)0x00010000) /* Lock key */
#define AFIO_EXTICR1_EXTI0                      ((uint16_t)0x000F) /* EXTI 0 configuration */
#define RCC_ADCPRE                              ((uint32_t)0x0000C000) /* ADCPRE[1:0] bits (ADC prescaler) */
..
ch32v003-main\CH32V003_1Line_Base_on_CH32F103\CH32V003_FlashPrg_IN_RAM\Peripheral\inc\ch32v00x.h
#define ADC_JOFFSET1                            ((uint16_t)0x03FF) /* Data offset for injected channel 1 */
#define ADC_RDATAR_DATA                         ((uint32_t)0xFFFFFFFF) /* Regular data */
#define FLASH_CTLR_PAGE_PG                      ((uint32_t)0x00010000) /* Page Programming 64Byte */
#define GPIO_LCKK                               ((uint32_t)0x00000100) 
#define AFIO_EXTICR1_EXTI0                      ((uint16_t)0x0003) /* EXTI 0 configuration */
#define RCC_ADCPRE                              ((uint32_t)0x0000F800) /* ADCPRE[4:0] bits (ADC prescaler) */
..

Please only have one ch32v00x.h and make sure it's correct.

@qiyongshuang
Copy link
Collaborator

The library of EVT is standard.

@mrx23dot
Copy link
Author

mrx23dot commented Jan 2, 2025

There are multiple register description files with different content.
I guess they are different versions, one files being the newest.

@qiyongshuang
Copy link
Collaborator

The library of EVT is newest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants