AnsweredAssumed Answered

Bare metal UART Port Initialization Problem on TWR-K70

Question asked by Hasan Oksak on Mar 3, 2016
Latest reply on Mar 8, 2016 by Hasan Oksak

I started a new project with KDS with PE. I added a PE serial port(UART2) component and it worked as expected.

I start a new project without KDS with PE. In order  to cofigure Port0 pin 16 and pin 17 as Uart, I used below code.

PORTE_PCR16 = (uint32_t)((PORTE_PCR16 & (uint32_t)~(uint32_t)(PORT_PCR_ISF_MASK | PORT_PCR_MUX(0x04))) | (uint32_t)(PORT_PCR_MUX(0x03)));
PORTE_PCR17 = (uint32_t)((PORTE_PCR17 & (uint32_t)~(uint32_t)(PORT_PCR_ISF_MASK | PORT_PCR_MUX(0x04))) | (uint32_t)(PORT_PCR_MUX(0x03)));

 

When I debug the code with P&E Micro debugger, within these lines the progran jumps to the "Default_Handler".

I tried "PORTE_PCR16 = 0x300;" and "PORTE_PCR17 = 0x300;" as well but the result is same.

Please any commend.

Outcomes