Re: How can I use I2C?

2021-05-01 Thread yuta
asecally created not for communicate to general I2C device but created for a specific I2C device such as MPU9250 and it provides some data with the form which can be used directly like gyro, accel, temp... not like gx_h, gx_l, gy_h, gy_l, Yuta Ide On 2021/05/01 21:10, Alan Carvalho de A

Re: How can I use I2C?

2021-05-01 Thread yuta
per-half driver refering here. https://github.com/micro-ROS/NuttX/issues/9 In this case, I call mpu9250_register() which I made instead of i2c_register(). /dev/i2c1 appeared with ls /dev. However, `i2c dev -b 1 0x03 0x77 ` did not detect any i2c device. Yuta Ide On 2021/04/30 22:18, Gregory Nutt

Re: How can I use I2C?

2021-05-01 Thread yuta
://github.com/apache/incubator-nuttx/blob/master/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_i2c.c On Fri, Apr 30, 2021 at 1:47 PM Alan Carvalho de Assis wrote: Hi Yuta, Yes, you forgot to select the I2C Character driver support. Please try to follow this tutorial: https://www.youtube.com/

Re: How can I use I2C?

2021-04-30 Thread yuta
Hi Alan, Thank you for the link. I watched it! Sorry I forgot to say that I've configured ` I2C Character driver support ` as well. However,  /dev/i2c1 (or something like this) did not show up. I'm going to try to register i2c driver. Yuta Ide On 2021/04/30 21:47, Alan Carvalh

How can I use I2C?

2021-04-30 Thread yuta
omething to do? I'm using Nucleo-F767ZI board. Thank you. Yuta Ide

Re: How can I measure elapsed time?

2021-04-29 Thread yuta
better accuracy. Thank you very much. Yuta Ide On 2021/04/30 3:06, Bernd Walter wrote: I usually do the following to measure time differences: struct timespec tp; uint64_t starttime; clock_gettime(CLOCK_MONOTONIC, &tp); starttime = ((uint64_t)(tp.tv

Re: How can I measure elapsed time?

2021-04-29 Thread yuta
Alan, Thank you for sharing the link. I checked it and I understand CONFIG_USEC_PER_TICK(default 1) is important when using some functions like usleep(). It won't work well if I try usleep(1) or shorter. Thank you. Yuta Ide On 2021/04/30 2:49, Alan Carvalho de Assis wrote

Re: How can I measure elapsed time?

2021-04-29 Thread yuta
ct than before. I'll try Tickless OS configuration if I need later. Thank you very much. Yuta Ide On 2021/04/30 2:41, Brennan Ashton wrote: On Thu, Apr 29, 2021, 10:07 AM yuta wrote: Brennan, Thank you for your advice. I checked links you shared and https://www.gnu.org/software/libc/ma

Re: How can I measure elapsed time?

2021-04-29 Thread yuta
ected to get 1.00 sec) Do you have any idea? Yuta Ide On 2021/04/30 0:30, Brennan Ashton wrote: On Thu, Apr 29, 2021, 8:16 AM yuta wrote: Hi all. I'm new to NuttX. I'm not sure if it's no problem me asking some personal question about NuttX here. (please tell me if better pl

How can I measure elapsed time?

2021-04-29 Thread yuta
STRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS" Nucleo-F767ZI Yuta Ide