I2C and adc support for nRF5


ashish.shukla@corvi.com <ashish.shukla@...>
 

Hello everyone !!!

There is I2C support for nRF5 micro controllers, is there any sample code available to interface an I2C device with nRF5.

Also, is there adc support for nRF5 series controllers?    

--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


Felipe Neves
 

Hello ashish!

The current version of Zephyr support I2C driver for nRF5, you also can find some examples in samples/ directory, the samples/drivers/i2c_fujistsu_fram  is a simple example which use both I2C write and
read functions.

To test it just setup zephyr environment then cd to this sample directory, then:

$ mkdir build
$ cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ make

You'll find the built image on build/zephyr directory.

Also you can use this sample as reference to develop your own project based on I2C bus.


About the ADC, the nrf5 currently does not support driver to it, but you can of course use it by:

- providing a driver using the zephyr infrastructure;
- use ADC controller as part of your application.

Please let me know if this information was useful to you.

Best

Felipe


2017-12-11 2:43 GMT-02:00 ashish.shukla@... <ashish.shukla@...>:

Hello everyone !!!

There is I2C support for nRF5 micro controllers, is there any sample code available to interface an I2C device with nRF5.

Also, is there adc support for nRF5 series controllers?    

--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users




--
Felipe S. Neves 
Embedded software & systems engineer
Skype: fneves1989
+55 11 96610 – 0855 


ashish.shukla@corvi.com <ashish.shukla@...>
 

Hi Felipe,

Code builds successfully after making a minor change in main.c file

#define I2C_DEV CONFIG_GPIO_NRF5_P0_DEV_NAME

however, I'm working with nrf52840_pca10056 IC, running the command

$ cmake -DBOARD=nrf52_pca10056 ..

results in an error, I'm attaching snapshot in the attachment.

What needs to be done to remove this error ?




--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


On Mon, Dec 11, 2017 at 5:38 PM, Felipe Neves <ryukokki.felipe@...> wrote:
Hello ashish!

The current version of Zephyr support I2C driver for nRF5, you also can find some examples in samples/ directory, the samples/drivers/i2c_fujistsu_fram  is a simple example which use both I2C write and
read functions.

To test it just setup zephyr environment then cd to this sample directory, then:

$ mkdir build
$ cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ make

You'll find the built image on build/zephyr directory.

Also you can use this sample as reference to develop your own project based on I2C bus.


About the ADC, the nrf5 currently does not support driver to it, but you can of course use it by:

- providing a driver using the zephyr infrastructure;
- use ADC controller as part of your application.

Please let me know if this information was useful to you.

Best

Felipe


2017-12-11 2:43 GMT-02:00 ashish.shukla@... <ashish.shukla@...>:
Hello everyone !!!

There is I2C support for nRF5 micro controllers, is there any sample code available to interface an I2C device with nRF5.

Also, is there adc support for nRF5 series controllers?    

--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


_______________________________________________
Zephyr-users mailing list
Zephyr-users@...ct.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users




--
Felipe S. Neves 
Embedded software & systems engineer
Skype: fneves1989
+55 11 96610 – 0855 


Steve Brown
 

Hi Ashish,


On Tue, 2017-12-12 at 10:09 +0530, ashish.shukla@... wrote:
Hi Felipe,

Code builds successfully after making a minor change in main.c file

#define I2C_DEV CONFIG_GPIO_NRF5_P0_DEV_NAME

however, I'm working with nrf52840_pca10056 IC, running the command

$ cmake -DBOARD=nrf52_pca10056 ..

results in an error, I'm attaching snapshot in the attachment.

What needs to be done to remove this error ?




--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development
www.corvi.com
The board name is nrf52840_pca10056

That works on my boards.

Steve