CH32V103 GPIO speed

Hi,


Sorry for these posts but is the fastest GPIO speed actually 50MHz? 

I'm using the SimulateCDC example and am only seeing 84ns rise and fall.


GPIO_InitTypeDef GPIO_InitStructure = {0};

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_Init(GPIOA, &GPIO_InitStructure);


GPIOA->BSHR = GPIO_Pin_0;

GPIOA->BCR = GPIO_Pin_0;

GPIOA->BSHR = GPIO_Pin_0;

GPIOA->BCR = GPIO_Pin_0;



Thank you,

Alex

Hello, about the three selected frequencies (2M, 10M and 50M) of GPIO configured for output mode, these three frequencies refer to the response frequency of GPIO port drive circuit rather than the frequency of output signal. Multiple output drive circuits with different response frequencies are made inside the chip, and users can select the appropriate drive circuit according to their needs. By selecting the output drive circuit with different frequencies, we can achieve the best effect of noise control and power consumption reduction. For example, for serial ports, if the maximum baud rate is only 115.2kb/s, then 2MHz GPIO pin frequency can be used, which saves power and reduces noise. For I2C interface, if you use 400kb/s baud rate and want to leave some margin, 2MHz may not be enough, you can choose 10MHz pin frequency. For SPI interface, if 18Mb/s or 9Mb/s baud rate is used, 10MHz pin frequency is obviously not enough, and 50MHz pin frequency is required.
About the GPIO turnover speed, the maximum should be around 10M


只有登录才能回复,可以选择微信账号登录