« first day (24 days earlier)   

6:23 AM
you can do it with the digital analyzer/logger in the same way as you obtained the data for decoding you just use high enough sample which will be the time precision of measurement ...
few write cycles are enough no need for entire frame
in the sampled data you will see when the STM actually fires ISR and reads DB (if you set some GPIO and add it to sampled data) ... then you just look at /IOWR pulse in sampled data and see if it still fits the MCP2000 CPU IOWR cycle diagram or not if it is fast enough or not so you can decide if GPIO is OK and just need some tweaking or You have to go for bus or DMA or what ever
 
 
9 hours later…
3:44 PM
@Spektre
but I'f I'm only Interrupting on IOWR
I will miss a lot of samples
and data
IOWR is followed by a stream of data
 
 
1 hour later…
5:03 PM
0.3564636875, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
0.3564643125, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0.3564643750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0.3564664375, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0
0.3564665000, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1
0.3564665625, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1
Time[s], IORD, IOWR, A1, CS1, CS2, RST, D0, D1, D2, D3, D4, D5, D6, D7, VO, OFF
0.0000000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0.3564636250, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
0.3564636875, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
0.3564643125, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0.3564643750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0.3564664375, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0
0.3564665000, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1
for example
at 0.3564636875
IOWR was 1
then it falls 0
now External interrupt triggered
it processes PortD
uint32_t data_word = GPIO-IDR
uint8_t A1 = (data_word >> 8) & 0x01;
uint8_t CS1 = (data_word >> 9) & 0x01;
uint8_t CS2 = (data_word >> 10) & 0x01;
uint8_t data_bits = data_word & 0xFF;
if ((!CS1) && (!A1)) {
LCD1_write_cmd(data_bits);
}
if ((!CS1) && (A1)) {
LCD1_write_dat(data_bits);
}
if ((!CS2) && (!A1)) {
LCD2_write_cmd(data_bits);
}
if ((!CS2) && (A1)) {
LCD2_write_dat(data_bits);
}
it missed
0.3564643750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0.3564664375, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0
0.3564665000, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1
beccause falling edge is triggered once
 
 
3 hours later…
7:48 PM
1. to measure the ISR you have to add a GPIO pin to it and also to data analyzer 2. /IOWR is pulsing per each byte ... so single pulse per single byte ... the data is changing after but those are not meant for LCD its CPU fetching instructions from memory 3. sample /iowr ,d0..d7, /cs1, /cs2, a1 , ISR_pin
where ISR pin is set on ISR start and cleared on ISR exit ...
use higher sampling rate so the /iowr pulse is sampled at least by ~10 samples so we can measure the time more or less acurately
it should look like this:
	_________               __________________________
/IORD	         \_____________/

	              _____________________________
ISR	_____________/                             \______
if its OK then you can change the ISR pin to pulse arounf reading the DB instead of whole ISR
so around line:
var db=get_GPIOs_value(DB_port,DB);
then it should look like:
	_________               __________________________
/IORD	         \_____________/

	              ___
ISR	_____________/   \________________________________
and you might place some small delay to shift the ISR pulse to the right where CPU data is valid during the /IOWR cycle (that diagram in CPU datasheet we discused before)
if its too far right even without delay it means ISR is starting too late
in which case you need to sample the busses without /IOWR ISR continuously
for example in some timer
or by DMA
 

« first day (24 days earlier)