DMA/eDMA Guidance

Status
Not open for further replies.
...You are correct, "hi-Z" is theoretically not the same as "input": Academically speaking, the high impedance state merely means "not driving the signal ignoring the signal's state", and again strictly academically speaking, an input state implies that a device is both not driving the signal and is interested in the value of the signal. Clearly your emulated EPROM would not be interested in the contents of the data lines when in hi-Z. :) It's merely a convenient way to use one operation to control whether the 8 simulated data signals are driving the bus versus not driving the bus, and your code may freely ignore the states of the signals while they are not being driven.

seems like pull ups are still enabled when I set input too..can't have that lol
 
So,

Code:
attachInterrupt(digitalPinToInterrupt(37), pinChangeISR, CHANGE);

seems to work reliably, what sort of magic is this..? I supppose I should be diving into the teensy lib source stuff..

reading the manual I wondered if it was:

Code:
GPIO_EDGE_SEL may be used to override the ICR registers' configuration. If the
GPIO_EDGE_SEL bit is set, then a rising edge or falling edge in the correspondingsignal generates an interrupt.
This register provides backward compatibility. On reset allbits are cleared (ICR is not overridden).[/cpde]

that was the magic. seems so:

[code]
https://github.com/PaulStoffregen/cores/blob/master/teensy4/interrupt.c:108
..
	if (mode == CHANGE) {
		gpio[EDGE_INDEX] |= mask;
..

still trying my best to piece everything together.

still not sure why I'm having that issue with GDIR though
 
Sounds like you're on your way. I've wondered for several years whether a Teensy could emulate an EPROM, considering the number of times my co-workers and I wished for rapid turnaround during development, so I hope you will be up for letting us know how it's going.
 
Sounds like you're on your way. I've wondered for several years whether a Teensy could emulate an EPROM, considering the number of times my co-workers and I wished for rapid turnaround during development, so I hope you will be up for letting us know how it's going.

For sure, especially if I get help getting it going, lol. This GDIR issue makes zero sense to me. Unless something is changing in the mux when I change it, which I'm not touching any mux registers..confused.

It is reliably reading addresses from my eeprom reader/burner and seems to be from the ecu as well.. so just need to be able to set gdir/be able to properly/quickly set multiple pins/whole register at once to input or output as needed and I think it'll work..although timing still plays a role, the fact I don't appear to be missing any addresses is a good start.

Doesn't help that I'm a bit rusty in C++.

There are tons of other eeprom emulators available however..the ostrich2 should work with most devices IIRC. Many others are target specific but likely work elsewhere..but having it work on a relatively cheap micro is cool too.
 
Status
Not open for further replies.
Back
Top