I noticed a Hardware API being discussed: viewtopic.php?f=3&t=2545&hilit=api&start=50
Is that ready to use on a STM32F401 new platform with a QFN chip that has need to delete some pins compared to G30TH?
Another question: "Is the micropython/ports/stm32 dir full of .c files what acts on a board definiton, and where should board definitions go now?",
since "stmhal" port is renamed to "stm32" to better reflect the MCU that it targets."
meanwhile, I am making a new stm32 board definition based on the G30_TH as a guide -- as done for pyb versions in the past.
Are there any gotcha's I need to know?
I am using v1.9.3 release.
What is status of newer hardware definition API?
What is status of newer hardware definition API?
John Griessen blog.kitmatic.com
Re: What is status of newer hardware definition API?
The board definition files that come with Micropython can be found in ports/stm32/boards/BOARD_NAME. I have several others over here: https://github.com/dhylands/wiki/wiki/M ... oard-files (including G30TH).
Some of the hardware API stuff can be found in the machine module for stm32.
The biggest thing to look out for when creating a new board definition is to make sure that you get the crystal frequency correct (HSE_VALUE from stm32f4xx_hal_conf.h) and then that the MCIROPY_HW_CLK_PLLx constants are setup properly for that crystal frequency.
Most of the work is going through the board configuration files and making sure that everything is setup properly for your particular board.
Some of the hardware API stuff can be found in the machine module for stm32.
The biggest thing to look out for when creating a new board definition is to make sure that you get the crystal frequency correct (HSE_VALUE from stm32f4xx_hal_conf.h) and then that the MCIROPY_HW_CLK_PLLx constants are setup properly for that crystal frequency.
Most of the work is going through the board configuration files and making sure that everything is setup properly for your particular board.
Re: What is status of newer hardware definition API?
Thanks. I used stm32cube program to check and set constants, so now to translate that into mpconfigboard.h lines in micropython/ports/stm32/boards/PYFLEX_F401.The biggest thing to look out for when creating a new board definition is to make sure that you get the crystal frequency correct (HSE_VALUE from stm32f4xx_hal_conf.h) and then that the MICROPY_HW_CLK_PLLx constants are setup properly for that crystal frequency.
John Griessen blog.kitmatic.com