SDK issue with SPI for RTC access ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

SDK issue with SPI for RTC access ?

跳至解决方案
1,407 次查看
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

标签 (1)
0 项奖励
回复
1 解答
1,311 次查看
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

在原帖中查看解决方案

2 回复数
1,312 次查看
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

1,311 次查看
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 项奖励
回复