Hello again,
More detailed investigation…
My hardware:
STM32F4
2x DIN Modules
2xDOUT modules
I have 2 cores - I could repeat the problem on both of them.
I was trying to find the fault on hardware side - I checked my prototyping 8x8 button matrix few times - I couldn’t find a problem - so I decided to make another one. I took me few hours to make it, then I checked it again and again - looked good.
Connected everything to core - still the same problem. Changed DIN and DOUT boards - still the same. Finally changed core - still the same problem.
More detailed investigation:
There is always 1 button which starts the problem. Depending on script / hardware configuration - there is always pair of pins which starts the crash. To prove it I used single wire with 1 diode to find which pins they are.
Also seems like DOUT module is the one which causes problem - doesn’t matter which shift register is selected on DIN module.
For this configuration:
DIN_MATRIX n= 1 rows=8 sr_dout_sel1= 1 sr_din1= 2 button_emu_id_offset=1001
DOUT:D7 <–> DIN:D0 is a bad pair. Connecting these two with diode will generate stream of messages (on/OFF) as long as the connection is hold. After selecting this pair - the whole first row of the matrix will go crazy - every button will send 1 of 8 numbers assigned to buttons in the row. If any of these buttons is pressed - it will then affect the column as well.
For:
DIN_MATRIX n= 1 rows=8 sr_dout_sel1= 2 sr_din1= 2 button_emu_id_offset=1001
DOUT:D6 <–> DIN:D1 is a bad pair
For:
DIN_MATRIX n= 1 rows=8 sr_dout_sel1= 3 sr_din1= 2 button_emu_id_offset=1001
DOUT:D5 <–> DIN:D2 is a bad pair
For:
DIN_MATRIX n= 1 rows=8 sr_dout_sel1= 4 sr_din1= 2 button_emu_id_offset=1001
DOUT:D4 <–> DIN:D3 is a bad pair
Changing sr_din doesn’t matter - bad pairs remain the same.
I have checked few versions of the firmware:
1.032 Pre1
1.032
1.033 Pre1
1.033 Pre6
1.033 Pre7
All versions have the same problem with bad pairs crashing the whole button matrix.
Any help would be very much appreciated,
Regards,
Bartosz