Hello,
I am looking at using the LPC11U68 in a product. I need USART0 and 1 and the SPI (SSP) 0 and 1.
With regards to the USART0, I just need the TX, RX, CTS and RTS.
My question is, should I allocate the DSR0 (PIO1_20) to the SSP1_SCK in the pins function register, what will be the 'state' of DSR0 that the modem control register will see?
Does it see it as permanently ready?
Thanking you in advance
Hello Gordon Jefferies,
Thank you for your interest in NXP LPC product, I would like to provide service for you.
If you want to use the PIO1_20 as the SPI_SCK pin, you must configure the digitial pin control register, FUNC=2, because func2 is the SSPI1_SCK pin, you can find it in the user manual,
Table 83. IOCON function assignments.
Then it is no relationship with the DSR0 function, it is controlled by the SPI module now.
After you configure the SPI as the master, then the SPI_SCK is the output pin.
The state of the pin is determined by your SPI module CPOL,
If the CPOL=0, then when no clock to output, the state is low;
If the CPOL=1, then when no clock to output, the state is high;
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Kerry,
Thank you very much for the feedback.
My question was more with regards to the modem.
With regards to the modem functionality, modem has a number of control
lines to manage the flow of data. RTS, CTS, DTR, DCD, DSR, etc.
The DSR is an input and is usually used to signify that the device it is
connected to is ready for use.
What state will be read from the modem status register (address 0x4000 8018
bit 1) when the pin is assigned to the SPI_SCK?
Thank you,
Regards
Gordon
Hello Gordon Jefferies,
Let's confirm the question again.
Do you mean, you enable the PIO1_20 as UART DSR pin at first, then change the pin function to SPI SCK function, but you didn't disable the UART module.
At this time, you want to know the UART DSR state, is it right?
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Kerry,
Another way of asking:
I need to use USART0 and SPI 1
When I assign PIO1_20 to the SPI SCK, will the modem still work? Is DSR bit
in the modem control / status register set to a state to allow the modem to
function correctly?
Regards
Gordon
On 15 August 2017 at 08:53, Gordon Jefferies <gordon.jefferies@gmail.com>
Hi Gordon,
If you change PIO1_20 function from DSR to SPI_SCK, the DSR function won't work any more, unless you choose the DSR pin for the UART module.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry,
I've been going through the posts trying to understand where we are missing
each other and maybe it is in my title to the post. So I'll start again.
First of all I don't have any hardware. I am trying to make sure this
processor is suitable for my application before I do a PCB layout. So I
cannot read any registers.
Different manufacturers offer different options with the peripherals, so I
cannot assume how NXP have configured this processor, so I need to make use
I understand it before I make PCB's. In addition I cannot find the
information in the datasheet or the user manual.
The title of my post probably should have been 'DSR register state' because
that is where I need understanding.
DSR is the 'Data set ready' control bit. It is an indication that the
device, this modem wants to talk to is read to receive data. If this is not
in the correct state, the modem will not send data because it believes the
device it wants to send data to is not in a state to receive the data.
Now the pin that indicates this to the modem control register is PIO1_2.
But I need to assign this pin as the SPI_SCK. So my question is - if this
pin is assigned to SPI_SCK what tells the modem control that it is OK to
send the data? What sets the bit in the control register to the correct
value? Is this bit set automatically to the correct state within the modem
control register, to allow the modem to function, when this pin is assigned
to another function?
Or is the modem not usable when the PIO1_2 is assigned to the SPI_SCK?
Regards
Gordon
On 15 August 2017 at 11:13, Gordon Jefferies <gordon.jefferies@gmail.com>
Hi Kerry,
With the DSR function not working, will the modem, with the rest of the
flow control, continue to work?
Regards
Gordon
Hello Kerry,
I need to use the UART and the SPI.
PIO1_20 is only assigned to the SPI SCK - never to the USART0
If I read the modem status register (address 0x4000 8018 bit 1) what will I
read?
Regards
Gordon
Hi Gordon Jefferies,
You can find in the register, after reset, the data is 0 in default.
But, if you run some codes, then want to know the DSR data, you can read MSR[DSR] directly.
Actually, you can debug it on your board, then you will get the result which you want.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------