LPC1837 - SSP1 busy bit stuck

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

LPC1837 - SSP1 busy bit stuck

446 Views
boskop
Contributor I

I've written some code to make use of  the SSP module of lpc1837 for SPI communication and it initially worked just fine.

However, after some minor changes it stopped sending data out. I've tried debugging and discovered that the busy bit from SSP1 status register is stuck on 1.

Here are the steps I take:

CREG0 --> 0x2CF

CPSR --> 0x5A

CREG1 --> 0x06

After writing in the data register I read and print the status register in a while cycle and it always has the value 0x12 i.e. BSY & TNF bits are set.

Has anyone encountered a similar problem?

0 Kudos
1 Reply

280 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bosko Petkovski,

    I think it still caused by your code.

   So, please refer to our official LPC1837 SSP code in the lpcopen:

1. LPCXpresso IDE project

http://www.nxp.com/assets/downloads/data/en/software/lpcopen_2_20_lpcxpresso_nxp_lpcxpresso_1837.zip 

2. IAR and MDK project

http://www.nxp.com/assets/downloads/data/en/software/lpcopen_2_20_keil_iar_nxp_lpcxpresso_1837.zip 

You can find the SSP1 code in  folder:lpcopen_2_20_keil_iar_nxp_lpcxpresso_1837\applications\lpc18xx_43xx\iar\nxp_lpcxpresso_1837\periph\ssp

Please check it on your side at first.

Wish it helps you!


Have a great day,
Kerry

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

0 Kudos