SDK issue with SPI for RTC access ?

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

SDK issue with SPI for RTC access ?

Jump to solution
968 Views
cerny
Contributor II

Need periodically (MCUxpresso, SDK only) read out values from sensors and store to flash incuding time stamp.

RTC library - trying to use sensors/pcf2123.h from SDK, but seems missing functions around SPI, which are required for callback:
pcf2123_fct.SPI_Read
pcf2123_fct.SPI_Write

uint8_t (*SPI_Read)(uint8_t *writeBuf, uint8_t *readBuf, uint32_t readSize); /*!< External SPI read function */
uint8_t (*SPI_Write)(uint8_t *writeBuf, uint32_t writeSize); /*!< External SPI read function */

Could you please point out SDK functionality here ?

Thank you!

Stanislav

Labels (1)
0 Kudos
1 Solution
872 Views
frq05186
NXP Employee
NXP Employee

Hi,

This is a bit long one - It is true that PCF drivers in SDK are not self sufficient.

RTC is used in Rapid IoT OOB application: When phone connects to kit, time is updated and then RTC is used to keep time up to date.

I advise you take a look on how it is being implemented on OOB example and adapt to your needs.

pastedImage_1.png

You shall find all API in datetime_mk64f.c as well as links to the other drivers you will need (spi.c, spi_mk64f.c...)

Eric

View solution in original post

2 Replies
873 Views
frq05186
NXP Employee
NXP Employee

Hi,

This is a bit long one - It is true that PCF drivers in SDK are not self sufficient.

RTC is used in Rapid IoT OOB application: When phone connects to kit, time is updated and then RTC is used to keep time up to date.

I advise you take a look on how it is being implemented on OOB example and adapt to your needs.

pastedImage_1.png

You shall find all API in datetime_mk64f.c as well as links to the other drivers you will need (spi.c, spi_mk64f.c...)

Eric

872 Views
cerny
Contributor II

Hi Eric,

highly appreciate your support!

Thank you, we already solved the SDK issue by utilization and separation of Athmosphere code as mentioned above and our RTC is now working.

Just in another thread provided some hints in order to prevent other users to seek as well, despite to little bit missing element for pcf in Athmosphere and gap in SDK.

Again thank you!

Best Regards

Stanislav

0 Kudos