Infineon / XMC-for-Arduino

Integration of Infineon's XMC microcontrollers into the Arduino IDE.
Other
106 stars 67 forks source link

Only SPI or I2C? #242

Closed timmornYE closed 1 year ago

timmornYE commented 1 year ago

Have you looked for an answer?

Wiki states "Only one out of two communication protocols can be used at the same time, e.g. either SPI or I2C."

Question/Issue:

Does that mean, that I can not use SPI and I2C in the same program? Or is it possible to switch somehow? e.g. reading value oder I2C and then switching to SPI to send it.

Does this also apply to UART?

THANKS!
techpaul commented 1 year ago

YES as you have the smallest processor, there are some limitations.

The USIC channels can be configured as Serial/I2C/.SPi/IIS etc... However as that board only has TWO channels on one USIC, one is reserved for serial, and the other is EITHER SPI or I2C.

There is in the libraries there are end() methods to release the SPI or I2C. I would not like to guarantee how sucessfully that will fit with YOUR APPLICATION.

Serial.end() ends but does NOT release the channel for other use.

If multiple I2C and SPI permananetly needed XMC1400 board or higher iwould be better fit.