HAL_SPI_Transmit_DMA. If I transmit a big amount of data (30000 bytes), it fail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-23 8:45 AM
Hi!
I'm using STM32H7 for a new project, and I need to send data through HAL_SPI_Transmit_DMA to an external MRAM.
I have a block of 34000 bytes. If i send this: HAL_SPI_Transmit_DMA(&MRAM_SPI_H, buf, 34000); there is some write problem (when I read the data, some bit is changed so the CRC error takes place).
However, If i send the same block of data but divided in few parts (for example, parts of 5000 bytes): HAL_SPI_Transmit_DMA(&MRAM_SPI_H, buf, 5000) then the data reading is completely correct.
The maximum size of the SPI transaction is uint16_t so, what could be the problem?
Thank you so much in advance
Josep
Solved! Go to Solution.
- Labels:
-
DMA
-
SPI
-
STM32Cube MCU Packages
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-24 3:48 AM
Solved.
The problem was the timeout value of the reading function. The reading is using regular SPI HAL_SPI_Receive and the timeout value wasn't enough for the 34KB.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-23 9:56 AM
>>what could be the problem?
Cache coherency? MPU memory region setting?
Does the memory device have a transactional limit or timeout?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-24 3:48 AM
Solved.
The problem was the timeout value of the reading function. The reading is using regular SPI HAL_SPI_Receive and the timeout value wasn't enough for the 34KB.
Thank you
