Portenta SPI and I2C

Hi everyone!
I am trying to use MBED I2C library to communicate with my accel sensor, but I am facing some problems with configuration...
For I2C I'm using PH_8(SDA) and PH_7(SCL) pins and configuring them with I2C i2c(PH_8, PH_7); - command.

I have also tried:
MbedI2C Wire3(PH_8, PH_7);
but nothing appears on my logic analyzer...

Have someone tried to communicate with the sensor through I2C/SPI? Any examples?

Hi aderman96,

You can use it as standard Arduino I2C Wire library.

#include <Wire.h>

Wire.begin();
Wire.beginTransmission(addr);
Wire.write(data);
...

Hi,
I will test Arduino libs, but my initial idea was using mbed libs and do some async procedures with them. But I2C doesn't work, and SPI crashes after:

MbedSPI* spi = new MbedSPI(PC_3, PC_2, PI_2);
spi->begin();

Respectfully,
Aderman

SPI ist here

#include <SPI.h>

pinMode(DEV_CS_PIN, OUTPUT);
pinMode(DEV_RST_PIN, OUTPUT);
pinMode(DEV_DC_PIN, OUTPUT);
pinMode(DEV_CK_PIN, OUTPUT);
pinMode(DEV_MOSI_PIN, OUTPUT);

SPI.begin();
SPI.beginTransaction(SPISettings(48000000, MSBFIRST, SPI_MODE0));

Some news for I2C?

TWI is here
Wire.begin();

Hello,
Quick question for the community.
As per the Portanta Schematics, there are 3 different I2C enabled couple of pins.
How do we choose between them using the Wire.h library ?

Thanks !