2026-04-22 1:23 PM - last edited on 2026-04-23 7:42 AM by Amel NASRI
Hi everyone,
I am trying to read pulses of a rotary incremental encoder npn on the screen connected to a Jetson sbc, through SPI connection with a STM32 NUCLEO-G474RE. On CubeMx i already modified pins, generated code and flashed on stm32. Once i run the python code on Jetson, no pulses are seen on the monitor.
Do you have any suggestion?
Thank you in advance.
Enrico
2026-04-23 2:32 AM
Hello,
You give little details about the setup, please read the following topic:
We can only help on the STM32 part here.
Post .ioc, source code, pictures etc.
Maybe some body will have some idea.
2026-04-28 5:00 AM
Hello,
Enclosed the .ioc and main file from cubeIDE and cubeMX. Below the pin configuration and wire connection.
| Green A | A0 / PA0 |
| White B | A1 / PA1 |
| Red | 5V |
| Black | GND |
| Gray | GND |
| Pin 23 | SCK | D13 / PA5 |
| Pin 21 | MISO | D12 / PA6 |
| Pin 19 | MOSI | D11 / PA7 |
| Pin 24 | CS | D10 / PA4 |
| Pin 6 | GND | GND |
Thank you in advance for your support!
Best regards,
Enrico
2026-04-28 5:18 AM
Hello,
The green LED is on PA5 on this board.
you should try commenting:
/* Initialize led */
BSP_LED_Init(LED_GREEN);
Maybe removing SB6 as well, if that disturbs the SPI communication.