cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeF1 I2C DMA Driver Questions

clark2
Associate II
Posted on January 08, 2016 at 17:15

I am attempting to port the ''I2C_TwoBoards_ComDMA'' example project to run on a different target board (ZMDI ZWIR451x Development Board) using Rowley CrossStudio as an IDE.  This target has an STM32F103RC micro.

After getting all the right files included and configured (I think) so that the project will build and execute, I discover that the ''non-blocking''  function 'HAL_I2C_Slave_Receive_DMA(...)' contains two calls to 'I2C_WaitOnFlagUntilTimeout(...)' the second one causes the slave node to timeout and go into 'error mode' before the master can even start transmitting.  Also, the comment states ''/* Wait until ADDR flag is set */'', yet the function arguments say otherwise: ''(hi2c, I2C_FLAG_ADDR, RESET, I2C_TIMEOUT_ADDR_SLAVE) != HAL_OK)''

Can anyone explain this logic?  Does ''non-blocking'' mean something different in this version of reality?

#i2c #hal #dma #stm32cubef1
3 REPLIES 3
clark2
Associate II
Posted on January 09, 2016 at 20:22

Nothing? Really?  Is there an ST presence in this forum?

Posted on January 10, 2016 at 04:20

It is primarily a user forum, ST doesn't have a heavy presence.

There's a great deal in the HAL/Cube that defies logic, beyond the pointy-clicky-monkey-presses-the-button stuff it makes my head hurt.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
clark2
Associate II
Posted on January 11, 2016 at 17:37

That's pretty much what I concluded.  After several days of trying to comprehend the Cube architecture, I came to the conclusion that someone went to great lengths to create thoroughly obfuscated code that is, for all practical purposes, inpenetrable.  The coding style and naming conventions alone are enough to make my brain explode.

ST documentation is only slightly more comprehensible and has left me leaning back towards TI for solutions for my current project.

I really thought working with the ZWIR4512 platform from ZMDI would be a little less painful, but alas it is destined for the pile of dust collectors....