AnsweredAssumed Answered

How to configure Pin Control Register?

Question asked by Yadhukrishnan V M on Dec 2, 2016


 I am Yadu, I am doing bit banging code for SPI to access a SPI FLASH. I am doing it in K60N. There is W25Q64FV spi flash. I am doing bit banging code in processor expert driver suit and link it to IAR. I want to use the pins PTE0,PTE1,PTE2 & PTE3. The SPI1 pins are multiplexed with these pin. Please tell me how to select the SPI1 function pins (i.e, SIN,SOUT,SCK,CS) using PCR register . I am using the BitIO components as the SPI pins.


I have found in BitIoLdd1.c 


/* Configure pin as output */
/* GPIOE_PDDR: PDD|=1 */
/* Set initialization value */
/* GPIOE_PDOR: PDO&=~1 */
GPIOE_PDOR &= (uint32_t)~(uint32_t)(GPIO_PDOR_PDO(0x01));
/* Initialization of Port Control register */
/* PORTE_PCR0: ISF=0,MUX=1 */
PORTE_PCR0 = (uint32_t)((PORTE_PCR0 & (uint32_t)~(uint32_t)(
)) | (uint32_t)(


I want to select the SPI1 function pins. Please help me, What changes I have to do for my situation

I have attached a picture of the pins.