Removing crystal from "Device-to-device communication via NFC demo"

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

Removing crystal from "Device-to-device communication via NFC demo"

Jump to solution
1,340 Views
jerwey
Contributor I

I am new to hardware design and learning a lot as I go.  I have been able to take the device-to-device demo (from DemoLab, document DOC-333917, posted by jordijofremk and updated by richardschmidmaier) and do some pretty cool things with it.  I do have a question, which might be elementary but I'll only learn by asking (and I can't find an answer to which makes me think I'm missing something fundamental).

Will the spinning disc component still work if the external crystal was removed from the LPC11U24?  From what I understand, the crystal is only needed with LPC11U24 for USB communication, but this application does not use USB.  Can the chip's 12MHz IRC be used instead?

Thanks,

Jerry

0 Kudos
1 Solution
976 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Jerry,

It is ok for hardware if you remove the external crystal, but you have to modify the firmware to let it use IRC instead, I am not sure how to change the code in BSP to let it use IRC, you may have to check with the LPC community.


Have a great day,
Kan

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

View solution in original post

0 Kudos
3 Replies
976 Views
jerwey
Contributor I

I moved my question from the LPC group to this NFC group.  I think that I am right in that the LPC can be used without an external crystal, but the question is more geared toward if the Device2Device demo would still work.  In that regard, this is probably better suited as an NFC question.

Any thoughts?  Am I completely out to lunch?

I created a proto board without the crystal but I can't seem to get it to work.  The crystal is the only thing different, as I grounded the XTALIN pin.  The only place I could find clock settings were under Setup(); in main.c.  It calls 

HAL_BSP_BoardInit(); which calls Board_SystemInit(); from nxp_lpcxpresso_11u24h_board_lib.  This function has a 

SystemSetupClocking(); function and is suppose to set the main clock to WDT (like in the NTAG I2C plus Explorer Kit) but it has been commented out.  So I'm not really sure where the main clock is set.  I tried replacing SystemSetupClocking(); with Chip_SystemInit(); from sysinit_11xx.c in the lpc_chip_11uxx_lib library, but it didn't seem to work.  I thought that function was the default chip system initialization to use the IRC as the main clock.

I thought this would be as simple as removing the crystal, grounding the XTALIN pin, and then changing the clock to use IRC, but obviously I am doing it wrong.  Or I am missing something fundamental and the crystal is needed for the system to work...maybe for I2C to work in the system.

Any help would be much appreciated, even it if seems obvious to you.  :smileyhappy:

Jerry

0 Kudos
977 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Jerry,

It is ok for hardware if you remove the external crystal, but you have to modify the firmware to let it use IRC instead, I am not sure how to change the code in BSP to let it use IRC, you may have to check with the LPC community.


Have a great day,
Kan

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

0 Kudos
976 Views
jerwey
Contributor I

Thank you Kan!

I was just looking for confirmation that I was not missing something obvious.  I was able to find a snippet of code that turned on the IRC and then set it as the main clock.  The code seems to do the job, but not quite as eloquently as other examples.  However, it is the only way I have been able to get it to work so far.  I lost some functionality communicating with the NTAG I2C Demo Android App tho, so I am working through that right now.  I no longer can flash the mcu from the app.  I think it has to do with the timing of sending messages across NFC.  The app just uses a fix timer instead of watching for events.

Thank you for taking the time to confirm my understanding!

Cheers,

Jerry

0 Kudos