6621Cx GPIO 翻转速度测试

wen sir · 203次点击 · 6个月前

6621CxC,32Mhz

GPIO02 输出翻转测试,测试看最快约16Mhz


void toggle_test(uint32_t pin_mask)
{
    while (1)
    {
        HS_GPIO0->MASK_0_7[0x1<<2] = GPIO_LOW; //gpio02
        HS_GPIO0->MASK_0_7[0x1<<2] = GPIO_HIGH; //gpio02
        HS_GPIO0->MASK_0_7[0x1<<2] = GPIO_LOW; //gpio02
        HS_GPIO0->MASK_0_7[0x1<<2] = GPIO_HIGH; //gpio02
        HS_GPIO0->MASK_0_7[0x1<<2] = GPIO_LOW; //gpio02
        HS_GPIO0->MASK_0_7[0x1<<2] = GPIO_HIGH; //gpio02
        co_delay_10us(1);

    }
}



4d3ecc8186a70a328194309445b56a8.png


image.png

被收藏 0  ∙  0 赞  
加入收藏
点赞
0 回复  
善言善语 (您需要 登录 后才能回复 没有账号 ?)

请先登录网站