AnsweredAssumed Answered

MKE04Z128 SPI no output

Question asked by Shoaib Shaikh on Jan 9, 2019
Latest reply on Jan 14, 2019 by Shoaib Shaikh

Hi everyone,

I am facing problems in implementing the SPI module in MKE04Z128VLK4 chip. I initialzed the chip for the following conditions.

/*
        * masterConfig->enableStopInWaitMode = false;
        * masterConfig->polarity = kSPI_ClockPolarityActiveHigh;
        * masterConfig->phase = kSPI_ClockPhaseFirstEdge;
        * masterConfig->direction = kSPI_LsbFirst ;
        * masterConfig->dataMode = kSPI_8BitMode;
        * masterConfig->txWatermark = kSPI_TxFifoOneHalfEmpty;
        * masterConfig->rxWatermark = kSPI_RxFifoOneHalfFull;
        * masterConfig->pinMode = kSPI_PinModeOutput;
        * masterConfig->outputMode = kSPI_SlaveSelectAutomaticOutput;
        * masterConfig->baudRate_Bps = 500000U;
        */

The regsiter values are C1 = 0xF3, C2 = 0x19, BR = 0x00;

Chip select pin is high after initializing SPI but does not go low after data is moved to Data register.

The code is entering the ISR but I do not see any output on the pins of CLK or MOSI.

I am also multiplexing the SPI pins initially. I attached my full project.

Thanks,

Attachments

Outcomes