Unable to get UART4 working on FRDM-K64F

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

Unable to get UART4 working on FRDM-K64F

跳至解决方案
2,166 次查看
dave408
Senior Contributor II

I'm using a FRDM-K64F with a handful of peripherals.  At the moment, I cannot get UART4 to work.  I have PEx set up to use PTE24 and PTE25:

 

27005_27005.pngpastedImage_0.png

I'm using the same settings (with the exception of pins) for UART3 for an RS485 transceiver, and it works just fine.  But when I look at the output of TX on the scope, I get nothing.

 

Can anyone suggest something that I might be doing wrong?  Here's what I have done so far:

 

  • Double-checked the PEx auto-generated code and it looks correct.  Pin muxing is set properly for HW_UART4.  UART_DRV_Init() is called from Components_Init().
  • Stepped into the call to UART_DRV_SendDataBlocking for my RS485 and my UART4 code, and they follow the same path and supposedly send similar type of data, except that UART4 doesn't do anything on the pins.
标签 (1)
0 项奖励
回复
1 解答
1,761 次查看
DavidS
NXP Employee
NXP Employee

Hi David,

I have UART4 successfully working on PTC14/15 of FRDM-K64F Freedom board.

Looking at Freedom schematic the PTE24/25 connect to FXOS8700CQ pins 4/6 that also have 4.7k pull-ups that might be messing with you.

My simple test was hardwiring PTC14/15 at J199 pins 3-4 for a hardware echo test.

Regards,

David

在原帖中查看解决方案

6 回复数
1,762 次查看
DavidS
NXP Employee
NXP Employee

Hi David,

I have UART4 successfully working on PTC14/15 of FRDM-K64F Freedom board.

Looking at Freedom schematic the PTE24/25 connect to FXOS8700CQ pins 4/6 that also have 4.7k pull-ups that might be messing with you.

My simple test was hardwiring PTC14/15 at J199 pins 3-4 for a hardware echo test.

Regards,

David

1,761 次查看
dave408
Senior Contributor II

Thanks, David, as usual you were spot-on.  I should have remembered that there were other I2C peripherals on the FRDM.  I never use them and had completely forgotten.:smileysilly:  I guess the settings were correct since I hooked up the peripheral and it immediately responded to my serial command once I moved over to PTC14/15.

0 项奖励
回复
1,761 次查看
dave408
Senior Contributor II

On another note, did my PEx configuration look reasonable enough to you?

0 项奖励
回复
1,761 次查看
DavidS
NXP Employee
NXP Employee

Yes.

My setup was close but I was using interrupts with callbacks only because another customer wanted to see that work.

ScreenHunter_143 May. 13 14.23.gif

Note the Bluetooth is just a name.

Regards,

David

0 项奖励
回复
1,761 次查看
dave408
Senior Contributor II

Yup, I know the port is general purpose and not just for BT, much like the one that's there for the nordic RF breakout board.  I have to play with callbacks later -- at the moment I'm using a thread that waits forever for incoming data to arrive on the Rx pin.  If you have comments about the downside of such an implementation, I'd love to hear your thoughts.

0 项奖励
回复
1,761 次查看
dave408
Senior Contributor II

Thanks for the tip, David!  I hadn't considered that, or the Bluetooth header you used for your test.  I'll give that a try.

0 项奖励
回复