Hello,
There is a little problem in os/hal/ports/STM32/STM32F7xx/stm32_registry.h file.
This file statically check that dma stream defined in mcuconf.h are valid.
Unfortunately, this file is correct for stm32F7[4,5]x family, but not for stm32F7[6,7] family
where each DMA engines has more channels (9 channels instead of 7 for DMA1, 11 channels instead of 7 for DMA2)
by example, I2C2_TX can use DMA1 STREAM4 on F76x, but not on F74x.
some channels are reserved for peripheral that HAL don't address, but there is I2C, SPI, SDMMC capable streams in these
additional channels.
What is the prefered way to patch, have a different registry for the two F7 families, of keep one file and play with #ifdef inside the file ?
thanks
Alexandre
missing entries in F76x dma stream static check Topic is solved
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: missing entries in F76x dma stream static check
Hi,
On the Reference Manual (RM0410) I only see 8 channels per DMA unit, are you sure?
Giovanni
On the Reference Manual (RM0410) I only see 8 channels per DMA unit, are you sure?
Giovanni
- alex31
- Posts: 379
- Joined: Fri May 25, 2012 10:23 am
- Location: toulouse, france
- Has thanked: 38 times
- Been thanked: 62 times
- Contact:
Re: missing entries in F76x dma stream static check
I have found the new entries in the RM0410 Reference manual :
STM32F76xxx and STM32F77xxx advanced ARM®-based 32-bit MCUs
@ page 246/1896, DocID028270 Rev 2
I am working on a simple fix using #if for the peripheral that have additional entries for the F76/77 devices,
i'll post it here when it 'll be finished/tested
does the macro which use the xxxxx_DMA_CHN macro will manage nibble > 7 for the new channel between 8 and 11 ?
STM32F76xxx and STM32F77xxx advanced ARM®-based 32-bit MCUs
@ page 246/1896, DocID028270 Rev 2
I am working on a simple fix using #if for the peripheral that have additional entries for the F76/77 devices,
i'll post it here when it 'll be finished/tested
does the macro which use the xxxxx_DMA_CHN macro will manage nibble > 7 for the new channel between 8 and 11 ?
- alex31
- Posts: 379
- Joined: Fri May 25, 2012 10:23 am
- Location: toulouse, france
- Has thanked: 38 times
- Been thanked: 62 times
- Contact:
Re: missing entries in F76x dma stream static check
I have made a fix (in attachment) which :
° adds device reference in the #ifdef @beginning of stm_registry.h
° adds the channels for STM32F76xxx and STM32F77xxx device as seen on reference manual (see the attached file with the dma table extracted)
° modify the STM32_DMA_GETCHANNEL macro so that it can return channels coded on 4 bits instead of 3
I have successfully tested it using I2C2_TX on DMA1/STREAM4/CHANNEL8 on a F767.
I just have seen what could be a bug in RM410 documentation in DMA2 request mapping : SPI5_RX on STREAM5 is both on CHANNEL7 and CHANNEL9, so i have not added the CHANNEL9 entry is STM32_SPI5_RX_DMA_CHN since i don't understand how a the same stream could be on two different channels.
Alexandre
° adds device reference in the #ifdef @beginning of stm_registry.h
° adds the channels for STM32F76xxx and STM32F77xxx device as seen on reference manual (see the attached file with the dma table extracted)
° modify the STM32_DMA_GETCHANNEL macro so that it can return channels coded on 4 bits instead of 3
I have successfully tested it using I2C2_TX on DMA1/STREAM4/CHANNEL8 on a F767.
I just have seen what could be a bug in RM410 documentation in DMA2 request mapping : SPI5_RX on STREAM5 is both on CHANNEL7 and CHANNEL9, so i have not added the CHANNEL9 entry is STM32_SPI5_RX_DMA_CHN since i don't understand how a the same stream could be on two different channels.
Alexandre
- Attachments
-
- dma_table.pdf.tar
- (120 KiB) Downloaded 156 times
-
- dma_channel_8_11.patch.tar
- (10 KiB) Downloaded 156 times
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: missing entries in F76x dma stream static check
Hi,
I confused channel with stream... you are right, I will verify those macros.
Giovanni
I confused channel with stream... you are right, I will verify those macros.
Giovanni
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: missing entries in F76x dma stream static check
Hi,
I committed a fix but I preferred to split sections in registry rather than having all those #ifs.
Could you confirm everything is fine?
Giovanni
I committed a fix but I preferred to split sections in registry rather than having all those #ifs.
Could you confirm everything is fine?
Giovanni
- alex31
- Posts: 379
- Joined: Fri May 25, 2012 10:23 am
- Location: toulouse, france
- Has thanked: 38 times
- Been thanked: 62 times
- Contact:
Re: missing entries in F76x dma stream static check
Hello,
Well, I am in my first day of easter holidays, on the highway, my wife driving. I have not F7 hardware with me,
but i can confirm that using new channels, it compiles now with master, and it wasn't before, so i am confident
that it works !
Thanks
Alexandre
Could you confirm everything is fine?
Well, I am in my first day of easter holidays, on the highway, my wife driving. I have not F7 hardware with me,
but i can confirm that using new channels, it compiles now with master, and it wasn't before, so i am confident
that it works !
Thanks
Alexandre
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Who is online
Users browsing this forum: No registered users and 70 guests