Hello,
Was trying to use I2C4 on this Discovery board to enable the touch screen controller.
It's throwing a hard fault when calling line 835 @ os\hal\ports\STM32\LLD\I2Cv2\hal_i2c_lld.c
dmaStreamSetPeripheral(i2cp->dmatx, &dp->TXDR);
I've tried to tweak the DMA assignments without success.
If it's worth it I can use I2C1 just fine.
Couldn't find anything that looks obvious to me on what could be causing this.
Any hints?
BTW, I'm using the latest 19.1.3.
Thanks!
I2C4 in ST_STM32F769I_DISCOVERY Topic is solved
-
josesimoes
- Posts: 91
- Joined: Sat Feb 18, 2017 11:50 am
- Has thanked: 43 times
- Been thanked: 23 times
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: I2C4 in ST_STM32F769I_DISCOVERY
Could you compile with -O0 and see what exactly is throwing the hard fault?
That function does not touch I2C4, it just sets DMA registers.
Giovanni
That function does not touch I2C4, it just sets DMA registers.
Giovanni
-
josesimoes
- Posts: 91
- Joined: Sat Feb 18, 2017 11:50 am
- Has thanked: 43 times
- Been thanked: 23 times
Re: I2C4 in ST_STM32F769I_DISCOVERY
Giovanni,
I've just compiled with -O0 as suggested. The hard fault is still there, but I couldn't see any indication on what could be causing it...
I do have a fault handler but I couldn't find anything from the output.
In the mean time I've stumbled on this:
viewtopic.php?f=35&t=5443
It's on a different series and I2C driver, I know, but could it be related?
I've checked the vectors myself and haven't found anything suspicious...
I've just compiled with -O0 as suggested. The hard fault is still there, but I couldn't see any indication on what could be causing it...
I do have a fault handler but I couldn't find anything from the output.
In the mean time I've stumbled on this:
viewtopic.php?f=35&t=5443
It's on a different series and I2C driver, I know, but could it be related?
I've checked the vectors myself and haven't found anything suspicious...
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: I2C4 in ST_STM32F769I_DISCOVERY
Hi,
I tried adding an i2cStart() to the RT-STM32F746G-DISCOVERY demo and it goes past i2cStart() without problems. I tested on trunk and the latest 19.1.x.
Could you give trunk code a try? or update to latest 19.1.x which will become 19.1.4 soon.
Giovanni
I tried adding an i2cStart() to the RT-STM32F746G-DISCOVERY demo and it goes past i2cStart() without problems. I tested on trunk and the latest 19.1.x.
Could you give trunk code a try? or update to latest 19.1.x which will become 19.1.4 soon.
Giovanni
-
josesimoes
- Posts: 91
- Joined: Sat Feb 18, 2017 11:50 am
- Has thanked: 43 times
- Been thanked: 23 times
Re: I2C4 in ST_STM32F769I_DISCOVERY
Thanks for looking into this.
I'm already using the latest on 19.1.x...
A question that may be stupid, but just to be sure: your test was with I2C4, correct?
Thanks!
I'm already using the latest on 19.1.x...
A question that may be stupid, but just to be sure: your test was with I2C4, correct?
Thanks!
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
-
josesimoes
- Posts: 91
- Joined: Sat Feb 18, 2017 11:50 am
- Has thanked: 43 times
- Been thanked: 23 times
- Abusous2000
- Posts: 15
- Joined: Fri Jul 05, 2019 1:26 am
- Has thanked: 7 times
- Been thanked: 3 times
Re: I2C4 in ST_STM32F769I_DISCOVERY
I got it to work on both STM32F746g-discovery and STM32F769i (with LCD & Audio decoder wm8994) on I2C4. Make sure that you have enabled the pins with open drain and highest speed only; and you will be OK
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: I2C4 in ST_STM32F769I_DISCOVERY
Closing until/unless there is confirmation of this problem.
Giovanni
Giovanni