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.
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:
After download the library, in MCUXpresso select the option Import project(s) from file system:
Look for the route where you install the sofware, and select in the PN7462AU Software the zip file.
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.