Skip to content

STM32 HAL Driver Update #6422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ckilimci opened this issue Sep 9, 2020 · 4 comments
Open

STM32 HAL Driver Update #6422

ckilimci opened this issue Sep 9, 2020 · 4 comments

Comments

@ckilimci
Copy link

ckilimci commented Sep 9, 2020

Hello all,

Recently, STMicroelectronics updated STM32F4 HAL driver [1]. Some of the APIs are changed, like CAN. Do you plan to update included sources listed here?

[1] https://www.st.com/resource/en/user_manual/dm00105879-description-of-stm32f4-hal-and-ll-drivers-stmicroelectronics.pdf

Sincerely,
Caglar

@dpgeorge
Copy link
Member

Some of the APIs are changed, like CAN.

MicroPython provides a public Python API, and the underlying C API from the HAL doesn't really matter so much, as long as it functions correctly. So unless there are bug fixes, it's a lot of effort to update the HAL for little benefit to the Python user.

In the end the "HAL" is really the set of registers for the peripherals, and that never changes.

Do you have other reasons to want to update the HAL?

BTW, a good source for the HAL is now GitHub: https://github.com/STMicroelectronics/STM32CubeF4

@ckilimci
Copy link
Author

First of all, thank you for your time and reply.

I agree, there are not much benefit for the regular Python users but in the CAN legacy driver, there is a note that says:
This HAL CAN driver is deprecated, it contains some CAN Tx/Rx FIFO management limitations. Another HAL CAN driver version has been designed with new API's, to fix these limitations

Do you have other reasons to want to update the HAL?

The main reason to examine updating HAL is, I am having an issue for receiving CAN messages if there is a burst of many frames, then I could not read all of them. Maybe, we can solve or improve just using interrupt mode of CAN driver. Do you think, updating HAL driver helps that, too?

BTW, a good source for the HAL is now GitHub: https://github.com/STMicroelectronics/STM32CubeF4

Thank you for this.

@dpgeorge
Copy link
Member

The main reason to examine updating HAL is, I am having an issue for receiving CAN messages if there is a burst of many frames, then I could not read all of them. Maybe, we can solve or improve just using interrupt mode of CAN driver. Do you think, updating HAL driver helps that, too?

It's hard to say without looking into it in detail. If the new HAL is substantially different to the old one then it'd be a fair bit of work to update the Python bindings to work with the new HAL and still give the same Python API to the user. And that may not fix the problem you see.

@ckilimci
Copy link
Author

Thank you for precious comments.

I also saw the RFC you have created 6125 to enhance uevent module. As I understand, even that will be merged, I need to make changes to use interrupt mode of CAN driver, right?

tannewt pushed a commit to tannewt/circuitpython that referenced this issue May 26, 2022
Repair mixgo_ce frozen lib to frozen/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants