Infineon / XMC-for-Arduino

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

onboard serial not working #244

Closed ststolz closed 1 year ago

ststolz commented 1 year ago

Have you looked for an answer?

I found no comprehensive documentation on using onboard serial on xmc2go. I only found this thread, but the content does not seem up-to-date. It is stated to undefine SERIAL_DEBUG to make it work. When I looked in actual code, it seems more that SERIAL_ONBOARD should be defined. See related issue #243

Reproduce

  1. Used Arduino Pins 6 and 7 to connect rx, tx
  2. Shared common GND
  3. Set #define SERIAL_ONBOARD 1 on sender and receiver
  4. Transferred code with minimal example to both (gist with minimal example)
  5. Disconnected from computer and connected to power only

But still no communication between both. Code should indicate this with onboard LEDs like it can be seen in gist. The green led is flashing all the time (indicating rx/tx communication?). And the receiver receives Bytes in irregular intervals, but definitely not when the sender sends them.

Question/Issue:

Is there any good documentation on onboard serial with xmc2o or can someone help me what I did wrong?

Context

I am using platformio with Linux. Used code see in reproduce. platform = infineon/infineonxmc@^1.2.0

Where did you expect to find the answer?

https://github.com/Infineon/XMC-for-Arduino/wiki

THANKS!
ststolz commented 1 year ago

Ok, my fault. I defined SERIAL_ONBOARD in main.cpp. It has to be set as build flag. Updated gist with information and a README how to set it up. Perhaps this can be used to update wiki.