In order to use the NXP MC33664 componant, I need 2 SPI.
One SPI is configured as a master in order to send a message to the MC33664 and another SPI is configured as a slave in order to recieved the response. I know is weird but this componant work in this way.
Currently I anderstand that Arduino has only one SPI, right ? Is there a way to add another SPI GPIO ?
SPI is a bus protocol so you can connect multiple devices to the same bus and control which of them is used at any time by means of their individual SS pins. MISO, MOSI, and CLK are common between all devices
Unfortunately is not so easy with the componant MC33664. One MC33664 need two different SPI to work
That why I ask if there a way to have two different SPI with one arduino
I looked at the datasheet and I do not see anything like that the chip needs a two SPI .
Any SPI works this way - first a request is sent, then a response is received. This does not require two separate SPI buses.
There are a lot of arduino compatible chips that has more than one SPI bus on board - Arduino Due, most of STM32s, RP2040, lot of Teensy.... But I still in doubt that you need this
nope
It is not two SPI ports, the upper is ICSP header for USB-UART chip Atmega16u2
I don't know very well how to use two SPIs on a Due, but this headers definitely is not what you need.
Better take a board, that supports using multiple SPIs in Arduino sketches, for example STM32 bluepill, ESP32 or rp2040
Currently I found an Arduino uno and a raspberry, I imagined to use the raspberry as a master connect to the MC33664 and the arduino as a slave connect to the MC33664, but I'm not sure it could work...
I think I should use one of boards you propose, but in anyway, the program to make seems complex to perform
In order to send a message, use SPI1
MCU(Master) ---> MC33664 ---> MC33772(slave)
In order to receive a message (the response), use SPI2
MCU(Slave) <-- MC33664 <-- MC33772(Master)
I try to use the example "master_slave_polling" from ESP32 lib, but it doesn't work for me.
So I would like to start from the beginning with you and hope someone could help me to complet the code.
Your questions are not clear.
You don't explain what's mean 'it doesn't work".
Please provide complete code and explanation< how it should work and how it works in reality