Unable to get UART4 working on FRDM-K64F

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

Unable to get UART4 working on FRDM-K64F

Jump to solution
976 Views
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.
Labels (1)
0 Kudos
1 Solution
571 Views
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

View solution in original post

6 Replies
572 Views
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

571 Views
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 Kudos
571 Views
dave408
Senior Contributor II

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

0 Kudos
571 Views
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 Kudos
571 Views
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 Kudos
571 Views
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 Kudos