FRDM-KL26Z UART D register not changing

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

FRDM-KL26Z UART D register not changing

734 次查看
elisa_mejia
Contributor I

Hi,

I am trying to implement a code for sending data through a FTDI to the computer from a FRDM-KL26Z. The code is quite simple and the message is very short. I am using UART functions that were developed from KL25, and should be working. However, I cannot transmit any data through any of the UART channels. Checking the registers, when I try to send some character, the D register from the UART is not updating. I'm sure I'm providing the clock signals to the peripherals, I'm using the correct baudrate (9600) and I'm sending a short message (less than 20 characters) every 1 second.

Anyone can help me understand what might be going on? I'm also using JTAG to program the microcontroller.

Thanks,

Elisa

 

0 项奖励
回复
2 回复数

684 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi Elisa,

KL25 and KL26 have same UART peripherals. But in KL25/KL26, UART0 is different with UART1/2.

Both FRDM-KL25 and FRDM-KL26 use UART0 as openSDA UART interface. If your code is for UART0, you can test your code on openSDA VCOM directly.

There are demos and driver for UART port in FRDM-KL25 and FRDM-KL26 SDK. Please refer to these code.

Regards,

Jing

0 项奖励
回复

645 次查看
elisa_mejia
Contributor I

Hi Jing,

Thank you for your response.

I know that the KL26 and KL25 peripherals are the same. That is why I was using a KL25 code that worked before for configuring and using the UART1 on my KL26 freedom board. However, it still doesn't work. I tried to download the example using the SDK as you suggested, but I don't know why it shows an error when I try to debug the example. I am not very familiar with using the SDK and rather use my own initialisation code and baremetal projects. 

However, I did try to implement the UART communication using PE components and I'm still having the same issue: The peripheral seems to be properly initialised but whenever I try to write something on the D register to transmit a character, it doesn't change, which implies that nothing is being transmitted. I'm starting to think that this might be an issue with hardware on my freedom board.

Do you have any ideas of what could be happening? Or how can I try to solve it? It happens in the three UART modules. Also, it would be really appreciated if you have a standalone example of the configuration of the UART without the SDK.

Thank you,

Elisa

0 项奖励
回复