Bug in TWRK60 BSP ( MQX 3.7 )

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug in TWRK60 BSP ( MQX 3.7 )

Jump to solution
976 Views
GottiLuca
Contributor IV

 

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;           

 

0 Kudos
1 Solution
384 Views
petr_uhlir
NXP Employee
NXP Employee

Thanks Luca,

we have already discovered this bug and it will be fixed in MQX 3.8

View solution in original post

0 Kudos
3 Replies
384 Views
mohwaqas12
Contributor III

Thank you for identifiying this bug. I had been wondering why UART4 Tx is not giving any output on PTE24 pin. Well is there any kind of documenation on how to tweek or modify these mqx internal settings to make it work with custom boards too. 

 

0 Kudos
384 Views
LinseLA
Contributor I

Thanks for this heads up :womanvery-happy:

 

Only took me 2 days of goofing around trying to enable use of UART4 on my TWRK60N512 for an FTDI USB to 3.3v cable before I happened to shake the correct Google rune-stones to find this :womansad:

 

0 Kudos
385 Views
petr_uhlir
NXP Employee
NXP Employee

Thanks Luca,

we have already discovered this bug and it will be fixed in MQX 3.8

0 Kudos