IHM02A1 L6470 muliple Boards
Hello,
I currently try to use more than one Stepper Motor Controller Board (3 to be precise) stacked. Every single one is working perfect with individual CS jumpers set by using the standard library from st - using the mBed OS.
But using the together don't work: Only the first Board (2 Motors) works. If I swap the CS definitions again only x_nucleo_ihm02a1_A object is working (so the first one initialized). Using only one board the FLAG Led work as expected (off after initialization). Using more than one the Led is always on.
Here are some screenshots from my logic analyzer:

as you can see only the first Board communicate during initialization. The following 2: silence. If I change the SC order again, only the 1st one communicate.

could it be that the SDI/SDO lines are not in
I'm using the Nucleo ST32-L476RG board.
Parts of the Hello Word example code
/* Motor Control Expansion Board. */
XNucleoIHM02A1 *x_nucleo_ihm02a1_A;XNucleoIHM02A1 *x_nucleo_ihm02a1_B;XNucleoIHM02A1 *x_nucleo_ihm02a1_C;DevSPI dev_spi(D11, D12, D3);DigitalOut active(D6);
active=false;
/* Initializing Motor Control Expansion Board. */
active=true; x_nucleo_ihm02a1_A =new
XNucleoIHM02A1(&init[0
], &init[1
], A4, A5, D4, D2, &dev_spi); active=false;active=true;x_nucleo_ihm02a1_B =new
XNucleoIHM02A1(&init[0
], &init[1
], A4, A5, D4, A2, &dev_spi);active=false;
active=true;
x_nucleo_ihm02a1_C =new
XNucleoIHM02A1(&init[0
], &init[1
], A4, A5, D4, D5, &dev_spi);active=false;
/* Building a list of motor control components. */
L6470 **motors[3
]; motors[0
] = x_nucleo_ihm02a1_A->get_components(); motors[1
] = x_nucleo_ihm02a1_B->get_components(); motors[2
] = x_nucleo_ihm02a1_C->get_components(); pcTerminal.printf
(''Motor Control Application Example for 6 Motors\r\n\n''
);int
b;int
m;while
(true
) {for
(b=0
; b<3
; ++b) {for
(m=0
; m<2
; ++m) { pcTerminal.printf
(''Board %d Motor %d Steps %d\r\n''
,b,m,STEPS_1); motors[b][m]->move(StepperMotor::FWD, STEPS_1); wait(1
); } }Any suggestions / help appreciated.
#stm32 #ihm02a1 #stm32l476rg #mbed #l6470