SPI communication with PCF2123

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

SPI communication with PCF2123

447 Views
louis_eeckeloot
Contributor I

Hi,

I would like to communicate with SPI between my microcontroller (PN7462) and my RTC : PCF2123.

I don't know how to proceed, how to program it on MCUXpressoIDE.

Is someone have a code example for my request ? with the code lines I have to write in my code.

Thanks,

BR,

Louis.

Tags (1)
0 Kudos
1 Reply

379 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Louis,

Unfortunately there isn't any example for the RTC using this MCU, you will need to start from the SDK that is available in the following link:

NFC Reader Library | NXP 

After download the library, in MCUXpresso select the option Import project(s) from file system:

pastedImage_6.png

Look for the route where you install the sofware, and select in the PN7462AU Software the zip file.

pastedImage_4.png

After that, click the finish button.

In the folders that were imported to your workspace, in the following route you'll find the SPI driver need it to communicate with the RTC: PN7462AU->phHAL->phhalSPIM

In this driver you will find all the functions to communicate through SPI with the RTC.

Also in the following link, in the chapter 12,  you can find the sequence of initialization for this RTC, it use I2C to explain but the commands are the same: https://www.nxp.com/docs/en/user-guide/UM10301.pdf  

Let me know if this helps you.

Best Regards,

Alexis Andalon

0 Kudos