AnsweredAssumed Answered

Issue with setting CAN pins

Question asked by Brent Greenwald on Jul 19, 2016
Latest reply on Jul 19, 2016 by Erich Styger

Can someone explain why the "SetPinMux" function works correctly for PORTD but not PORTA. The attempt to SetPinMux for PORTA gives a hard fault. Also, what is a hard fault?

 

void BOARD_InitPins(void)

{

    /* Initialize UART1 pins below */

    /* Ungate the port clock */

    CLOCK_EnableClock(kCLOCK_PortD);

 

    /* Affects PORTD_PCR8 register */

    PORT_SetPinMux(PORTD, 8u, kPORT_MuxAlt3);

    /* Affects PORTD_PCR9 register */

    PORT_SetPinMux(PORTD, 9u, kPORT_MuxAlt3);

 

    /*Set CAN0 */

    PORT_SetPinMux(PORTA,12u,kPORT_MuxAlt2);

    PORT_SetPinMux(PORTA,13u,kPORT_MuxAlt2);

 

}

P.S.

I attached main.c in case you need to look at it.

Original Attachment has been moved to: main.c.zip

Outcomes