Closing SPI-0 affects SCI-1

This is a wierd one...

Chip is R7FA2E1A93CFM

here is the initialisation

R_SCI_UART_Open (&g_mainUart_ctrl, &g_mainUart_cfg);

R_SCI_UART_Open (&g_ASEUart_ctrl, &g_ASEUart_cfg); // not used

R_SCI_UART_Open (&g_HLIUart_ctrl, &g_HLIUart_cfg); // not used

R_GPT_Open (&g_PWMRed_ctrl, &g_PWMRed_cfg);

R_GPT_Open (&g_PWMGreen_ctrl, &g_PWMGreen_cfg);

R_GPT_Open (&g_PWMBlue_ctrl, &g_PWMBlue_cfg);

R_AGT_Open (&g_timer10mS_ctrl, &g_timer10mS_cfg);

R_AGT_Start (&g_timer10mS_ctrl);

R_AGT_Open (&g_timer100mS_ctrl, &g_timer100mS_cfg);

R_AGT_Start (&g_timer100mS_ctrl);

R_FLASH_LP_Open (&g_flash0_ctrl, &g_flash0_cfg);

R_IIC_MASTER_Open (&IICMASTER_ctrl, &IICMASTER_cfg);

R_IIC_MASTER_SlaveAddressSet (&IICMASTER_ctrl, RTCADDRESS, I2C_MASTER_ADDR_MODE_7BIT);

SDCard_Stop ();

LCDBLACK

;

pwmColourSet (red, green, blue);

R_GPT_Start (&g_PWMGreen_ctrl);

R_GPT_Start (&g_PWMBlue_ctrl);

R_GPT_Start (&g_PWMRed_ctrl);

LCD_DRV_Start ();

LCD_DRV_ClearDisplay();

clearDisplayBuffer ();

readConfigurationFromFlash ();

fieldTerminationTransmit.messageTimeout = FIELDMESSAGETIMEOUT;

//perform a RESET and everything

resetAll ();

readTime ();

Main UART is on Channel 1, the others are future use.

The routine SDCard_Stop has a line...

R_SPI_Close (&g_spi0_ctrl);

This causes the Main UART to stop operating...

SPI0 is on Pins 100, 101, 102, with no SLA

Main Uart SCI1 is on Pins P401, P502

Is there a technical reason for this or do I need to dig deeper?

I had another problem where SCI1 RXD would only work on P502. The others (P212, P402) seemed to be loading the signal.

I still do not know why. I have used the internal clock and set the external clocks to non-populated.

Any suggestions would be appreciated.

Thanks in Advance

Ian