Hello,
STM32_DMA_STREAM_ID_MSK(1, 5) is a missing for STM32_I2C4_TX_DMA_MSK in 18.2, 19.1 and trunk
patch for 18.2 :
[code]
[diff --git a/os/hal/ports/STM32/STM32F7xx/stm32_registry.h b/os/hal/ports/STM32/STM32F7xx/stm32_registry.h
index 124a57f92..ce9138395 100644
--- a/os/hal/ports/STM32/STM32F7xx/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32F7xx/stm32_registry.h
@@ -1177,7 +1177,8 @@
STM32_DMA_STREAM_ID_MSK(1, 2) |\
STM32_DMA_STREAM_ID_MSK(1, 1))
#define STM32_I2C4_RX_DMA_CHN 0x00200280
-#define STM32_I2C4_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 6)
+#define STM32_I2C4_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\^M
+ STM32_DMA_STREAM_ID_MSK(1, 6))^M
#define STM32_I2C4_TX_DMA_CHN 0x08000000
/* QUADSPI attributes.*/
/code]
Alexandre
patch : fix dma_mask for F76X F77X I2C4_RX Topic is solved
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: patch : fix dma_mask for F76X F77X I2C4_RX
The manual seems to be wrong, because (1, 5) is shown as I2C4 RX and (1, 5) is I2C4 TX.
Do you confirm? if so then I also need to remove (1, 5) from I2C4 RX.
Giovanni
Do you confirm? if so then I also need to remove (1, 5) from I2C4 RX.
Giovanni
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
- alex31
- Posts: 374
- Joined: Fri May 25, 2012 10:23 am
- Location: toulouse, france
- Has thanked: 38 times
- Been thanked: 61 times
- Contact:
Re: patch : fix dma_mask for F76X F77X I2C4_RX
Do you confirm? if so then I also need to remove (1, 5) from I2C4 RX.
Did not verify on the reference manual, but that's what is in CUBEMX files :
from cubemx (5.1.0) files for stm32f[6/7]xx :
I2C4_TX : [stream(1, 5) Channel 2]
I2C4_TX : [stream(1, 6) Channel 8]
I2C4_RX : [stream(1, 1) Channel 8]
I2C4_RX : [stream(1, 2) Channel 2]
Don't have hardware on the hand right now, but i will check that is works with all the above setting tomorrow and will report here.
In the past, when i found mismatch between RM and CUBEMX, CUBEMX was right, will see tomorrow how true is this rule
Alexandre
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: patch : fix dma_mask for F76X F77X I2C4_RX
I think the RM is wrong too, I fixed like in cubemx.
Giovanni
Giovanni
- alex31
- Posts: 374
- Joined: Fri May 25, 2012 10:23 am
- Location: toulouse, france
- Has thanked: 38 times
- Been thanked: 61 times
- Contact:
Re: patch : fix dma_mask for F76X F77X I2C4_RX
Hello,
I have made tests on the target, and as usual, CUBE is right over RM, so your patch resolves the problem, thanks.
There is another one line patch needed to use I2C4 on chibios 18.2 (its already OK on 19.x and trunk) :
Alexandre
I have made tests on the target, and as usual, CUBE is right over RM, so your patch resolves the problem, thanks.
There is another one line patch needed to use I2C4 on chibios 18.2 (its already OK on 19.x and trunk) :
Code: Select all
diff --git a/os/hal/ports/STM32/LLD/I2Cv2/hal_i2c_lld.c b/os/hal/ports/STM32/LLD/I2Cv2/hal_i2c_lld.c
index beb7c63fe..e94e48afe 100644
--- a/os/hal/ports/STM32/LLD/I2Cv2/hal_i2c_lld.c
+++ b/os/hal/ports/STM32/LLD/I2Cv2/hal_i2c_lld.c
@@ -1658,7 +1658,7 @@ void i2c_lld_stop(I2CDriver *i2cp) {
#error "I2C4 interrupt numbers not defined"
#endif
- rccDisableI2C4(FALSE);
+ rccDisableI2C4();
}
#endif
}
Alexandre
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: patch : fix dma_mask for F76X F77X I2C4_RX
Hi,
Are you sure? it is OK here, perhaps I fixed it and don't remember.
Giovanni
Are you sure? it is OK here, perhaps I fixed it and don't remember.
Giovanni
Who is online
Users browsing this forum: No registered users and 10 guests