Author Topic: Stm32 i2c communication hal library  (Read 1821 times)

0 Members and 1 Guest are viewing this topic.

Offline huseyinkTopic starter

  • Contributor
  • Posts: 11
Stm32 i2c communication hal library
« on: June 21, 2018, 11:59:36 am »
hi everyone

I cant understand i2c module in hal library. I cant understand how the functions process in the program. Ex : hal_i2c_master_transmit() and hal_i2c_master_receive. Can someone explain processing of these function and give me an example project.

Thanks
 

Offline mbless

  • Regular Contributor
  • *
  • Posts: 227
  • Country: 00
Re: Stm32 i2c communication hal library
« Reply #1 on: June 21, 2018, 08:31:20 pm »
How about you post your code, explain what you are trying to do, and say why error you get?
 
The following users thanked this post: nugglix

Offline huseyinkTopic starter

  • Contributor
  • Posts: 11
Re: Stm32 i2c communication hal library
« Reply #2 on: June 22, 2018, 03:08:17 pm »
How about you post your code, explain what you are trying to do, and say why error you get?

I did not get an error. I just wanna learn the explaination i2c with hal lib. So what is the code processing? How does it work?
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Stm32 i2c communication hal library
« Reply #3 on: June 22, 2018, 05:22:27 pm »
I did not get an error. I just wanna learn the explaination i2c with hal lib. So what is the code processing? How does it work?

It's still not really clear what you're after... :-//
It's not at all clear what your competence level is in C and embedded code.
This makes it next to impossible to answer.

If you are looking for an explanation of how to use the I2C HAL, I would suggest studying:
  • The long "How to use this driver" comment at the beginning of the HAL I2C C file, e.g., for an F4 in stm32f4xx_hal_i2c.c - it's terse, but a good guide.
  • The various project examples, also contained in the Cube package

If you want to understand how the HAL code works, you can start by reading the reference manual for your specific STM32 family, matching the descriptions and usage suggestions there with the actual HAL code.
If there are parts that you cannot understand, show that you have made an effort, ask specific questions and many here will be happy to help.
In any case, it's not fun code to read. ::)
Nandemo wa shiranai wa yo, shitteru koto dake.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf