Bug in TWRK60 BSP ( MQX 3.7 )

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Bug in TWRK60 BSP ( MQX 3.7 )

ソリューションへジャンプ
1,191件の閲覧回数
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 解決策
599件の閲覧回数
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 返答(返信)
599件の閲覧回数
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 件の賞賛
返信
599件の閲覧回数
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 件の賞賛
返信
600件の閲覧回数
petr_uhlir
NXP Employee
NXP Employee

Thanks Luca,

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

0 件の賞賛
返信