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

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

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

跳至解决方案
1,414 次查看
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?

标记 (1)
0 项奖励
回复
1 解答
1,254 次查看
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 项奖励
回复
2 回复数
1,254 次查看
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 项奖励
回复
1,255 次查看
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 项奖励
回复