LPC1837 - SSP1 busy bit stuck

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC1837 - SSP1 busy bit stuck

788件の閲覧回数
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 件の賞賛
返信
1 返信

622件の閲覧回数
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 件の賞賛
返信