[SOLVED] LPC11U68 SPI problem

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

[SOLVED] LPC11U68 SPI problem

589 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cstephant on Fri Mar 14 07:14:29 MST 2014
HI,

I'm using SSP1 port on a LPC11U68.
It's working correctly but I have to change the MISO pin from PIO1_21 to PIO0_22 which is normally possible ( -> UserManual says : PIO0_22 R/W 0x058 I/O configuration for pin PIO0_22/AD6/CT16B1_MAT1/MISO1 ).
I changed the pin config according to the user manual :
Chip_IOCON_PinMuxSet(LPC_IOCON, 1, 21, IOCON_FUNC0 | IOCON_MODE_INACT);
Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 22, IOCON_FUNC3 | IOCON_MODE_INACT);

UM :
2:0 FUNC Selects pin function. Values 0x4 to 0x7 are reserved. 000
0x0 PIO0_22.
0x1 AD6.
0x2 CT16B1_MAT1.
0x3 MISO1.

The RNE (Reciever FIFO Not Empty) flag in the SSP1 Status register is going up when I recieve a frame but there is no datas available in the Data Register.

Any idea of what I'm doing wrong with this pin configuration ?
Labels (1)
0 Kudos
Reply
2 Replies

490 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cstephant on Fri Mar 14 09:39:51 MST 2014
It works thanks a lot!
I check and double check all paremeter but I was thinking that the Analog is disabled with a 0.
Next time I will triple check.

Best Regards
0 Kudos
Reply

490 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Fri Mar 14 09:00:56 MST 2014

If the pin muxing is correct, you might need to also add the 'digitial pin' flag.

Chip_IOCON_PinMuxSet(LPC_IOCON, 1, 21, IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGMODE_EN);
Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 22, IOCON_FUNC3 | IOCON_MODE_INACT | IOCON_DIGMODE_EN);

Here is the info on bit 7 for p0_22:
7 ADMODE Analog mode. 1
0 Enable. Pin is configured as analog input.
1 Disable. Pin is configured as digital I/O.

Here is the info on bit 7 for p1_21:
9:7 - - Reserved. 0b001

Note: Chip_IOCON_PinMuxSet() sets the IOCON registers *exactly* with the values that you pass, so you'll need to handle to digital or reserved bits in the call.
0 Kudos
Reply