Hello,
I made a PI controller some years ago to control motor speed by reading the pulses from Hall sensors using a short interrupt routine. It sends the speed via serial so this can be monitored. The serial call in the main body, not the interrupt routine.
The code has been run flawlessly on the classic Uno, Nano, Nucleo32 and Nucleo64.
I am now trying to use it with a Nano ESP32, buy there seems to be a conflict between the external interrupt and serial or USB. When the serial monitor window is closed the system runs perfectly, but when the serial monitor window is opened the serial stops within a second or two and the board resets. This happens regardless of baud rate (which I normally set to 2Mbaud). If the motor is stationary the serial works and streams the (zero) speed of the motor, but once a number of pulses appear on the interrupt input the serial falls over.
Any advice would be appreciated.
Thanks.