6 years, 9 months ago.

how to use EV-COG-AD3029LZ temperature sensor (ADT7420) in MBED OS

나는 EV-COG-AD3029LZ 사용자다. I am an EV-COG-AD3029LZ user.

그리고 내가 사용하는 툴은 MBED OS 이다. and The tool I use is MBED OS.

나는 EV-COG-AD3029LZ 에 포한된 온도센서(ADT7420)를 사용하고 싶다. I would like to use the temperature sensor (ADT7420) in EV-COG-AD3029LZ.

mbed os에서 코딩된 예제나 라이브러리를 원한다. I want a coded example or library in mbed os.

찾아 봤지만, 찾기 힘들다. I tried, but It was difficult to find.

추가적으로 MBED OS에서 I2C 클래스를 사용하면 멈추는 현상이 발생한다. In addition, when I2C class is used in MBED OS, it stops.

특히 I2C.write()를 사용할때 멈추는 현상이 빈번하게 발생한다. Especially when I use I2C.write (), it stops frequently.

현재 ADT7410.h ADT7410.cpp를 참고로 코드 작성중 이다. I am currently code with reference to ADT7410.h and ADT7410.cpp.

현재 ADT7410.h ADT7410.cpp를 참고로 코드 작성중 이다. I am currently writing code with reference to ADT7410.h and ADT7410.cpp.

작성중인 파일을 첨부한다. I Attach ADT7410.h, ADT7410.cpp and main.cpp /media/uploads/scotstiner/main.cpp /media/uploads/scotstiner/adt7410.cpp /media/uploads/scotstiner/adt7410.cpp

2 Answers

6 years, 4 months ago.

Hi APS Lab,

Thanks a lot for your answer. Before I will contact ADI, I want to know few things: Is that the drivers that load automatically when EV-COG-AD4050LZ boards gets connected to PC? Or do they get loaded different way?

with mbed CLI, how do I modify the driver ? I presume I will have to install mbed CLI package with some extra software packages right ?

Regards, Mike

Hi, Mike,

The I2C driver is loaded automatically. The problem is that the I2C API is not full implementation for I2C access.

Regarding the Mbed CLI, you have to import current project. Mbed CLI package is not including the COG drivers. First, you need to export current project as mbed cli. Please see the files which is downloaded in your local drive.

For build the project, you need to import what you exported project as mbed cli.

Anyway, I recommend to contact ADI first, that’s the best way to fix the problem.

Best Regards, APS-Lab

posted by APS Lab 17 Aug 2018
6 years, 6 months ago.

Hi,

I've worked the ADT7420 with COG board. Please import my project files. https://os.mbed.com/users/APS_Lab/code/COG4050_ADT7420/

Key point was that GPIO28 pin will be set to 1, the I2C power is configured by the GPIO28 pin.

Hope your help.

Best Regards, APS

Hi APS LAb,

I have tried your code and I was able to get some sort of the temp reading, however ID is being read in wrong, it should read 0xCB as per datasheet, your code reads 0x0C, I worried that either I2C comms is not sorted properly or there is some other register being read as misread. Also, can you explain, why are you setting only MSB register address as the read - does I2C increments the address on second read ? to 0x01?, how can I see how I2C is done ? read and write, any details on that ?

Best Regards, Mike

posted by Michal Lisowski 16 Aug 2018

Hi, Mike,

Current I2C driver can't read ID register. I was facing same issue what you are described it. The driver is only able to access 0x00 to 0x0C. Other register is ignored. You might want to have a contact to ADI sales for this issue. Or, you can be modified the I2C driver code with the using Mbed CLI. Mbed CLI is including all source code.

Best Regards, APS Lab

posted by APS Lab 16 Aug 2018