cancel
Showing results for 
Search instead for 
Did you mean: 

Need education material pointer to library code for driving external-to-stm32 chips

David_
Senior

Please help pointing to learning material on this.

We can unserstnd that below library was written in proper engineering style so that it can be (a) ported to various STM chips. (b) can select use of POLL, Interrupt and DMA mode by "linking/select" the needed "function definition"

1. New to these and we worked for some time and still did not got to understand HOW (a) and (b) is performed in practice.  If skipping the 'proper' way (tons of Macro, define and ifdef), we can read the sensor with two HAL calls.  But we need to learn the proper way 🙂

2. Also, needing to get it right in "project" to link and work together with others code for inside and outside of the STM MCU. Our project is created  using RAW STM chip WITHOUT the Board Support Package, like Nucleo.  So, we need to deffine the hardware ourself (and still did not got it right)

3. We are loss in multiple 'INIT' functions that 'need to be called in corect sequence". Some SOFTWARE setup data structure, i2c HANDLE, some HARDWARE setup for STM32 chip clock chain/interrupt controller/dma controller,  some setup the I2C controller inside the STM MCU.  

Now, we stuck at NOT having a data structure IO being initialized with selection of POLL/Interrupt/DMA function prototype.  Others is ok so far.

 

 * typedef struct
{
  VEML6030_Init_Func          Init;
  VEML6030_DeInit_Func        DeInit;
  uint16_t                    ReadAddress;
  uint16_t                    WriteAddress;
  VEML6030_IsReady_Func       IsReady;
  VEML6030_WriteReg_Func      WriteReg;
  VEML6030_ReadReg_Func       ReadReg;
  VEML6030_GetTick_Func       GetTick;
} VEML6030_IO_t;

 

https://github.com/STMicroelectronics/stm32-veml6030

It says, "Please refer to the repository of the BSP board driver you are using to know which version of this BSP component driver to use. It is crucial that you use a consistent set of versions as indicated."

Many thanks for advises.  Now is our time to learn these once and for all and burden is ours!  These MCU are complex to use.  Good news is this is near the last one to overcome and light at end of tunnel.  🙂

0 REPLIES 0