driver for FXOS8700CQ (source code)

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

driver for FXOS8700CQ (source code)

跳至解决方案
2,732 次查看
mzimmers
Contributor I

Hi, all -

I hope I'm posting this in the correct location; if not, apologies.

It appears that I'm going to be programming an FX0S8700CQ sensor in the near future. I don't know many details yet, but I was curious as to whether Freescale (or someone else) provided some starter code for writing the driver for this device. Even if I just had a header file with the names and addresses of all the registers provided, that would be a good start.

So...is there such a thing? I looked in the software section, but could only find run-time code.

Thanks...

标签 (1)
0 项奖励
1 解答
1,198 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Michael,

I do apologize for the broken link, you can download it from the following website:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RD4247FXOW8700&fpsp=1&tab=Documentati...

Regards,

Tomas

在原帖中查看解决方案

0 项奖励
6 回复数
1,198 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Michael,

There is the FXOS8700CQ command line interface driver as part of the AN4460.

This code has been developed to provide an easy way to communicate with the FXOS8700CQ using the Sensor Toolbox platform, but it can be used as a starter code as it includes, among others, basic functions to initialize the device (FXOS8700CQ.c) and the header file (FXOS8700CQ.h).

Regards,

Tomas

0 项奖励
1,198 次查看
mzimmers
Contributor I

Hi, Tomas -

Those files sound like they're exactly what I need. Your first link is broken, though. Is there another source for those files?

Thanks.

0 项奖励
1,199 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Michael,

I do apologize for the broken link, you can download it from the following website:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RD4247FXOW8700&fpsp=1&tab=Documentati...

Regards,

Tomas

0 项奖励
1,198 次查看
mzimmers
Contributor I

Thanks, Tomas. I do notice that FXOS8700CQ.c includes "system.h," which in turn includes "hidef.h," which...doesn't exist within the download source. I also seem to be lacking an MC9S08QE8.h file.

EDIT: I just read the comment in the derivative.h file. Evidently, this file (and others) are generated by "the project wizard." Is that a Code Warrior construct? And if so, since I'm not using Code Warrior, should I probably just eliminate include directives like this one? (I'm using IAR.)

0 项奖励
1,198 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Michael,

The hidef.h is a standart header file that includes commonly used macros and is located in the CodeWarrior for Microcontrollers V6.x\lib\hc08c\include folder. In our project we only use the EnableInterrupts macro to enable all interrupts. It is defined as follows in the hidef.h file:

#define EnableInterrupts  __asm CLI;

The MC9S08QE8.h is a specific header that includes peripheral memory map for the MC9S08QE8 MCU and is located in the CodeWarrior for Microcontrollers V6.x\lib\hc08c\device\include folder. I have attached it here for your reference.

Regards,

Tomas

0 项奖励
1,198 次查看
mzimmers
Contributor I

Thanks, Tomas. I have some other questions, but I think I'll hold onto them until I get a bit more familiar with this stuff.

0 项奖励