My project uses an MCF51QE128CLH (64 pin). Port B is already used for some ADC pins and I am adding an SD card to SPI1 via free Port-E pins. Ref Manual says these pins are mux'd to PTE pins via SOPT2 register bit.
I have set SOPT2 register to:
SPI1PS bits[ 3:3 ] = 0 SPSCLK1=PTE0;MOSI1=PTE1;MISO1=PTE2;SS1=PTE3
Yet it still sends SPI control to the PTB pins. I have changed the SPI1PS bit to '1' and same, control goes to PTB pins - either setting of this bit and the SPI remains sending data to Port B pins.
I change this bit manually in the generated Cpu.c and recompile, no luck at all.
/* Common initialization of the write once registers */
/* SOPT1: COPE=1,COPT=1,STOPE=0,WAITE=1,??=0,RSTOPE=0,BKGDPE=1,RSTPE=0 */
setReg8(SOPT1, 0xD2U);
/* SOPT2: COPCLKS=0,??=0,??=0,??=0,SPI1PS=0,ACIC2=0,IIC1PS=0,ACIC1=0 */
setReg8(SOPT2, 0x00U);
Is there a bug with the MCF51QE128CLH (64 pin) that prevents these pins from muxing? Or must I do something else in order to get the SPI over to Port E pins
Solved! Go to Solution.
Hi use
/* SOPT2: COPCLKS=0,??=0,??=0,??=0,SPI1PS=1,ACIC2=0,IIC1PS=0,ACIC1=0 */
setReg8(SOPT2, 0x08U);
If you are using PE you can change the pins on this option
I hope this will help you
Have a good day.
Hi use
/* SOPT2: COPCLKS=0,??=0,??=0,??=0,SPI1PS=1,ACIC2=0,IIC1PS=0,ACIC1=0 */
setReg8(SOPT2, 0x08U);
If you are using PE you can change the pins on this option
I hope this will help you
Have a good day.
Thank you for confirming this! I disabled the component, then PE would let me change to PortE, re-enabled, and that did it! Thank you again!