Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
Good morning gents,
I've been stuck on this one for a few days and I'd be grateful for any tips.
In my application, I want to use MIBSPI3CLK, MIBSPI3SOMI and MIBSPI3SIMO as a GIO pin. I will not be using any of the MIBSPI3 pins for SPI purposes.
In Halcogen I have enabled the SPI3 Driver:
and in SPI3 I have selected the following:
I have left MIBSPI3 as it was.
In CCS I have included spi.h in my sys_main.c and I have added the following lines
/*Bring SPI out of reset.*/ spiREG3->GCR0 = 1U; // we don't want the full functionality of SPI, hence why we don't call spiInit()
gioSetDirection(spiPORT3, 0x000000FF);
And within my while(1) I have
gioToggleBit(spiPORT3,9); // CLK gioToggleBit(spiPORT3,10); // SIMO gioToggleBit(spiPORT3,11); // SOMI
However, this does not work. I am toggling other GIO ports successfully, so I suspect there is something dodgy about the way I have configured SPI3. Any guidance/advice would be greatly appreciated.
Regards,
Sofia