STM32H7's I2C4 using BDMA not triggering Complete Callbacks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-29 7:18 AM
I'm using an STM32H725 to communicate with an i2c sensor. I'm using the I2C4 bus with the HAL DMA functions. I also enabled the BDMA channels for the rx and tx and respective interrupts. The problem is that the complete rx/tx callbacks are not triggered.
I found that this could be related to the problem described here: https://st.my.site.com/community/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices
Any solutions to this problem?
- Labels:
-
DMA
-
I2C
-
STM32H7 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 2:37 AM
Hello @MLuis.1​ ,
First, make sure that you are using the correct address and the correct frequency for the I²C communication.
The take an oscilloscope to check the I2C_SDA and I2C_SCL behavior to define the error source.
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 2:41 AM
The I2C communications work fine as long as I use the IT functions or polling functions.
The problem only occurs when using DMA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 3:01 AM
You should place the buffer for transmission or reception in the SRAM4.
SRAM4 region : 0x38000000 - 0x38003FFF
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 3:16 AM
Yes, I thought the same. Any tips on how to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 3:47 AM
As example :
uint8_t I2C_buffer_Tx[data_size] @ 0x38001000 ;
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 3:52 AM
The compiler does not accept that syntax.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 4:04 AM
You can try with this code :
/* Buffer used for transmission */
#if defined ( __ICCARM__ )
#pragma location = 0x38000000
uint8_t I2C_buffer_Tx[1] ;
#else /* __GNUC__ or __CC_ARM */
uint8_t __attribute__((section (".RAM_D3"))) I2C_buffer_Tx[1];
#endif
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 4:11 AM
Still not working using uint8_t __attribute__((section (".RAM_D3"))) I2C_buffer_Tx[1];
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-30 8:07 AM
which IDE do you use ?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
