LPC54606 SPI Issues

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

LPC54606 SPI Issues

998 Views
santosh1
Contributor III

LPC54606 SPI Timing.

Hello, 

I have a design based on LPC54606 100 pin package - the controller interfaces to couple of SPI based devices. I am running into few SPI related issues would appreciate any help on this issue. 

1. I have SPI configured on FlexComm3 - Slave Select is set on Pin 77 (SSEL1). The module does not seem to be managing this particular slave select pin. It is configured for active low. Is there an errata on this issue?

2. How do i get an interrupt on Master Idle? I have enabled INTENSET, and i was expecting to receive an interrupt on FLEXCOMM3_IrqHandler. But i don't get an interrupt. Do i need to enable any other flags?

thanks

Labels (1)
4 Replies

820 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Santosh balakrishnan,

   From your description, your problem should still in the code configuration side.

    I highly recommend you refer to our LPC54606 sdk spi code at first, that code use SPI9 as the master, SPI2 as the slave.

   You can test the official code at first, after it works, you can change the SPI3 to master again.

   The SDK code can be downloaded from this link:

Welcome | MCUXpresso SDK Builder 

  Now answer your two questions:

1. SSEL1

    Do you configure pin_mux.c, choose the according pin as the SPI SSEL function? This is very important, a lot of customers didn't configure this part, then find the pin function don't work.

2. How do i get an interrupt on Master Idle?

  Please check the user manual at first:

pastedImage_2.png

pastedImage_3.png

I think you can STAT[MSTIDLE] bit directly instead of using the interrupt.

Wish it helps you!

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

820 Views
santosh1
Contributor III

Kerry, 

Thanks for the response. 

SSEL1 - I am configuring the pin correctly. It was being configured as SSEL1, ALT0 unless there is an error in the documentation. I also suspected bad configuration initially and checked that over multiple times. I don't think configuration is the issue there. 

On MSTIDLE - i understand the STAT part, but as i indicated in my question, the IDLE bit never seems to be going high even though there is no activity on the SPI. SPI is being configured as master.

Thanks

santosh 

820 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Santosh,

    Give me your  pin_mux.c, I need to check your pin configuration at first.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

820 Views
santosh1
Contributor III

Also - the SPI module MSTIDLE bit never turns on in the status register. There is no activity on the SPI, and should be idle.

0 Kudos