how could we convert cmsis halow example projects from stm32u5 project to stm32h5? . both have m33 core.
any reply from morse micro?
Hi @blaa
Sorry for the long delay getting back to you. The 1.5.0 version of the CMSIS pack currently available does not include templating to generate necessary HAL code for every STM32 core, so there will be some manual work here in getting the platform running on a platform which is not based on the STM32U5.
You will largely want to follow the instructions in section 9 of this guide. Be sure to configure required GPIOs and SPI interfaces as close to as described in that guide as possible. Naturally, when porting to another platform, some options may vary.
Once your software is generated, navigate to Middlewares\Third_Party\MorseMicro_MM_IoT_MM_IoT\BSP-EKH05\components\mm6108\spi
of your generated project source and go through the HAL functions in those files, modifying them as required for the STM32H5. These HALs provide the pre-compiled Morse Micro driver library (libmorse.a) with the necessary functions to communicate with your hardware.
An alternative might be to look at Zephyr, instead of ST Cube and try to wrap your head around device tree. The Zephyr module (GitHub - MorseMicro/mm-iot-zephyr) is a lot more portable, leveraging generic Zephyr APIs for the HAL functions, but comes at the cost of reduced throughput.
Thank you for your reply @ajudge.
in section 10 Porting a new platform: there is a requirement to be able to use templates
“Note: The templates described in this section are available from CMSIS pack release 1.6.0
onwards.”
how could I achieve that pack release. I have the version 1.5.0.
thanks for your support in advance
Unfortunately that pack release is not publicly available yet. So you’ll have to follow Section 9 for now and manually update the HAL functions to suit your target platform.
hi again @ajudge
what do you suggest to implement seeed fgh100mh module to your code?
Do you mean this part?
The 1.5.0 uses the same chip firmware version as the SeeedStudio ESP32 SDK. So, the only difference will be including the appropriate BCF. SeeedStudio has pushed this https://github.com/Seeed-Studio/mm-iot-esp32/raw/ac07cfb7fb3ee82dafc59242ceaa42581c7df01a/framework/morsefirmware/bcf_mf16858_us.mbin to their git repository.
The easiest way to include this file into a project is to convert it to a .c files. If you have access to linux, xxd
can do this with xxd -i bcf_mf16858_us.mbin > bcf_mf16858_us.c
. You can then include this .c file in your project, and define BCF_DATA_3V3
to be bcf_mf16858_us
and BCF_DATA_3V3_LEN
to be bcf_mf16858_us_len
.
Check those symbols match the file created by xxd
.
that one @ajudge