SPI Slave with FRDM-K22F on RF connector (J6)

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

SPI Slave with FRDM-K22F on RF connector (J6)

Jump to solution
679 Views
josécarloscazar
Contributor I

Could anyone make the SPI Slave Component work when using the pins on this connector (PTD0 to PTD3)?

I can make the slave read and send correct data when using the SPI Slave on the PTC PINS 4 through 7.

But when I'm using the pins on the J6 jumper, it just doesn't work, the data gets all messy, both on Rx and Tx

Is there any HW problem with this?

Tags (1)
0 Kudos
1 Solution
519 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jose,

I have checked the schematics,I find out that the PTD0~3 are connected to the other components on the FRDM-K22F, for example PTD0 is connected to pin 11of FXOS8700CQ, pin11 of J6(RF connector).   PTD1 is connected to pin 9 of FXOS8700CQ, pin5 of J6(RF connector). PTD2 is connected to pin p3 pin of J8(SD card), PTD3 is connected to p3 pin of J8.

i think you'd better remove the serial resistor between PTDx and the active component to avoid influence.

BTW, I suppose that you enable the PORTD clock in SIM_SCGC5, abd write the PORT register correctly.

SIM_SCGC5|=0x1000;

PORTD_PCR0|=2<<8;

PORTD_PCR1|=2<<8;

PORTD_PCR2|=2<<8;

PORTD_PCR3|=2<<8;

Hope it can help you

BR

Xiangjun Rong

View solution in original post

0 Kudos
2 Replies
519 Views
josécarloscazar
Contributor I

Thanks Xiangjun. Actually, after 10 minutes I posted this thread I found out the same solution by looking at the schematics. That was exactly the problem because the accelerometer/magnetometer shares the CLK and CS pins of the SPI with the respective pins on the J6 header. So, to fix this, I just removed the R52 and R55 resistors of the board (they're located right above the "FRDM-K22F" label written with white letters near the center of the board).

I think it is good to keep this info on the forum, so future users with the same problem can look at this solution

Regards,

Jose

0 Kudos
520 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jose,

I have checked the schematics,I find out that the PTD0~3 are connected to the other components on the FRDM-K22F, for example PTD0 is connected to pin 11of FXOS8700CQ, pin11 of J6(RF connector).   PTD1 is connected to pin 9 of FXOS8700CQ, pin5 of J6(RF connector). PTD2 is connected to pin p3 pin of J8(SD card), PTD3 is connected to p3 pin of J8.

i think you'd better remove the serial resistor between PTDx and the active component to avoid influence.

BTW, I suppose that you enable the PORTD clock in SIM_SCGC5, abd write the PORT register correctly.

SIM_SCGC5|=0x1000;

PORTD_PCR0|=2<<8;

PORTD_PCR1|=2<<8;

PORTD_PCR2|=2<<8;

PORTD_PCR3|=2<<8;

Hope it can help you

BR

Xiangjun Rong

0 Kudos