Page 1 of 1
Including HAL drivers from ST in chibios
Posted: Mon Dec 03, 2018 12:22 pm
by milom
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.
Re: Including HAL drivers from ST in chibios
Posted: Mon Dec 03, 2018 1:58 pm
by Giovanni
Try disabling the PAL driver, there could be conflicts in registers definitions, the PAL driver uses its own structure.
Giovanni
Re: Including HAL drivers from ST in chibios
Posted: Mon Dec 03, 2018 4:46 pm
by milom
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
Re: Including HAL drivers from ST in chibios
Posted: Mon Dec 03, 2018 5:28 pm
by Giovanni
Hi,
You need to decide which framework to use for GPIO settings. Making those compatible would require changes to some extent.
Giovanni
Re: Including HAL drivers from ST in chibios
Posted: Mon Dec 03, 2018 5:35 pm
by milom
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
Re: Including HAL drivers from ST in chibios
Posted: Mon Dec 03, 2018 7:22 pm
by Giovanni
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
Re: Including HAL drivers from ST in chibios
Posted: Mon Dec 03, 2018 8:42 pm
by milom
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...
