Including HAL drivers from ST in chibios

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

Moderators: barthess, RoccoMarco

milom
Posts: 7
Joined: Sun Oct 21, 2018 11:54 am
Has thanked: 3 times

Including HAL drivers from ST in chibios

Postby milom » Mon Dec 03, 2018 12:22 pm

Hi Giovanni, I did well to complete the work of importing the chibios to Keil, now I would like to include the HAL st in the project, only for some devices, so I can take advantage of some of the work I did, for example on my graphics drivers. I leave including the GPIOs of the HAL ST. I have included the file stm32f4xx_hal_gpio.c without problems activating all dependencies. I have a GPIOD compatibility problem though. Do I have to exclude the PAL libraries? I have no way to include the two drivers? thank you.

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

Re: Including HAL drivers from ST in chibios

Postby Giovanni » Mon Dec 03, 2018 1:58 pm

Try disabling the PAL driver, there could be conflicts in registers definitions, the PAL driver uses its own structure.

Giovanni

milom
Posts: 7
Joined: Sun Oct 21, 2018 11:54 am
Has thanked: 3 times

Re: Including HAL drivers from ST in chibios

Postby milom » Mon Dec 03, 2018 4:46 pm

Thanks for the quick answer Giovanni, turning off the pal driver works, but I also sept the analog pins with the chibios driver ... and the project include a setting of analog pins with palSetGroupMode (... or even the uart driver with ..palSetPadMode ( GPIOA, 9, PAL_MODE_ALTERNATE (7));
palSetPadMode (GPIOA, 10, PAL_MODE_ALTERNATE (7)); ... how to behave in these cases? thanks

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

Re: Including HAL drivers from ST in chibios

Postby Giovanni » Mon Dec 03, 2018 5:28 pm

Hi,

You need to decide which framework to use for GPIO settings. Making those compatible would require changes to some extent.

Giovanni

milom
Posts: 7
Joined: Sun Oct 21, 2018 11:54 am
Has thanked: 3 times

Re: Including HAL drivers from ST in chibios

Postby milom » Mon Dec 03, 2018 5:35 pm

I understood, the initialization of the pins with the HAL ST method does not affect the use of the drivers or not? that is, I can initialize the pins as HAL ST and then use the chibios driver, I think there is no problem with the PAL drivers or not?

Thanks for your patience...
Marco

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

Re: Including HAL drivers from ST in chibios

Postby Giovanni » Mon Dec 03, 2018 7:22 pm

Hi,

You can use ST HAL to change pins, this will not affect other drivers except SPI in SW-CS mode, that has a dependency on PAL but you can use another mode or drive CS directly.

Giovanni

milom
Posts: 7
Joined: Sun Oct 21, 2018 11:54 am
Has thanked: 3 times

Re: Including HAL drivers from ST in chibios

Postby milom » Mon Dec 03, 2018 8:42 pm

Thanks Giovanni for your efforts... grazie per il meraviglioso lavoro che metti a disposizione del mondo. Scusa l'italiano ma in periodi come questi, fiero di esserlo e fiero di questo lavoro tutto italiano.. sorry for paraphrase in Italian... :D


Return to “STM32 Support”

Who is online

Users browsing this forum: Google Adsense [Bot] and 7 guests