mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
gpio_filter: Fix test case fail on esp32c6 due to slow io_mux clock compare to 160MHz cpu clock.
This commit is contained in:
parent
19ee95e509
commit
536d5827c0
@ -123,6 +123,10 @@ TEST_CASE("GPIO flex glitch filter enable/disable", "[gpio_filter]")
|
||||
|
||||
printf("generate rising edge glitch signal\r\n");
|
||||
asm volatile("csrrsi zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
asm volatile("csrrsi zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
asm volatile("csrrsi zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
asm volatile("csrrsi zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
|
||||
asm volatile("csrrci zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
|
||||
// should timeout, because the glitch is filtered out
|
||||
@ -133,6 +137,10 @@ TEST_CASE("GPIO flex glitch filter enable/disable", "[gpio_filter]")
|
||||
|
||||
printf("generate rising edge glitch signal again\r\n");
|
||||
asm volatile("csrrsi zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
asm volatile("csrrsi zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
asm volatile("csrrsi zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
asm volatile("csrrsi zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
|
||||
asm volatile("csrrci zero, %0, 0x1" :: "i"(CSR_GPIO_OUT_USER));
|
||||
|
||||
// this time we should see the GPIO interrupt fired up
|
||||
|
Loading…
Reference in New Issue
Block a user