There must be a black art to this, as I've not been able to do this so far. I've changed the bootloader to add in MCSPI3_PADS in initialPinMux. I've changed the MUXMode to be 1, since looking at Table 13-4 Core Control Module Pad Configuration Register fields, it seems to want to be MuxMode 1 rather than 0.
I've then written a simple application that uses the IOStream interfaces (CreateFile, and DeviceIoControl to configure and read write status registers, but I'm not seeing anything.
1. Do I need to enable the clock for SPI3, or does the driver handle it? [I've tried EnableDeviceClocks(OMAP_DEVICE_MCSPI3, TRUE); in Eboot and that doesn't seem to have an effect.]
2. I've also tried this in eboot, rather than xldr
OUTREG16(&pConfig->CONTROL_PADCONF_MMC2_DAT3, (INPUT_DISABLE | MUX_MODE_1));
/* McSPI3_CS0 */\
OUTREG16(&pConfig->CONTROL_PADCONF_MMC2_DAT2, (INPUT_DISABLE | MUX_MODE_1));
/* McSPI3_CS1 */\
OUTREG16(&pConfig->CONTROL_PADCONF_MMC2_DAT0, (INPUT_ENABLE | MUX_MODE_1));
/* McSPI3_SOMI */\
OUTREG16(&pConfig->CONTROL_PADCONF_MMC2_CMD, (INPUT_DISABLE | MUX_MODE_1));
/* McSPI3_SIMO */\
OUTREG16(&pConfig->CONTROL_PADCONF_MMC2_CLK, (INPUT_ENABLE | MUX_MODE_1));
/* McSPI3_CLK */
I've also added it into the OS image, and checked that it's there, active in the running drivers list.
I've spent a couple of days on this now, something that should be trivial, yet the complexity of Windows CE means that it's a nightmare to get it working. Any pointers would be much appreciated.
Thanks John Dr.