MikroE Click Library Structures

Discuss with MikroElektronika software developers about current library development.
Post Reply
Author
Message
tmandreas
Posts: 22
Joined: 05 Nov 2013 17:39

MikroE Click Library Structures

#1 Post by tmandreas » 03 Dec 2019 21:18

I have been trying to work on a project for a while and I keep running into libraries that don't seem to work for certain dev platforms, or do not have enough documentation on the library functions to be able to get them to work. Is there a tutorial or structure layout somewhere for how the libraries are written?
For instance, I am trying to add Load Cell Click to Mikromedia 5 for Tiva. The example for ARM is for a Fusion board and it uses a different set of functions for initialization than what the installed Tiva Library has. The Tiva Library does not have help for each function that lays out how to use each function, or what the objects look like that have to be passed to the functions. I looked up the library in GitHub and found that "loadcell_driver_gpio_init" takes a "T_LOADCELL_P gpioObj" passed into it and that object essentially gets passed to "hal_gpioMap( (T_HAL_P)gpioObj" . However, there is nothing that I can find that shows what the acceptable objects would look like that get passed into that.
A layout structure, or a tutorial, on how to find the references and objects available for use in the Click libraries would be great.

Thank you.

GigaJoules
Posts: 3
Joined: 18 May 2021 12:31

Re: MikroE Click Library Structures

#2 Post by GigaJoules » 25 May 2021 10:48

I second this.

I'm currently trying to get a very finicky chip to play ball and need to see how hal_spiMap() actually works, as well as the corresponding write functions

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: MikroE Click Library Structures

#3 Post by filip.grujcic » 26 May 2021 09:29

Hello,

Generally mikroSDK 1.0 is a closed source, you can find the programmer's manual here:
https://download.mikroe.com/documents/m ... l-v100.pdf
It basically answers the questions you have.
However, for your convenience I suggest you submit a ticket on our helpdesk where we can provide you with the full source code of the library + mikroSDK HAL.

Regards,
Filip Grujcic

Le_marco83
Posts: 2
Joined: 13 Apr 2023 16:53

Re: MikroE Click Library Structures

#4 Post by Le_marco83 » 25 Apr 2023 15:01

Hi,

Have you find a solution ?

Because I have same problem.

I use some click board and want to use the supplied library under CubeMxIDE with a STM32 MCU.

And the code don't work.

With the RTD click board, I use SPI interface with a GPIO out defined for the Chip Select.

In the main.c the init function is in error during compile & debug : rtd_spiDriverInit(gpioObj, hspi1);

In fact the problem is coming from gpioObj i think. I don't understand what is this object ?? and how the library works.

To declare chip select under CubeMxIDE you have to specify a port (D port in my case) and a pin number (14 in my case). So you need 2 informations. I did't found the link with this gpioObj ? can you explain me. :(

If someone can explain me how doing this working under CubeMxIDE :

void rtd_spiDriverInit(uint8_t* gpioObj, uint8_t* spiObj)
{
hal_spiMap( (T_HAL_P)spiObj );
hal_gpioMap( (T_HAL_P)gpioObj );

// ... power ON
// ... configure CHIP
}

Another strange thing is inside the library from MIKROE for the click board. There is a file named "__RTD_Hal.c" where the function hal_spiMap is declare like this :

static void hal_spiMap(T_HAL_P spiObj);

but there is no code attached to this function ??? there is only the declaration of the function.

I found all MIKROE board functastic, but I want to do it working under STM32 using the IDE from ST : CubeMxIDE.

So waiting the help from someone here. :) Thanks !

Post Reply

Return to “Library Development Discussion”