Where to start STM32H7 support

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Where to start STM32H7 support

Postby Giovanni » Thu Nov 01, 2018 3:28 pm

I will look into D+, probably that is the reason.

Giovanni

rounin
Posts: 1
Joined: Sat Nov 03, 2018 8:10 pm
Location: The Internet
Been thanked: 1 time
Contact:

Re: Where to start STM32H7 support

Postby rounin » Sat Nov 03, 2018 8:16 pm

I'm interested in this part too, for the CAN FD and USB HS support. I'm going to start tinkering with the CAN module in a few days when the dev kit gets here, but I'm new to ChibiOS so it might take me a while. (mainly used FreeRTOS in the past, on MPC57xx parts).

DEHiCKA
Posts: 17
Joined: Thu Feb 21, 2013 8:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Where to start STM32H7 support

Postby DEHiCKA » Tue Nov 13, 2018 7:06 pm

Giovanni wrote:Hi,
I committed a demo for STM32H7 using the OTGv1 driver, it compiles (after some changes) but it still does not work.
OTG registers always read back as zero like it is, somehow, not reachable, I suspect there is some missing configuration or configuration error. OTG clocks are enabled, I am stuck...
Has anybody managed to enable OTG already?
Giovanni

I've finally figured it out. VDD33USB is tied to VDD and USB regulator must be turned off.
Just remove PWR_CR3_USBREGEN from STM32_PWR_CR3 define in mcuconf.

Need to bleach my brain know, after dumpster diving in cubemx generated crap.
Hell of a contrast with how well chibios is written!

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Where to start STM32H7 support

Postby Giovanni » Tue Nov 13, 2018 8:36 pm

Thanks for finding, I haven't had a chance to touch that for a while...

I will apply the fix, next step would be to write a new OTG driver able to leverage DMAs, H7 has those on both OTGs.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Where to start STM32H7 support

Postby Giovanni » Sun Dec 02, 2018 3:11 pm

Hi,

I committed the change, it is working. Thanks for finding this, it was driving me crazy.

Giovanni

DEHiCKA
Posts: 17
Joined: Thu Feb 21, 2013 8:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Where to start STM32H7 support

Postby DEHiCKA » Fri Dec 07, 2018 5:07 pm

No problem. Is there any example/test involving ADCv4?
I've briefly tried to set it up, DR is updating, but DMA is not working.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Where to start STM32H7 support

Postby Giovanni » Fri Dec 07, 2018 6:54 pm

Hi,

It is not tested yet this is why there is no test application, I will give it a try.

Giovanni

DEHiCKA
Posts: 17
Joined: Thu Feb 21, 2013 8:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: Where to start STM32H7 support

Postby DEHiCKA » Sun Dec 09, 2018 12:04 pm

Ah, sorry, my bad. Will wait till it is ready then.

maciek
Posts: 5
Joined: Thu Dec 13, 2018 2:55 pm

Re: Where to start STM32H7 support

Postby maciek » Thu Dec 13, 2018 3:04 pm

Hi,

I'm trying to test which features are working on H7. I've got it for GPIO and UARTs. Now examining I2C, it's not easy because there is no working example and I'm not that experienced to write everything without any helpers. Two questions:

-how to initialize I2CConfig for v3? I've found the following options for F3, but probably it should be different for H7?

static const I2CConfig i2c1_config = {

// STM32_TIMINGR_PRESC(15U) |
// STM32_TIMINGR_SCLDEL(4U) | STM32_TIMINGR_SDADEL(2U) |
// STM32_TIMINGR_SCLH(15U) | STM32_TIMINGR_SCLL(21U),
STM32_TIMINGR_PRESC(8U) | STM32_TIMINGR_SCLDEL(3U) | STM32_TIMINGR_SDADEL(3U) |
STM32_TIMINGR_SCLH(3U) | STM32_TIMINGR_SCLL(9U),
0,
0
};


-do I need to explicitely initialize pads for SCL and SDA? I mean palSetPadMode. Or if I don't do this, the default ones will work for the given I2C port, as defined in board.h?

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Where to start STM32H7 support

Postby Giovanni » Thu Dec 13, 2018 4:47 pm

Hi,

The peripheral is the same in F3 so it should be similar, the exact values have to be calculated, details are in the STM32 Reference Manual.

GPIO settings can be done in board.h or at runtime using the PAL driver. Check if your board.h already does this, if not use PAL functions.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 15 guests