need help:LPC11U68&RC663:Couldn't read back version register

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

need help:LPC11U68&RC663:Couldn't read back version register

873 Views
daweiyou
NXP Employee
NXP Employee

Hi:

I am studying the LPC11U68 + CLEV663B for reader library project(SW2978), but SPI couldn't read back RC663's version register(addr:0x7f), normally 0xff or 0x00.

I have read AN11211 carefully, the CLEV663B has configured to SPI communication, connect R34 resistor, give the power from USB port. And could watch SPI MOSI and SCK from oscillograph, but no MISO is watched.

So PLS help check, what problem maybe occur? thx.IMG_20161208_154223.jpg

0 Kudos
7 Replies

489 Views
daweiyou
NXP Employee
NXP Employee

Anyone could give suggestion? thx

0 Kudos

489 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Dawei,

Sorry for the delay.

I checked from my side and I can read the version register without issues. So please confirm the next points in the project setup:

1) In the file "ph_NxpBuild_App.h" the macro NXPBUILD__PH_LPC1769 must be commented out while the macro NXPBUILD__PH_LPC11U68 must be enabled:

pastedImage_1.png

2) Confirm the correct MCU is selected in Project -> Properties -> C/C++ Build -> MCU settings. In your case LPC11U68 must be selected. Make sure to click on "Apply" and then on "OK" so the changes are not lost:

pastedImage_2.png

3) Open the Debug Configurations and confirm that the template corresponds to the LPC11U68:

pastedImage_3.png

4) The function phhalHw_Rc663_ReadRegister() can only be called AFTER initializing the platform, i.e after the call to phPlatform_Init():

pastedImage_7.png

Then it should work as expected. Please note I am using the latest NFC Reader Library (v04.040.05.011646).

I hope this helps.


Best Regards!,
Jorge Gonzalez

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

0 Kudos

489 Views
daweiyou
NXP Employee
NXP Employee

Thx for your reply, Jorge.

I download latest V4040050011646 from docstore, and run nfcrdlibex4_Mifareclassic example, checked your suggestion, but same as mine.

so could I ask send your test demo to me? and whether any hardware potential issue existing? alought I have checked AN11211 very carefully.

NOW I could watch MOSI/CLK signal, and RC663 crystal signal, but no MISO responsed.

0 Kudos

489 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hi Dawei,

I tested the Mifareclassic example from the docstore package and it works. I also compared the populated resistors of your CLEV663B board and they are the same as mine. So the issue is very strange.

The only difference I found is that your LPC11U68 board does not have the JP2 jumper populated (pins 1-2). I wonder if the board is actually getting programmed or you get an error when trying to debug?

Please let me know more details:

- Is the board getting programmed? I mean, can you run the debug session without errors?

- What do you see in the console output when running the application?

- What LPCXpresso IDE version you have? (I use LPCXpresso v8.1.4)

Regards!

Jorge Gonzalez

0 Kudos

489 Views
daweiyou
NXP Employee
NXP Employee

Jorge:

I attach snapshot of two boards, could you help compare with yours? thx

IMG_20161221_215415.jpg

IMG_20161221_215432.jpg

0 Kudos

489 Views
daweiyou
NXP Employee
NXP Employee

I doube check JP2, it populated (pins 1-2).

sorry for unclear picture.

0 Kudos

489 Views
daweiyou
NXP Employee
NXP Employee

Hi Jorge:

- Is the board getting programmed? I mean, can you run the debug session without errors?

Yes, I could, even I could measure MOSI signal while SPI module is driven. 

I checked the project compile and setting, debug setting, all seems fine.

actually I have LPC1769 LPCXpresso-LPC1769-CMSIS-DAP board on hand, same issues while debug.

- What do you see in the console output when running the application?

   while run DEBUG_PRINTF("\nReader chip RC663: 0x%02x\n", bDataBuffer[0]);

the version always return : 0x00

- What LPCXpresso IDE version you have? (I use LPCXpresso v8.1.4)

I test on IDE 8.1.4, and latest 8.2.2, 

NFC library is CLEV663B-LPC1769_NFC-Reader-Library-v3.092_0 and latest sw297839 NFC-Reader-Library-V4040050011646.

So I think which is not related with SW package and IDE, what next step should I test on board? or what step maybe I missed?

0 Kudos