AnsweredAssumed Answered

Bug in TWRK60 BSP ( MQX 3.7 )

Question asked by Luca Gotti on Jun 8, 2011
Latest reply on Jun 14, 2012 by Muhammad Waqas Athar

 

While i was trying to get function the GainSpain Wifi Module using UART connection, I've discovered a bug in the TWRK60 BSP.

The problem is in the function _bsp_serial_io_init ( in source code file : mqx\source\bsp\twrk60n512\init_gpio.c ) .

At line 136, you can find  the UART 4 pin mux initializing :

 

            pctl = (PORT_MemMapPtr)PORTC_BASE_PTR;
            /* PTC14 as RX function (Alt.3) + drive strength */
            pctl->PCR[14] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
            /* PTC15 as TX function (Alt.3) + drive strength */
            pctl->PCR[15] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;

The problem is UART4 is not mapped on PTC14 - PTC15 I/O pin   but instead on PTE24 - PTE25 .

So the RIGHT code is the following :

 

            pctl = (PORT_MemMapPtr)PORTE_BASE_PTR;
            /* PTE24 as TX function (Alt.3) + drive strength */
            pctl->PCR[24] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
            /* PTE25 as RX function (Alt.3) + drive strength */
            pctl->PCR[25] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;           

 

Outcomes