ESP External Clock

FroggestSpirit
Posts: 9
Joined: Wed Jul 05, 2017 2:55 am

ESP External Clock

Postby FroggestSpirit » Wed Jul 05, 2017 3:00 am

Hi, I'm brand new here. I have been using arduino for projects, and recently invested in an ESP32 Wroom, for the extra power. Right now, I want to interface the ESP32 with a gameboy, I made a cartridge with all 32 pins hooked up to a breadboard. From what I read, the CLK pin runs at 1MHZ, which is what I want to sync the ESP32 to. I also want to disable all un-needed processes, like wifi, bluetooth, etc. I am using the arduino library for this, and I tried using attachInterrupt() with it only triggering on the rising signal, while this did work for slower signals, plugging it into the CLK pin seemed to crash it (possibly from watchdog, which I was hoping to disable too).

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP External Clock

Postby ESP_Sprite » Wed Jul 05, 2017 3:10 am

Unfortunately, interrupts on the ESP32 are a bit more complex than on an AVR (mostly because we need to do a bunch more context switching things, as well as the need to figure out what interrupt is triggered.) This means interrupt latency is about 2uS, which means that at 1MHz, the first interrupt isn't finished yet before the 2nd triggers, and the ESP32 continuously stays in the interrupt handler.

A way around this is to write your own high-level interrupt handler in assembly, but this is not a quick and easy thing...

FroggestSpirit
Posts: 9
Joined: Wed Jul 05, 2017 2:55 am

Re: ESP External Clock

Postby FroggestSpirit » Wed Jul 05, 2017 2:08 pm

Is there a good place to start with this? I've worked with ASM in the past, mostly for gameboy and ARM

Who is online

Users browsing this forum: Baidu [Spider] and 210 guests