Bug in TWRK60 BSP ( MQX 3.7 )

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Bug in TWRK60 BSP ( MQX 3.7 )

跳至解决方案
1,024 次查看
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 项奖励
回复
1 解答
432 次查看
petr_uhlir
NXP Employee
NXP Employee

Thanks Luca,

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
432 次查看
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 项奖励
回复
432 次查看
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 项奖励
回复
433 次查看
petr_uhlir
NXP Employee
NXP Employee

Thanks Luca,

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

0 项奖励
回复