pressure 4 click example wont build

General discussion on mikroC PRO for ARM.
Post Reply
Author
Message
Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

pressure 4 click example wont build

#1 Post by Mince-n-Tatties » 26 Feb 2022 00:03

Hi All,

I have a been fighting with mikroE pressure click 4 example on mikroC pro and Necto.

only really interested in mikro C pro ARM just now

MC pro 6.2.0 with license
EasyMx PRO v7 with either STM32F107VG or STM32F407VG (tried to compile for both)
pressure 4 click F107.jpg
pressure 4 click F107.jpg (36.99 KiB) Viewed 1626 times
pressure 4 click F107 lib installed.jpg
pressure 4 click F107 lib installed.jpg (45.81 KiB) Viewed 1626 times
see next post for the rest...
Best Regards

Mince

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

Re: pressure 4 click example wont build

#2 Post by Mince-n-Tatties » 26 Feb 2022 00:08

pressure 4 click F107 rebuild all sources used.jpg
pressure 4 click F107 rebuild all sources used.jpg (28.84 KiB) Viewed 1624 times
build for F107VG
pressure 4 click F107 build info.jpg
pressure 4 click F107 build info.jpg (35 KiB) Viewed 1624 times
Build for F407VG
pressure 4 click F407 build info.jpg
pressure 4 click F407 build info.jpg (35.76 KiB) Viewed 1624 times
Best Regards

Mince

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: pressure 4 click example wont build

#3 Post by filip » 28 Feb 2022 12:14

Hi,

Please add a path to these source files in the Edit Project Paths menu, usually it is this path :
\mikroC PRO for ARM\Packages\mikroBUS BDF API\Uses\

Regards,
Filip.

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

Re: pressure 4 click example wont build

#4 Post by Mince-n-Tatties » 28 Feb 2022 14:54

Thank you Filip,

super fast response and accurate.

pressure 4 click F107 good build.jpg
pressure 4 click F107 good build.jpg (30.53 KiB) Viewed 1602 times
Best Regards

Mince

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

Re: pressure 4 click example wont build

#5 Post by Mince-n-Tatties » 28 Feb 2022 15:31

joy is short lived.

as the library is closed i cant debug very far (without going to ASM)

following the flow, i can see that I2C communication with the BMP280 is good, otherwise it would fail at pressure4_init.

However it is obviously blocked somewhere when trying to collect the Temperature...
fail to get temperature.jpg
fail to get temperature.jpg (111.22 KiB) Viewed 1602 times
can't debug into "pressure4_getPressure" as its a closed library.
fail to get temperature 2.jpg
fail to get temperature 2.jpg (105.89 KiB) Viewed 1602 times
swap temperature and pressure (pressure is not blocking) around, i then get a pressure value which i assume is some dummy value as it is not correct and doesn't change with pressure.

So on the surface it looks like the I2C hardware is good (passed pressure4_init), but there is something wrong with library, either device register address locations maybe. I also assume get pressure has a better handler and fills (calculates) in a dummy value "794.0636" and does not cause an I2C block.

Edit: Actually it is not correct to think the library is at fault... it's been downloaded 2792 times! nothing would last that long if it was broken.

https://libstock.mikroe.com/projects/vi ... re-4-click
Best Regards

Mince

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

Re: pressure 4 click example wont build

#6 Post by Mince-n-Tatties » 28 Feb 2022 16:50

ran the weather click example (albeit for a BME280, register map is the same for Temp and Pressure)

I get readings now, the pressure is too high (this will just be math) but at least it reacts to pressure change and the temp is VERY high (again this will just be math) but also reacts to change.

This points me back at the BMP280 library!

BME280 weather code.jpg
BME280 weather code.jpg (73.44 KiB) Viewed 1602 times
Best Regards

Mince

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: pressure 4 click example wont build

#7 Post by filip » 11 Mar 2022 12:04

Hi,

I'm attaching Pressure 4 library, maybe it will be of assistance to see what is going on.

Regards,
Filip.
Attachments
Pressure_4_Click-master-SW-library.zip
(50.29 KiB) Downloaded 33 times

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

Re: pressure 4 click example wont build

#8 Post by Mince-n-Tatties » 14 Mar 2022 00:11

Hi filip

Thank you for that.
Best Regards

Mince

Post Reply

Return to “mikroC PRO for ARM General”