Some questions about application frame generated by Beekit

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

Some questions about application frame generated by Beekit

1,209 Views
吕晨赵
Contributor I


Hi,I use Beekit to generated a application embeded in MKW22D512 board.I need to add some code to enable I2C and UART module.And these source code were also generated by Beekit.But when I debugged step by step,I didn't find any code about these modules were excuted.The application just excuted a TMR_Task function.So how I add codes to the application to enable these modules?If there is a document or sample code,that would be great!!Thanks!

ps: The whole application could be downloaded here:

http://yun.baidu.com/share/link?shareid=1084850668&uk=2685391078

I'm sorry it's a chinese web,but you can just click 下载(59.6M) button to download.Or you leave me an email address,I will send it to you ASAP.

Tags (4)
0 Kudos
5 Replies

1,029 Views
AngelC
Senior Contributor I

Hello,

The BeeStack applications contain several drivers that could be used by the user in order to ease his development process. You could check the functions available and call them whenever necessary. Nevertheless, that does not mean all drivers are used by every application at all, so they are not necessarily executed.

In this specific case, you may see the UART functions are used in the WirelessUART application indeed. However, I2C is not used at all, but functions are still there. Feel free to check the source code and use it as needed.

If you are new to ZigBee, you may want to try first a simpler codebase such as SMAC or MAC to get familiar with the MKW2x and the software. You could try the SMAC wireless UART located in C:\Program Files (x86)\Freescale\SMAC\MKW2x\Demo Apps\Wireless UART.

Anyway, I strongly recommend you to check the documentation folder included in BeeKit’s installation for further details about the application templates available and the corresponding software stacks.

Regards,

AngelC

0 Kudos

1,029 Views
吕晨赵
Contributor I

I'm sorry to bother you again,but this question is important to me.Does MKW22D can enable two I2C bus at the same time?(I google it,but nothing...)

I picked up I2C0 and I2C1 options when I generated the project.But I found this.As the picture shows,it seems like I2C registers are either I2C0 or I2C1.Also,I checked out the IIC_Interface.h file(it describes some interfaces which is used to communicate with I2C devices),I didn't find any functions to select i2c bus.So,what's wrong?

赵吕晨

From: AngelC

Date: 2015-03-26 23:54

To: 吕晨 赵

Subject: Re: - Some questions about application frame generated by Beekit

Some questions about application frame generated by Beekit

reply from AngelC in Wireless Connectivity - View the full discussion

Hello,

The BeeStack applications contain several drivers that could be used by the user in order to ease his development process. You could check the functions available and call them whenever necessary. Nevertheless, that does not mean all drivers are used by every application at all, so they are not necessarily executed.

In this specific case, you may see the UART functions are used in the WirelessUART application indeed. However, I2C is not used at all, but functions are still there. Feel free to check the source code and use it as needed.

If you are new to ZigBee, you may want to try first a simpler codebase such as SMAC or MAC to get familiar with the MKW2x and the software. You could try the SMAC wireless UART located in C:\Program Files (x86)\Freescale\SMAC\MKW2x\Demo Apps\Wireless UART.

Anyway, I strongly recommend you to check the documentation folder included in BeeKit’s installation for further details about the application templates available and the corresponding software stacks.

Regards,

AngelC

Did your question get answered?

If so, say thanks by clicking Correct Answer in the community thread!

Reply to this message by replying to this email, or go to the message on Freescale Community

Start a new discussion in Wireless Connectivity by email or at Freescale Community

Following Some questions about application frame generated by Beekit in these streams: Inbox

0 Kudos

1,029 Views
AngelC
Senior Contributor I

Hello,

The drivers included in BeeKit applications might not be suited for all applications. As you pointed out, the application implies only one I2C module is used at the time due to the macro definitions in IIC_Interface.h. Nevertheless, there is not any problem of using both of the modules at the same time. They could perfectly work if properly configured.

In this case, you may modify the I2C module’s driver source code not to attach to a single I2C module or simply create more functions (or your own driver) to configure and use each of the I2C modules simultaneously. At the end, they have different registers addresses so they could be configured and used separately. This would be application specific.

Regards,

AngelC

0 Kudos

1,029 Views
吕晨赵
Contributor I

Hello,AngelC. I have been working on I2C for several days,but no good news.Also,I googled I2C driver for MKW22D512 and nothing helped.

According to the comment lines,I just need to use IIC_Transmit_Master and IIC_Receive_Master functions,nothing happend. So,I don't know what I sholud do to deal with the I2C driver.Could you give me some advise?Thank you!

ps: I am still using the I2C driver generated by Beekit. I think it's better to communicate with I2C device successfully at first,regardless of whether two I2C buses can work at the same time.

Regards.

赵吕晨

From: AngelC

Date: 2015-03-31 00:03

To: 吕晨 赵

Subject: Re: - Some questions about application frame generated by Beekit

Some questions about application frame generated by Beekit

reply from AngelC in Wireless Connectivity - View the full discussion

Hello,

The drivers included in BeeKit applications might not be suited for all applications. As you pointed out, the application implies only one I2C module is used at the time due to the macro definitions in IIC_Interface.h. Nevertheless, there is not any problem of using both of the modules at the same time. They could perfectly work if properly configured.

In this case, you may modify the I2C module’s driver source code not to attach to a single I2C module or simply create more functions (or your own driver) to configure and use each of the I2C modules simultaneously. At the end, they have different registers addresses so they could be configured and used separately. This would be application specific.

Regards,

AngelC

Did your question get answered?

If so, say thanks by clicking Correct Answer in the community thread!

Reply to this message by replying to this email, or go to the message on Freescale Community

Start a new discussion in Wireless Connectivity by email or at Freescale Community

Following Some questions about application frame generated by Beekit in these streams: Inbox

0 Kudos

1,029 Views
AngelC
Senior Contributor I

Hello,

I would recommend you to use an oscilloscope probe and check the I2C clock pulses are there. Probably it is a matter of timing or missing configuration. Make sure you select the appropriate baudrate and verify you are connecting the SCL and SDA lines properly. I would recommend you to use a single I2C first.

Regards,

AngelC

0 Kudos