SPI write routine in C or Assembly for MC68HC16Z1 series of MCU

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

SPI write routine in C or Assembly for MC68HC16Z1 series of MCU

2,155 次查看
vipuldprajapati
Contributor I

Hello,

I am working on NXP 16 bit MC68HC16Z1 series of MCU and required immediate support to get SPI write routine in C code or Assembly code. It would be good, if someone will provide verified SPI routine sample code (In C or Assemble - both would be fine) so that i can utilize into my project directly. 

Thanks!    

标签 (1)
标记 (4)
0 项奖励
回复
2 回复数

2,071 次查看
vipuldprajapati
Contributor I

Hello Lama, Thanks for your valuable input. 

I've gone through AN1062 and understood the example of QSPI to control 3 ADCs. Though it's written in assembly format, i could not captured it completely. 

For my case, I have to write few bytes data to FRAM chip using SPI peripheral. I would have 2 options to do it. 1. Write a SPI routine in C by assigning pointer to SPI register. 2. Write a SPI routine in assembly instructions.

I came to know that, SPI bitbang would also be an option since the code is portable to my MCU and it's well proven.

I'm looking for a better solution which I can directly adapt to write few bytes configuration data to my FRAM part. You can suggest me the best solution if you already worked similar things in past and have a better idea for same.

Thanks in Advance!

0 项奖励
回复

2,071 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

hmmm, the only I was ably to find was following document only:

https://www.nxp.com/docs/en/application-note/AN1062.pdf

Best regards,

Ladislav.

0 项奖励
回复