Connect Jetson NX to any STM32

Hi Guys,

In one of my projects, I have a requirement to connect the Jetson NX to the STM32 microcontroller using SPI Communication. Please let me know if anyone has an idea about this.

Thanks in advance.

Any reason why you’ve chosen SPI? Serial (RX/TX) would be loads simpler.

I presume you want the stm32 to act as the SPI slave/peripheral and the jetson to be SPI master? A bit more details of what you want to do and how far you’ve come - e.g. does your stm32 already expose as slave interface with SPI registers?

The pinout of jetson shows it has an SPI1 and SPI2 interface so I guess you’ll chose one and then look for an SPI python library and tell it what the SCK, MISO, MOSI, CS pins are.

I guess you know the basics of how SPI works? Are you more worried about how to implement master (on jetson) or slave (on stm32)

Hi Williams,

Thanks for the response. Regarding the first question, why I’ve chosen SPI is, I have some other sensors which requires I2C and UART. So, SPI is available and I want to use it.

Yes, STM32 should acts as the slave and Jetson NX acts as the Master. So, I haven’t started yet and need some inputs on implementation and how to start?.

So, I have two motors connected to STM32 and from Jetson, I need to send commands to STM32 like Go 10kmph forward, stop, 5kmph forward etc.
I know the SPI working and basics but worried about implementation. Please help me.

Have a reference to below to configure the SPI pinmux by jetson-io.

In that example, they have added the drivers for the Display. We don’t have a driver for communicating with the microcontroller. That is where I am stuck. Please help me if you have any ideas.

Why need display? You can run the jetson-io from ssh connect to Jetson.

No, What I meant was, the reference link you gave me is an example of a led display connecting to jetson via SPI and they already have a driver to detect the display and they just used an API to send the data.

In my case, I want to connect the STM32. So, I don’t have a driver to detect the STM32. So, How do I proceed?

OK, the like guide to enable the SPI interface for Jetson.
For the STM32 spi driver you may need to consult with vendor to get it. Or you can try download from upstream like below.