XMC-for-Arduino
XMC-for-Arduino copied to clipboard
XMC4400 Platform2Go mangled Serial port configuration
@jaenrig-ifx @boramonideep Whilst tidying up some aspects of GPIO_RESET and similar things like creating a wiki page for XMC Platform 2 Go X1 and X2 connectors. I discovered a few issues one minor and fix coming up shortly.
Second is Serial Port configuration has been messed up, someone has taken the XMC4700 two serial port code and badly mangled into a SINGLE serial configuration.
Setting SERIAL_ONBOARD will FAIL as the interupt function required when in SERIAL_ONBOARD is correctly configured for starters
.irq_num = USIC0_5_IRQn,
.irq_service_request = 0
However the interupt handler is NOT compiled as NUM_SERIAL is 1 and no setup has been made for serial1
#if (NUM_SERIAL > 1)
void USIC0_5_IRQHandler( void )
{
Serial1.IrqHandler();
}
#endif
Many parts of this etup has been mangled. There are several options
- Use XMC4700 method and have TWO serial ports always enabled Serial for USB debug and Serial1 for onboard
- Properly do the configuration changes of using a single UART and only have Serial.
That type of change decision is NOT mine, however I would choose option 1 as the easiest method and all four separate port pins and connectors are already available