I'm doing some pulse generator with a simple timer to drive the stepper driver (DRV8225), In the timer interrupt callback, the designated pin is toggled, but when I run the code the pin state has not changed, I put the LED pin, inside the interrupts and its work fine while the driver pin dose not change, following is the timer call back
```cpp
void ARDUINO_ISR_ATTR timerCBS0(){
portENTER_CRITICAL_ISR(&locks0);
digitalWrite(GPIO_NUM_17, !digitalRead(GPIO_NUM_17)); //no change
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); // has changed
portEXIT_CRITICAL_ISR(&locks0);
}
```
any tips really appreciated
digitalWrite not working
-
- Posts: 101
- Joined: Tue Mar 22, 2022 5:23 am
Re: digitalWrite not working
Hi, I think you may get more responses if you post the circuit diagram.
Re: digitalWrite not working
I only use dev board , but I think pins 16&17 dedicated for PSRAM and I mess up with them
Who is online
Users browsing this forum: No registered users and 80 guests