Code: Untitled.c Select all
portENTER_CRITICAL(&delay_spinlock);
portEXIT_CRITICAL(&delay_spinlock);
Code: Untitled.c Select all
portENTER_CRITICAL(&delay_spinlock);
portEXIT_CRITICAL(&delay_spinlock);
Thanks for reply.These 2 macros disable interrupts up to and including level 3. Interrupts level 4 and 5 are still allowed in FreeRTOS critical sections. In practice, you may find that disabling interrupts up to level 4 will give the result you need. Note however that your timing requirements come from some bitbanging procedure, it may be better to use one of the ESP32's peripherals (RMT, I2S) instead.
Users browsing this forum: No registered users and 1 guest